Hi there, first of all a great thank you for developing and maintaining such an awesome project!
I run a traccar server behind an apache with MySQL and run into the following Problem ..
Maybe you have any ideas or hints which might help? My setup an the logs
Apache virtual host file gps.mydomain.net.conf
<VirtualHost *:80>
ServerName gps.mydomain.net
Redirect / https://gps.mydomain.net/
ErrorLog ${APACHE_LOG_DIR}/gps.mydomain.net.error.log
CustomLog ${APACHE_LOG_DIR}/gps.mydomain.net.access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =gps.mydomain.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName gps.mydomain.net
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/
ProxyPass /api/socket ws://localhost:8082/api/socket
ProxyPassReverse /api/socket ws://localhost:8082/api/socket
ProxyPass / http://localhost:8082/
ProxyPassReverse / http://localhost:8082/
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/gps.mydomain.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/gps.mydomain.net/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
My traccar.xml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>
<properties>
<entry key="config.default">./conf/default.xml</entry>
<entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://localhost/traccar?serverTimezone=UTC&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessi>
<entry key='database.user'>secretuser</entry>
<entry key='database.password'>secretpassword</entry>
</properties>
tracker-server.log
2022-10-28 17:41:38 INFO: Operating system name: Linux version: 5.10.0-19-amd64 architecture: amd64
2022-10-28 17:41:38 INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Eclipse Adoptium version: 17.0.4+8
2022-10-28 17:41:38 INFO: Memory limit heap: 984mb non-heap: 0mb
2022-10-28 17:41:38 INFO: Character encoding: UTF-8 charset: UTF-8
2022-10-28 17:41:38 INFO: Version: 5.4
2022-10-28 17:41:38 INFO: Starting server...
2022-10-28 17:41:38 INFO: HikariPool-1 - Starting...
2022-10-28 17:41:39 INFO: HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@60297f36
2022-10-28 17:41:39 INFO: HikariPool-1 - Start completed.
2022-10-28 17:41:39 INFO: Clearing database change log checksums
2022-10-28 17:41:39 INFO: Successfully acquired change log lock
2022-10-28 17:41:39 INFO: Successfully released change log lock
2022-10-28 17:41:39 INFO: Successfully acquired change log lock
2022-10-28 17:41:40 INFO: Reading from traccar.DATABASECHANGELOG
2022-10-28 17:41:41 INFO: Reading from traccar.DATABASECHANGELOG
2022-10-28 17:41:41 INFO: Successfully released change log lock
2022-10-28 17:41:41 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 potentia>
2022-10-28 17:41:42 INFO: jetty-10.0.12; built: 2022-09-14T01:54:40.076Z; git: 408d0139887e27a57b54ed52e2d92a36731a7e88; jvm 17.0.4+8
2022-10-28 17:41:42 INFO: Started o.t.w.@5e5a8718{/,null,AVAILABLE}
2022-10-28 17:41:42 INFO: Session workerName=node0
2022-10-28 17:41:42 WARN: JAXBContext implementation could not be found. WADL feature is disabled.
2022-10-28 17:41:43 INFO: Started o.e.j.s.ServletContextHandler@14b48f39{/,null,AVAILABLE}
2022-10-28 17:41:43 INFO: Started ServerConnector@2ce524d2{HTTP/1.1, (http/1.1)}{0.0.0.0:8082}
2022-10-28 17:41:43 INFO: Started Server@f95d64d{STARTING}[10.0.12,sto=0] @5150ms
2022-10-28 17:41:43 INFO: Health check enabled with period 480000
2022-10-28 17:43:23 INFO: user: 1, action: login, from: 95.xx.yy.229
2022-10-28 17:44:04 INFO: [Tf3fa4353] connected
2022-10-28 17:44:04 INFO: [Tf3fa4353] disconnected
2022-10-28 17:44:08 INFO: [Td70c1e1d] connected
2022-10-28 17:44:08 INFO: [Td70c1e1d: osmand < 95.xx.yy.229] 16030100ae010000aa0303b79e90a99df848af415625f64018d0a4052d165e0d20ee8518749d927116479900001cc02bc02ccca9c02fc030cca8c009c00ac013c014009c009d>
2022-10-28 17:44:08 INFO: [Td70c1e1d: osmand > 95.xx.yy.229] 485454502f312e31203430302042616420526571756573740d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2022-10-28 17:44:08 INFO: [Td70c1e1d: osmand < 95.xx.yy.229] 15030100020246
2022-10-28 17:44:08 INFO: [Td70c1e1d] error - Connection reset - SocketException (...)
2022-10-28 17:44:08 INFO: [Td70c1e1d] disconnected
2022-10-28 17:44:38 INFO: [T930749bc] connected
It usually means that the connection was closed by the other side.
I finally found the problem and solution. My setup was perfectly fine ... I'm using the Android client app (osmand) and did additional enter the :5055 Port behind the server URL which of course is wrong!
Hi there, first of all a great thank you for developing and maintaining such an awesome project!
I run a traccar server behind an apache with MySQL and run into the following Problem ..
Maybe you have any ideas or hints which might help? My setup an the logs
Apache virtual host file gps.mydomain.net.conf
<VirtualHost *:80> ServerName gps.mydomain.net Redirect / https://gps.mydomain.net/ ErrorLog ${APACHE_LOG_DIR}/gps.mydomain.net.error.log CustomLog ${APACHE_LOG_DIR}/gps.mydomain.net.access.log combined RewriteEngine on RewriteCond %{SERVER_NAME} =gps.mydomain.net RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost> <IfModule mod_ssl.c> <VirtualHost *:443> ServerName gps.mydomain.net ServerAdmin webmaster@localhost DocumentRoot /var/www/html/ ProxyPass /api/socket ws://localhost:8082/api/socket ProxyPassReverse /api/socket ws://localhost:8082/api/socket ProxyPass / http://localhost:8082/ ProxyPassReverse / http://localhost:8082/ SSLEngine on SSLCertificateFile /etc/letsencrypt/live/gps.mydomain.net/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/gps.mydomain.net/privkey.pem Include /etc/letsencrypt/options-ssl-apache.conf </VirtualHost> </IfModule>
My traccar.xml
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'> <properties> <entry key="config.default">./conf/default.xml</entry> <entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry> <entry key='database.url'>jdbc:mysql://localhost/traccar?serverTimezone=UTC&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessi> <entry key='database.user'>secretuser</entry> <entry key='database.password'>secretpassword</entry> </properties>
tracker-server.log