Stage #wa6: error reading from connection

I’m stuck on Stage #wa6. This runs locally when I run the following command

echo -n "00000023001200046f7fc66100096b61666b612d636c69000a6b61666b612d636c6904302e3100" | xxd -r -p | nc localhost 9092 | hexdump -C

But when the test is run on the server I get this error:

compile] Compilation successful.
Debug = true
[tester::#WA6] Running tests for Stage #WA6 (Parse Correlation ID)
[tester::#WA6] $ ./your_program.sh /tmp/server.properties
[tester::#WA6] Connecting to broker at: localhost:9092
[your_program] Logs from your program will appear here!
[your_program] accepted new connection
[tester::#WA6] Connection to broker at localhost:9092 successful
[tester::#WA6] Sending "ApiVersions" (version: 4) request (Correlation id: 179618540)
[tester::#WA6] Hexdump of sent "ApiVersions" request: 
[tester::#WA6] Idx  | Hex                                             | ASCII
[tester::#WA6] -----+-------------------------------------------------+-----------------
[tester::#WA6] 0000 | 00 00 00 23 00 12 00 04 0a b4 c2 ec 00 09 6b 61 | ...#..........ka
[tester::#WA6] 0010 | 66 6b 61 2d 63 6c 69 00 0a 6b 61 66 6b 61 2d 63 | fka-cli..kafka-c
[tester::#WA6] 0020 | 6c 69 04 30 2e 31 00                            | li.0.1.
[tester::#WA6] 
[tester::#WA6] error reading from connection: read tcp 127.0.0.1:37066->127.0.0.1:9092: read: connection reset by peer
[tester::#WA6] Test failed
[tester::#WA6] Terminating program
[tester::#WA6] Program terminated successfully

Here are my logs:

00000000  00 00 00 00 6f 7f c6 61                           |....o..a|
00000008

And here’s a snippet of my code:
Rust Gist

The tests pass when I read everything from the stream, but I haven’t understood the reason of failure here?

Hey @shivamklr, looks like you’ve got past this stage. Do you happen to remember what was wrong? Would love to see if we can improve the tester / instructions.

Hi, got similiar result like this too. This is debug log.

[tester::#WA6] Running tests for Stage #WA6 (Parse Correlation ID)
[tester::#WA6] $ ./your_program.sh /tmp/server.properties
[tester::#WA6] Connecting to broker at: localhost:9092
[your_program] Logs from your program will appear here!
[tester::#WA6] Connection to broker at localhost:9092 successful
[tester::#WA6] Sending "ApiVersions" (version: 4) request (Correlation id: 1559362259)
[tester::#WA6] Hexdump of sent "ApiVersions" request: 
[tester::#WA6] Idx  | Hex                                             | ASCII
[tester::#WA6] -----+-------------------------------------------------+-----------------
[tester::#WA6] 0000 | 00 00 00 23 00 12 00 04 5c f1 fa d3 00 09 6b 61 | ...#....\.....ka
[tester::#WA6] 0010 | 66 6b 61 2d 63 6c 69 00 0a 6b 61 66 6b 61 2d 63 | fka-cli..kafka-c
[tester::#WA6] 0020 | 6c 69 04 30 2e 31 00                            | li.0.1.
[tester::#WA6] 
[your_program] bytes: [0, 0, 0, 35, 0, 18, 0, 4, 92, 241, 250, 211, 0, 9, 107, 97, 102, 107, 97, 45, 99, 108, 105, 0, 10, 107, 97, 102, 107, 97, 45, 99]
[tester::#WA6] error reading from connection: read tcp 127.0.0.1:33588->127.0.0.1:9092: read: connection reset by peer
[tester::#WA6] Test failed
[tester::#WA6] Terminating program
[tester::#WA6] Program terminated successfully

@badgooooor, could you upload your code to GitHub and share the link? It will be much easier to debug if I can run it directly.

Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.