Device (with watch protocol) fails to connect via https

Gareth Curtis5 years ago

Hello,

Has anyone been able to connect a device through HTTPs? I managed to do it for the Android app but when it try with my watch device (using watch protocol) I see nothing in the logs. I have verified it works on http 5093 and believe the http configuration file is correct (see below).

I have checked the 4431 port is open.

If I do a GET with a browser on mydomain.com:4431 then I can see an entry in the Traccar log (hex version of the failure message) but despite the device sending messages to mydomain.com:4431 nothing shows up in the logs and the device remains offline.

Can anyone see anything wrong with the below config file which might be a problem? Or has anyone had a similar issue before?

Many thanks.

My /etc/httpd/conf/httpd-le-ssl.conf

Sorry for the formatting which seems slightly off!

<IfModule mod_ssl.c>
<VirtualHost *:443>
   DocumentRoot "/var/www/html"
   ServerName "mydomain.com"
   ServerAlias "www.mydomain.com"

   Include /etc/letsencrypt/options-ssl-apache.conf

   ProxyPass /api/socket  ws://localhost:8082/api/socket
   ProxyPassReverse /api/socket ws://localhost:8082/api/socket

   ProxyPass / http://localhost:8082/
   ProxyPassReverse / http://localhost:8082/

   SSLCertificateFile /etc/letsencrypt/live/mydomain.com/fullchain.pem
   SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.com/privkey.pem
</VirtualHost>
<VirtualHost *:4431>
   DocumentRoot "/var/www/html"
   ServerName "mydomain.com"
   ServerAlias "www.mydomain.com"

   Include /etc/letsencrypt/options-ssl-apache.conf

   ProxyPass / http://localhost:5093/
   ProxyPassReverse / http://localhost:5093/

   SSLCertificateFile /etc/letsencrypt/live/mydomain.com/fullchain.pem
   SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.com/privkey.pem
</VirtualHost>
</IfModule>
Anton Tananaev5 years ago

What you are trying to do doesn't make any sense. Watch protocol is not using HTTP or HTTPS. It's a raw TCP protocol.

Gareth Curtis5 years ago

Ah ok makes sense! I was trying to encrypt the traffic. I thought it was running over http. Sorry.

Gareth Curtis5 years ago

Thanks