Windows server not accepting connections from Android client (Send Failed)

David4 years ago

Hi all,

I am struggling to connect the Android App to connect to a Windows Traccar server running on my own PC. I am getting the 'Send Failed' error in the client. I have managed to get the client to connect to the US demo server without problems (device ID 829951).

I have forwarded the following ports on my router to the PC in question (both TCP and UDP) to try to get it working - 5055, 5001, 8082 and 18682. I think 5055 is the correct one, but came across the others with 'Google' searches and thought I'd try them anyway. Port tests shows these ports to be 'closed'.

I installed the Windows Traccar server and have Java 8 update 251 installed. Java was installed as part of the Traccar installation. The service seems to be running OK.

I have followed the troubleshooting guide, and aren't getting any HEX messages in my logs. I can see a couple of errors - a Liquibase error and a disabled port error (5040). I'm not sure if the Liquibase error needs fixing to get the service accepting connections. According to Netstat, Java is using port 5040, so I'm not sure how I would free this up (if this is needed). I don't have Anti-virus software installed (other than Windows Defender), and tried turning the Windows Firewall off, but nothing helped. There is no other network equipment between the PC and the router.

Log file below - if anyone can see where the issue is, please let me know! Thanks :D

2020-05-22 12:24:16  INFO: HikariPool-1 - Starting...
2020-05-22 12:24:19  INFO: HikariPool-1 - Start completed.
2020-05-22 12:24:24  INFO: Clearing database change log checksums
2020-05-22 12:24:25  INFO: SELECT COUNT(*) FROM PUBLIC.DATABASECHANGELOGLOCK
...
2020-05-22 12:24:41  INFO: SELECT * FROM PUBLIC.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
2020-05-22 12:24:41  INFO: Successfully released change log lock
2020-05-22 12:24:42  INFO: Logging initialized @32120ms to org.eclipse.jetty.util.log.Slf4jLog
2020-05-22 12:24:45  INFO: Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system instability.
2020-05-22 12:24:55  INFO: Operating system name: Windows 10 version: 10.0 architecture: amd64
2020-05-22 12:24:55  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Oracle Corporation version: 11.0.6+10-LTS
2020-05-22 12:24:55  INFO: Memory limit heap: 1524mb non-heap: 0mb
2020-05-22 12:24:55  INFO: Character encoding: Cp1252 charset: windows-1252
2020-05-22 12:24:55  INFO: Version: 4.8
2020-05-22 12:24:55  INFO: Starting server...
2020-05-22 12:24:57  WARN: Port 5040 is disabled due to conflict
2020-05-22 12:24:58  INFO: jetty-9.4.26.v20200117; built: 2020-01-17T12:35:33.676Z; git: 7b38981d25d14afb4a12ff1f2596756144edf695; jvm 11.0.6+10-LTS
2020-05-22 12:24:58  INFO: Started o.t.w.@38335414{/,null,AVAILABLE}
2020-05-22 12:24:58  INFO: DefaultSessionIdManager workerName=node0
2020-05-22 12:24:58  INFO: No SessionScavenger set, using defaults
2020-05-22 12:24:58  INFO: node0 Scavenging every 660000ms
2020-05-22 12:25:10  INFO: Started o.e.j.s.ServletContextHandler@71f96182{/,null,AVAILABLE}
2020-05-22 12:25:10  INFO: Started ServerConnector@a9b8af6{HTTP/1.1,[http/1.1]}{0.0.0.0:8082}
2020-05-22 12:25:10  INFO: Started @59747ms
Joystick4 years ago

Hi David did you open tcp port 5055 on your windows computer. Open windows Defender Firewall and create new inbound rule for tcp on port 5055.

David4 years ago

Thanks for the suggestion Pete. I have created the rule, however I still have the same problem. I tried it with Edge traversal both on and off, as I have a NAT router. I had also previously tested it with the Windows Firewall off, so I'm not surprised it didn't work, but it was worth a try.

David4 years ago

Tried it again this morning on a different PC on a different network/router with exactly the same problem. Port 5055 (TCP/UDP) forwarded from router to PC with server installed, Windows Firewall turned off and a rule created to allow 5055 on both protocols. Uninstalled/reinstalled the Android app. Logged into server with admin/admin, created a new user with the same ID as the app is giving, and it just doesn't connect with 'Send Failed' being shown on the Android app when the service is started, and 'Offline' showing under 'Status' on the server.

David4 years ago

Also tried installing the client on another phone, and the same problem there too!

David4 years ago

Seems I wasn't patient enough for the other phone, as it is working now. Will do some investigating and get back with more info. Not sure how it worked on the demo server, and not on my own...

David4 years ago

Double checked demo server and works 100% on my phone. Still not working on my own server. Other phone works on my server, so no idea what is going on....My phone is a Redmi 5 plus and the working phone on my server is a Samsung Galaxy S8. Perhaps it is a phone issue?

kishta14 years ago

Hi david
i am trying to login from egypt
and i have the same problem
i have added port 5055 in widows defender firewall (TCP/UDP both)
still has "send failed" on my andriod phone
could you help me please

David4 years ago

Hi Kishta. Hope you are having fun in Egypt. Unfortunately I never got this working, so I ended up using another solution (Home Assistant). Please let me know if you have any success!

kishta14 years ago

Thanks Davis for your Interest and Quick response ;
could you just explain more how did you solved it 'another solution' ?

David4 years ago

Kishta, I used Home Assistant to track my location : https://www.home-assistant.io/getting-started/presence-detection/ using the HA app on my phone.

Apparently, you can also do it this way : https://www.home-assistant.io/integrations/owntracks/

Regards,
David