Issue with LocationIQ reverse geocoding

IoSonoPiero6 years ago

Hello,
I've obtained a free token for reverse geocoding.
I've put this in traccar.xml files,

<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>nominatim</entry>
<entry key='geocoder.url'>https://eu1.locationiq.com/v1/reverse.php</entry>
<entry key='geocoder.key'>***mytoken***</entry>

but when I start the daemon,
and I click on show address button, I got:

javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure - ProcessingException (... < JsonGeocoder:107 < ServerResource:57 < ...)

In log file, I got:

2019-03-13 22:48:55  INFO: [a18776d2: 5055 > 5.90.170.127] HEX: 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2019-03-13 22:48:55  WARN: Geocoding failed - javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure - ProcessingException (...)
2019-03-13 22:48:55  INFO: [a18776d2] id: 647029, time: 2019-03-13 22:48:53, lat: 40.24758, lon: 40.27318, course: 0.0, accuracy: 16.1
2019-03-13 22:48:57  INFO: [a18776d2] disconnected

Any help, please?
Thanks in advance!

Jake Stephens6 years ago

Hey, I'm also using LocationIQ, it's working great.

Below is my config which is working on the latest release.

<!-- GEOCODING SETTINGS -->
<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>nominatim</entry>
<entry key='geocoder.onRequest'>true</entry>
<entry key='geocoder.ignorePositions'>true</entry>
<entry key='geocoder.key'>LocationIQ_API_Token</entry>

Hope this helps!

IoSonoPiero6 years ago

Hello Jake,
I've tried to add

<entry key='geocoder.onRequest'>true</entry>
<entry key='geocoder.ignorePositions'>true</entry>

to my traccar.xml file.

Now I have:

    <entry key='geocoder.enable'>true</entry>
    <entry key='geocoder.type'>nominatim</entry>
    <entry key='geocoder.url'>https://us1.locationiq.com/v1/reverse.php</entry>
    <entry key='geocoder.onRequest'>true</entry>
    <entry key='geocoder.ignorePositions'>true</entry>    
    <entry key='geocoder.key'>TOKEN</entry>

but I got:

javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure - ProcessingException (... < JsonGeocoder:107 < ServerResource:57 < ...)

error.
Can you post, please, your entire reverse geocoding config?
Thanks,
Piero

Jake Stephens6 years ago

Try removing the line below and restart the traccar service.

<entry key='geocoder.url'>https://us1.locationiq.com/v1/reverse.php</entry>

What I posted was my entire reverse geocoding config.

IoSonoPiero6 years ago

YES!!!
IT works!
Thanks, really.

I don't understand why, then, in documentation, for LocationIQ, is explicited that you need:

<entry key='geocoder.url'>https://us1.locationiq.com/v1/reverse.php</entry>

Thanks, really!
Piero

Jake Stephens6 years ago

I remember having the same issue when I moved from Googles Geocoding to LocationIQ and couldn't find any advice.

I played around with some of the config and the config I've got now/posted above is the one that works, so settled with that!

Anyway, pleased it's now working for you! :)

Jake

IoSonoPiero6 years ago

Thanks bro!

IoSonoPiero6 years ago

Hello,
so, today I got an email from LocationIQ about my usage.
I got 0 (zero) requests while I've used it a lot.

So, does omitting the string

<entry key='geocoder.url'>https://us1.locationiq.com/v1/reverse.php</entry>

mean that you are NOT using LocationIQ services?

Carl6 years ago

I had the exact same problem. Solution from @Jake Stephens works very well. Wonder why in the documentation specified we have to add the url...

Anton Tananaev6 years ago

When you remove URL, Traccar defaults to free Nominatim server, so you are not using LocationIQ.

IoSonoPiero6 years ago

Hello Anton, you are right.
The issue, however, happens when you put the string in config.
Do you have any working file configuration with LocationIQ so we can give a try, please?

Anton Tananaev6 years ago
IoSonoPiero6 years ago

Thanks, I'll give a try!

Pratik Sharma5 years ago

@Jake

I am on traccar 4.4 and tried using your suggestion and restarted the services but no luck, can you please help

Peter5 years ago

Hello,
I am on traccar 4.6 and try to add a free reverse geocoding.
I've put this in traccar.xml files,

<entry key='geocoder.enable'>true</entry>
<entry key='geocoder.type'>nominatim</entry>
<entry key='geocoder.url'>https://eu1.locationiq.com/v1/reverse.php</entry>
<entry key='geocoder.key'>mykey that i get from LocationIQ Geocoding Service</entry>

Restart Traccar service
And when I click on show address, I got:

Received fatal alert: handshake_failure - SSLHandshakeException (... < JsonGeocoder:107 < ServerResource:57 < ...)

I know that some of you have same problem, but on old traccar versions. Is there any easy soloution, or a alternative way?