Client suddenly stopped working

Anders Yuran2 years ago

My client has been working for the last month but suddenly stopped working. I now get send failed. Nothinmg has changed, more then a couple of host updtes of os. uBUNTU 20.04. I have gone through every point in the troubleshooting guide but no help. I Have uninstalled and reinstalled a new client but no luck
I have shut off fw
Manager connect without problem
address is http://track.havouza.com:5055

Anders Yuran2 years ago

Solved.
For some reason I cant use Cloudflare when using a port in the url. Have to read up on a solution

Anton Tananaev2 years ago

Great that you proactively followed the troubleshooting guide before posting. Please share all the steps you followed and the results from each step.

Anders Yuran2 years ago

Why should I do that when the solution is that it is not possible to use cloudflare? The problem is that cloudflare only accept a limited number of ports which make it impossible. Not a client or server problem

Anton Tananaev2 years ago

I wrote it before I saw your second message.

JoeF2 years ago

Hi, I am truly a newbie on Traccar, I am in the process of installing and configuring it to work with Home Assistant, I have a Clouflare tunnel with a paid domain, I was able to configure cloudflare to work with Traccar today, it is very simple you just need to ad a cloudflare cname like traccar.yourdomain.com and then on your local end of the cloudflare tunnel you point it to your local Traccar ipaddress:5055.
I was having issues as nothing was going through to the Traccar server on port 5055 and in my case as it is running in a docke container the issue was SELINUX, I set it to permissive mode and as soon as I rebooted Traccar started to receive my position.

Vijay2 years ago

Hi @JoeF , can you please elaborate a bit more on your solution? I have the exact same setup. I have created traccar.mydomain.com and am directing it to <tunnel_local_ip>:5055 but the problem is how will Cloudflare get the traffic on port 5055 in the first place? As far as I know it will only accept traffic on port 80 or port 443 (https) and to allow traffic on other ports , I think I have to configure ingress rules - but you are not talking about that , how come?

Vijay2 years ago

It seems you are right. we dont need to configure any ingress rules. I was able to get the Traccar client to communicate with my server on port 5055.
But my actual issue is still not solved. Everything works with Traccar client in port 5055 but my device ST-901 which works on port 5013 is not able to communicate. I have tried configuring my device on demo.traccar.com and it works well but when I change the URL to traccar.mydomain.com it isnt able to. @Anton , can you please tell me where should I look to debug this.
To summarize:
My device seems to be good as it can show up well on demo.traccar.com
My Cloudflare rules and my server are accessible via the URL traccar.<mydomain>.com and Traccar client can connect well on port 5055.
In spite of this, when I change the URL on my device to traccar.<mydomani>.com 5013 , it isnt able to communicate
Also noticeable here is that as per docs the format of the URL to be configured in ST-901 is <URL><space><port> . If I try to omit port , it returns me an "invalid command" error.

Anton Tananaev2 years ago

Isn't Cloudflare an HTTP only?

Vijay2 years ago

Yes it seems so, As per the articles on Cloudflare it only supports a bunch of non standard ports and strips the port no from an incoming request if it is any other of those ports.
The way this has to be circumvented is that you can configure a traffic on a particular URL to be redirected to a particular origin server on your choice of port. So I have the following setting on Cloudflare tunnel:
Direct all traffic on traccar.<mydoman>.com to <my local host IP>:5013
Using this setting if I set it to 5055 , all works well while 5013 doesn't.
In fact for some reason I saw one request from my device coming through today and nothing after that , not sure how and why. But that request had hex content. Not sure what to make of it

2022-12-12 13:07:57  INFO: [Tf567bf54] connected 

2022-12-12 13:07:57  INFO: [Tf567bf54: h02 < 172.18.0.2] 474554202f20485454502f312e310d0a486f73743a2074632e636f72616c7831352e6f6e6c696e650d0a557365722d4167656e743a204d6f7a696c6c612f352e3020286950686f6e653b20435055206950686f6e65204f532031355f365f31206c696b65204d6163204f53205829204170706c655765624b69742f3630352e312e313520284b48544d4c2c206c696b65204765636b6f292056657273696f6e2f31352e362e31204d6f62696c652f313545313438205361666172692f3630342e310d0a4163636570743a20746578742f68746d6c2c6170706c69636174696f6e2f7868746d6c2b786d6c2c6170706c69636174696f6e2f786d6c3b713d302e392c2a2f2a3b713d302e380d0a4163636570742d456e636f64696e673a20677a69700d0a4163636570742d4c616e67756167653a20656e2d494e2c656e2d47423b713d302e392c656e3b713d302e380d0a43646e2d4c6f6f703a20636c6f7564666c6172650d0a43662d436f6e6e656374696e672d49703a203132322e3137312e31392e39310d0a43662d4970636f756e7472793a20494e0d0a43662d5261793a20373738346363333435616437356236322d4652410d0a43662d56697369746f723a207b22736368656d65223a226874747073227d0d0a43662d576172702d5461672d49643a2033643232633933362d356462662d346236612d383030392d6432333731666566613537340d0a436f6e6e656374696f6e3a206b6565702d616c6976650d0a557067726164652d496e7365637572652d52657175657374733a20310d0a582d466f727761726465642d466f723a203132322e3137312e31392e39310d0a582d466f727761726465642d50726f746f3a2068747470730d0a0d0a 

2022-12-12 13:07:58  INFO: [Tf567bf54] disconnected
Anton Tananaev2 years ago

Protocol on port 5013 in not HTTP-based, so it will never work if Cloudflare is only HTTP proxy.

Vijay2 years ago

oh and can you also confirm that 5055 is http based and therefore it works?

Anton Tananaev2 years ago

Yes, 5055 is HTTP-based and that's why it works. Most of other protocols are not HTTP-based.

Vijay2 years ago

Thanks Anton. That concludes the thread , and my hopes of making it work :( . Thanks again.