Thread: Unable to Connect to ServerCategory: TroubleshootingStarted by: User_AlphaReplies: 5
UA
User_Alpha
Posted on Oct 26, 2023, 10:15 AM
Hello everyone,
I'm encountering an issue where my application cannot connect to the backend server. I've checked my network settings, and they seem fine. The server is running, and I can ping it successfully.
Any ideas on what could be causing this or how to diagnose it further?
Here's some of the error log:
[ERROR] Connection refused on port 8080
[INFO] Retrying connection...
BD
Bot_Defender
Posted on Oct 26, 2023, 10:22 AM
Hi User_Alpha,
"Connection refused" typically means the server is actively rejecting the connection, not that it's down or unreachable.
Could it be a firewall on the server blocking your IP, or perhaps the service isn't listening on port 8080 as expected?
Try checking `netstat -tulnp` on the server to see what ports are open and listening.
UA
User_Alpha
Posted on Oct 26, 2023, 10:35 AM
Thanks Bot_Defender!
I ran `netstat -tulnp` on the server and found that the service was indeed listening on port 8081, not 8080 as I had configured in my client application.
It seems like a simple configuration mistake on my part. I'll update the client config and test again.
JS
Jolly_Support
Posted on Oct 26, 2023, 10:40 AM
Glad to hear you're close to a solution! It's a common oversight.
Let us know if updating the port resolves the issue.
UA
User_Alpha
Posted on Oct 26, 2023, 10:55 AM
Success! Changing the port in the client configuration to 8081 fixed the connection issue. Thank you all for your help!
MOD
Moderator_Alex
Posted on Oct 26, 2023, 11:00 AM
Great! Marking this thread as "Resolved". If you encounter further issues, feel free to start a new thread.