How to listen on client port with Caddy v2

bboyette4 years ago

I'm using the Caddy v2 webserver and have Traccar (port 8082) reverse-proxied to port 443. I'm running a Win10 host computer with Ubuntu 20.04 LTS on a VM with Caddy v2 and Traccar running within it. I'm able to get to my Traccar server in the browser but not I'm not connecting to any of my android clients. I've triple checked that my clients all have the correct URL and that I've got the 6-digit code correct on the server. I'm NOT receiving "send failed"... so something is happening at least. I have port 5055 tcp/udp open on my router firewall and have 5055 port-forwarded to the IP of my server. I also have 5055 tcp/udp allowed on the server. I ran netstat on the server and I DO NOT see any listing for 5055 LISTEN.

Here is the portion of my Caddyfile pertaining to Traccar.

[object Object]

The closest forum article I've found on this issue is https://www.traccar.org/forums/topic/enabling-encryption-for-client-access-on-setup-with-https-enabled/

Any help would be appreciated!!!

Anton Tananaev4 years ago

Have you followed troubleshooting guide?

bboyette4 years ago

Yes, I've followed the troubleshooting guide. I'm hoping someone out there has some experience with Caddy.

Anton Tananaev4 years ago

Yes, I've followed the troubleshooting guide.

Care to share what you did and results?

bboyette4 years ago

Per the troubleshooting guide, I've looked at the log file and there is no HEX traffic. So I proceded to step 6. I'm not able to confirm an open port. I have port 5055 tcp/udp open on my router firewall and have 5055 port-forwarded to the IP of my server (Ubuntu VM). I also have 5055 tcp/udp allowed on the server (Ubuntu VM). I ran netstat on the server and I DO NOT see any listing for 5055 LISTEN. I'm able to get to the server's webpage on localhost:8082 and via the external IP, port 8082 (although this is reverse-proxied by Caddy).

Anton Tananaev4 years ago

So, it sounds like there's some issue with port 5055. How is this related to Caddy?

bboyette4 years ago

It seems that the Ubuntu VM running Traccar is not listening on port 5055 for the client updates. Nor is there a statement in the Caddyfile (config file) to listen on that port.

bboyette4 years ago

I've ran netstat and Traccar is not listed, but I can still get to the web interface. Is there something I need to change in the Traccar config file? Shouldn't Traccar be listening on port 5055 in order to receive updates from the Android client?

Anton Tananaev4 years ago

Yes, it should.

bboyette4 years ago

So do I need to change anything in the Traccar config file?

Anton Tananaev4 years ago

Traccar listens on 5055 by default. If it's doesn't, there must be some issue with your server.

bboyette4 years ago

I reinstalled Traccar on my Ubuntu VM. When I run "netstat -alp | grep 5055", I see that that traccar is listening on tcp6 but NOT tcp. I'm not using IPV6 so how do I enable traccar to listen on IPV4 (aka tcp)?

Anton Tananaev4 years ago

Any recent Linux version should be dual stack, so it's listening on both.