Json Error

tracuser3 years ago

Hi.

Im running Traccar Traccar 4.0.
Im trying to use Owntracks for tests. but the error on Owntracks is ((HTTP status 200, JsonParseException)).
owntracks last version on Android.

Debian and Apache2 server.
I have created a subdomain owntracks.domain.com
I have configurad Owntracks with http://owntracks.domain.com:80
On server side i configure the SSL port:

-------CONF FILE---------
<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName owntracks.domain.com
        Redirect permanent / https://owntracks.domain.com
</VirtualHost>

-----SSL CONF FILE----

<VirtualHost *:443>

        ServerAdmin webmaster@localhost
        ServerName owntracks.domain.com

        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 owntracks.domain.com.cer
        SSLCertificateChainFile fullchain.cer
        SSLCertificateKeyFile owntracks.domain.com.key


        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        DirectoryIndex index.html index.php index.py index.pl index.htm
</VirtualHost>

Not sure what is the problem.
The web server is on gps.domain.com, running under ssl.
Im using for now the same SSL certificates for gps.domain.com and owntracks.domai.com only for test purposes.

Regards.

Anton Tananaev3 years ago

It seems like you're trying to use the web port instead of the correct port for your device/app.

tracuser3 years ago

Ouch!!!
Youre right my fail. now using the correct port 5144

Now the error is: Hostname owntracks.server.com not verified:
certificate:sha22354lkj2r354jwert
I suspect i need to create a new certificate for this subdomain...

I need to create a subdomain for every device/app port i want to add to the systems.
If you know a beetter solution or more simple for add SSL to the data im all ears.
Regards.

Anton Tananaev3 years ago

Most of device protocols are not HTTP-based, so it shouldn't be a big problem.

tracuser3 years ago

I checked my owntrack app with traccar demo servers but always receive the same message HTTP 400

I test demo2.traccar.org and demo4.traccar.org
New accounts.

Anton Tananaev3 years ago

Please provide logs.

tracuser3 years ago
2023-01-01 17:51:27.098 D zzl: location result received: LocationResult(lastLocation=Location[fused 38.582259,-78.533911 hAcc=116.766 et=+15d1h35m47s647ms alt=190.72593430018742 vAcc=3.6279328 vel=0.10040558 sAcc=0.29732138 bear=197.02016])
2023-01-01 17:51:27.100 D MessageProcessor: Queueing messageId:1672613487099-6d8d14, queueLength:0, ThreadID: Thread[backgroundHandlerThread,5,main]
2023-01-01 17:51:27.102 D CachingGeocoder: Geocode cache: hits=68, misses=26
2023-01-01 17:51:27.105 D MessageProcessorEndpointHttp: url:http://demo2.traccar.org/, messageId:1672613487099-6d8d14
2023-01-01 17:51:27.178 D zzl: location result received: LocationResult(lastLocation=Location[fused 38.582261,-78.533905 hAcc=7.538 et=+15d1h35m49s276ms alt=190.5972592362709 vAcc=3.5747018 vel=0.057417903 sAcc=0.21931712])
2023-01-01 17:51:27.180 D MessageProcessor: Queueing messageId:1672613487178-8fce8a, queueLength:0, ThreadID: Thread[backgroundHandlerThread,5,main]
2023-01-01 17:51:27.182 D CachingGeocoder: Geocode cache: hits=70, misses=26
2023-01-01 17:51:28.146 I MessageProcessorEndpointHttp: Message id=1672613487099-6d8d14 sent in 1041ms
2023-01-01 17:51:28.160 E MessageProcessorEndpointHttp: JsonParseException HTTP status: 200
2023-01-01 17:51:28.160 D MessageProcessor: message:HTTP status 200, JsonParseException, 
2023-01-01 17:51:28.160 D MessageProcessor: onMessageDelivered in MessageProcessor Noop. ThreadID: Thread[networkHandlerThread,5,main]
2023-01-01 17:51:28.193 D MessageProcessorEndpointHttp: url:http://demo2.traccar.org/, messageId:1672613487178-8fce8a
2023-01-01 17:51:29.186 I MessageProcessorEndpointHttp: Message id=1672613487178-8fce8a sent in 992ms
2023-01-01 17:51:29.187 E MessageProcessorEndpointHttp: JsonParseException HTTP status: 200
2023-01-01 17:51:29.187 D MessageProcessor: message:HTTP status 200, JsonParseException, 
2023-01-01 17:51:29.188 D MessageProcessor: onMessageDelivered in MessageProcessor Noop. ThreadID: Thread[networkHandlerThread,5,main]
2023-01-01 17:51:37.148 D zzl: location result received: LocationResult(lastLocation=Location[fused 38.582258,-78.533902 hAcc=116.519 et=+15d1h35m57s660ms alt=190.62277801682094 vAcc=3.6737194 vel=0.052979693 sAcc=0.21931712])
2023-01-01 17:51:37.154 D MessageProcessor: Queueing messageId:1672613497151-2b7989, queueLength:0, ThreadID: Thread[backgroundHandlerThread,5,main]
2023-01-01 17:51:37.157 D CachingGeocoder: Geocode cache: hits=72, misses=26
2023-01-01 17:51:37.160 D MessageProcessorEndpointHttp: url:http://demo2.traccar.org/, messageId:1672613497151-2b7989
2023-01-01 17:51:37.181 D zzl: location result received: LocationResult(lastLocation=Location[fused 38.582261,-78.533911 hAcc=7.752 et=+15d1h35m59s278ms alt=190.62277801682094 vAcc=3.6100373 vel=0.058284577 sAcc=0.22671568])
2023-01-01 17:51:37.185 D MessageProcessor: Queueing messageId:1672613497182-68f547, queueLength:0, ThreadID: Thread[backgroundHandlerThread,5,main]
2023-01-01 17:51:37.247 D CachingGeocoder: Geocode cache: hits=74, misses=26
2023-01-01 17:51:38.392 I MessageProcessorEndpointHttp: Message id=1672613497151-2b7989 sent in 1231ms
2023-01-01 17:51:38.393 E MessageProcessorEndpointHttp: JsonParseException HTTP status: 200
Anton Tananaev3 years ago

I meant Traccar logs, of course.

tracuser3 years ago

Logs from demo2.traccar.org? i not find those logs.

Anton Tananaev3 years ago

Logs from your server of course.