Stuck on #EJ5. dial tcp 127.0.0.1:4221: connect: connection refused

I’m stuck on Stage #EJ5

I’ve tried

codecrafters test

Here are my logs:

[compile] warning: `codecrafters-http-server` (bin "main") generated 4 warnings
[compile]     Finished `release` profile [optimized] target(s) in 18.99s
[compile] Moved ./.codecrafters/run.sh → ./your_program.sh
[compile] Compilation successful.

Debug = true

[tester::#EJ5] Running tests for Stage #EJ5 (Concurrent connections)
[tester::#EJ5] Running program
[tester::#EJ5] $ ./your_program.sh
[tester::#EJ5] Creating 2 parallel connections
[tester::#EJ5] Creating connection 1
[your_program] /app/your_program.sh: 11: exec: /tmp/codecrafters-build-http-server-rust/release/codecrafters-http-server: not found
[tester::#EJ5] Hint: 'connection refused' usually means that your server is not running.
[tester::#EJ5] dial tcp 127.0.0.1:4221: connect: connection refused
[tester::#EJ5] Test failed
[tester::#EJ5] Terminating program
[tester::#EJ5] Program terminated successfully

Hey @arakitakashi, since main.rs was moved from src to src/bin, you’ll need to edit .codecrafters/run.sh as well:

exec /tmp/codecrafters-build-http-server-rust/release/main "$@"

Let me know if this fixes the issue.

1 Like

Thanks! I’m glad the suggested method worked and fixed the issue for you.

1 Like

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