dawarich
dawarich copied to clipboard
Selfhosted Photon is not working, there is some kind of bug and Im banging my head against the wall.
Hello.
I am no newbie to the selfhosted world. Here is what I have
for
dawarich and dawarich-sidekiq
Geocoder.config
=> {timeout: 5,
lookup: :photon,
ip_lookup: :ipinfo_io,
language: :en,
http_headers: {"User-Agent" => "Dawarich 0.26.4 (https://dawarich.app)"},
use_https: false,
http_proxy: nil,
https_proxy: nil,
api_key: nil,
basic_auth: {},
logger: :kernel,
kernel_logger_level: 2,
always_raise: :all,
units: :km,
distances: :linear,
cache: #<Redis client v5.4.0 for redis://192.168.1.4:6382>,
cache_prefix: nil,
cache_options: {expiration: 1 day},
photon: {use_https: false, host: "192.168.1.4:2322"}}
Going to 192.168.1.4:2322 in my browser merits a response
http://192.168.1.4:2322/api?q=berlin
{"features":[{"geometry":{"coordinates":[-68.2690227,12.1491494],"type":"Point"},"type":"Feature","properties":{"osm_id":25881928,"extent":[-68.2692939,12.1497472,-68.268989,12.1478635],"country":"Netherlands","city":"Kralendijk","countrycode":"NL","postcode":"0000 BQ","type":"street","osm_type":"W","osm_key":"highway","district":"Sabana","osm_value":"residential","name":"Kaya Berlin","state":"Netherlands"}},{"geometry":{"coordinates":[-63.0372159,18.0506746],"type":"Point"},"type":"Feature","properties":{"osm_type":"W","osm_id":526000558,"extent":[-63.0373916,18.05118,-63.0367493,18.0506044],"country":"Netherlands","osm_key":"highway","city":"Lower Prince's Quarter","countrycode":"NL","district":"Belvedere","osm_value":"residential","name":"Berlin Drive","state":"Sint Maarten","type":"street"}},{"geometry":{"coordinates":[5.8709703,51.8414194],"type":"Point"},"type":"Feature","properties":{"osm_id":2840773471,"country":"Netherlands","city":"Nijmegen","countrycode":"NL","postcode":"6521GE","locality":"Altrade","type":"house","osm_type":"N","osm_key":"amenity","housenumber":"15","street":"Daalseweg","district":"Nijmegen-Oost","osm_value":"restaurant","name":"Bistrobar Berlin","state":"Gelderland"}},{"geometry":{"coordinates":[4.511262,52.2229467],"type":"Point"},"type":"Feature","properties":{"osm_type":"W","osm_id":7432784,"extent":[4.5103068,52.2234932,4.5118708,52.2221708],"country":"Netherlands","osm_key":"highway","city":"Sassenheim","countrycode":"NL","osm_value":"residential","postcode":"2171 ME","name":"Berline","state":"South Holland","type":"street"}},{"geometry":{"coordinates":[5.39011,51.68516],"type":"Point"},"type":"Feature","properties":{"osm_type":"W","osm_id":6949048,"extent":[5.3896314,51.68553,5.3907,51.6845664],"country":"Netherlands","osm_key":"highway","city":"Berlicum","countrycode":"NL","osm_value":"residential","postcode":"5258 CC","name":"Berlingenweg","state":"North Brabant","type":"street"}},{"geometry":{"coordinates":[5.1908264,52.0643749],"type":"Point"},"type":"Feature","properties":{"osm_id":2863059984,"country":"Netherlands","city":"Bunnik","countrycode":"NL","postcode":"3981LB","locality":"De Twaalf Apostelen","type":"house","osm_type":"N","osm_key":"office","housenumber":"20","street":"Regulierenring","osm_value":"company","name":"berlin packaging","state":"Utrecht"}},{"geometry":{"coordinates":[4.5118874,52.2235089],"type":"Point"},"type":"Feature","properties":{"osm_type":"W","osm_id":895720549,"extent":[4.5118708,52.2236448,4.5120613,52.2234932],"country":"Netherlands","osm_key":"highway","city":"Sassenheim","countrycode":"NL","osm_value":"service","postcode":"2171 MG","name":"Berline","state":"South Holland","type":"street"}},{"geometry":{"coordinates":[5.9872751,51.2009962],"type":"Point"},"type":"Feature","properties":{"osm_id":4779452071,"country":"Netherlands","city":"Roermond","countrycode":"NL","postcode":"6041TP","locality":"Willem-Alexander","type":"house","osm_type":"N","osm_key":"shop","housenumber":"518","street":"Stadsweide","osm_value":"fashion_accessories","name":"Liebeskind Berlin","state":"Limburg"}},{"geometry":{"coordinates":[5.0958033,51.5781666],"type":"Point"},"type":"Feature","properties":{"osm_id":459901960,"extent":[5.0957509,51.5786052,5.0959584,51.5777604],"country":"Netherlands","city":"Tilburg","countrycode":"NL","postcode":"5012 BT","locality":"Quirijnstok","type":"street","osm_type":"W","osm_key":"highway","district":"Noord","osm_value":"residential","name":"Berlinstraat","state":"North Brabant"}},{"geometry":{"coordinates":[5.3880624,51.6848814],"type":"Point"},"type":"Feature","properties":{"osm_type":"W","osm_id":6948989,"extent":[5.3870948,51.6855971,5.3896314,51.6845664],"country":"Netherlands","osm_key":"highway","city":"Berlicum","countrycode":"NL","osm_value":"residential","postcode":"5258 CD","name":"Berlingenweg","state":"North Brabant","type":"street"}},{"geometry":{"coordinates":[5.0452757,52.1058373],"type":"Point"},"type":"Feature","properties":{"osm_id":31306954,"extent":[5.0452757,52.1058373,5.0463927,52.1053591],"country":"Netherlands","city":"Utrecht","countrycode":"NL","postcode":"3543 CN","locality":"Terwijde","type":"street","osm_type":"W","osm_key":"highway","district":"Leidsche Rijn","osm_value":"residential","name":"Irving Berlinhof","state":"Utrecht"}},{"geometry":{"coordinates":[4.7980788,52.4771795],"type":"Point"},"type":"Feature","properties":{"osm_type":"W","osm_id":6606110,"extent":[4.79794,52.4774521,4.798353,52.4765895],"country":"Netherlands","osm_key":"highway","city":"Zaandijk","countrycode":"NL","osm_value":"residential","postcode":"1544 LC","name":"Irving Berlinstraat","state":"North Holland","type":"street"}},{"geometry":{"coordinates":[4.7986101,52.476033],"type":"Point"},"type":"Feature","properties":{"osm_type":"W","osm_id":1311368716,"extent":[4.7985896,52.4760788,4.7986464,52.4759503],"country":"Netherlands","osm_key":"highway","city":"Zaandijk","countrycode":"NL","osm_value":"residential","postcode":"1544 LE","name":"Irving Berlinstraat","state":"North Holland","type":"street"}},{"geometry":{"coordinates":[4.798476,52.476329],"type":"Point"},"type":"Feature","properties":{"osm_type":"W","osm_id":6606005,"extent":[4.798353,52.4765895,4.7985896,52.4760788],"country":"Netherlands","osm_key":"highway","city":"Zaandijk","countrycode":"NL","osm_value":"residential","postcode":"1544 NZ","name":"Irving Berlinstraat","state":"North Holland","type":"street"}},{"geometry":{"coordinates":[5.6494325,53.2429762],"type":"Point"},"type":"Feature","properties":{"osm_type":"N","osm_id":659203572,"country":"Netherlands","osm_key":"highway","city":"Berltsum","street":"Hôfsleane","countrycode":"NL","osm_value":"bus_stop","postcode":"9041 AL","name":"Berlingahiem","state":"Frisia","type":"house"}}],"type":"FeatureCollection"}
When i run this I get nothing
pry(main)> Point.last
D, [2025-05-20T12:46:34.699838 #482] DEBUG -- : Point Load (81.9ms) SELECT "points".* FROM "points" ORDER BY "points"."id" DESC LIMIT $1 [["LIMIT", 1]]
=> #<Point:0x000014dc49177e58
id: 1160968,
battery_status: "unknown",
ping: nil,
battery: nil,
tracker_id: "Test-A",
topic: nil,
altitude: 245,
longitude: nil,
velocity: "0",
trigger: nil,
bssid: nil,
ssid: "unknown",
connection: nil,
vertical_accuracy: 13,
accuracy: 7,
timestamp: 1747737001,
latitude: nil,
mode: nil,
inrids: [],
in_regions: [],
raw_data:
{"type" => "Feature", "geometry" => {"type" => "Point", "coordinates" => [X.XXXX, X.XXX]}, "properties" => {"wifi" => "unknown", "speed" => 0, "course" => 0, "altitude" => 245.51123021125795, "device_id" => "Test-A", "timestamp" => "2025-05-20T12:30:01.654219+02:00", "battery_level" => 0, "battery_state" => "unknown", "course_accuracy" => 0, "vertical_accuracy" => 13, "significant_change" => "unknown", "horizontal_accuracy" => 7}},
import_id: nil,
city: nil,
country: nil,
created_at: "2025-05-20 12:30:01.718110000 +0200",
updated_at: "2025-05-20 12:30:01.718110000 +0200",
user_id: 1,
geodata: {},
visit_id: nil,
reverse_geocoded_at: nil,
course: 0.0,
course_accuracy: 0.0,
external_track_id: nil,
lonlat: [FILTERED],
country_id: nil>
pry(main)> Geocoder.search([point.latitude, point.longitude])
=> []
When i exec into both dawarich containers I run this
docker exec dawarich sh -c 'wget -O- "${PHOTON_API_HOST}/api?q=berlin"'
Connecting to 192.168.1.4:2322 (192.168.1.4:2322)
- 100% |********************************| 4953 0:00:00 ETA
written to stdout
{"features":[{"geometry":{"coordinates":[-68.2690227,12.1491494],"type":"Point"},"type":"Feature","properties":{"osm_id":25881928,"extent":[-68.2692939,12.1497472,-68.268989,12.1478635],"country":"Nederland","city":"Kralendijk","countrycode":"NL","postcode":"0000 BQ","type":"street","osm_type":"W","osm_key":"highway","district":"Sabana","osm_value":"residential","name":"Kaya Berlin","state":"Nederland"}},{"geometry":{"coordinates":[-63.0372159,18.0506746],"type":"Point"},"type":"Feature","properties":{"osm_type":"W","osm_id":526000558,"extent":[-63.0373916,18.05118,-63.0367493,18.0506044],"country":"Nederland","osm_key":"highway","city":"Lower Prince's Quarter","countrycode":"NL","district":"Belvedere","osm_value":"residential","name":"Berlin Drive","state":"Sint Maarten","type":"street"}},{"geometry":{"coordinates":[4.511262,52.2229467],"type":"Point"},"type":"Feature","properties":{"osm_type":"W","osm_id":7432784,"extent":[4.5103068,52.2234932,4.5118708,52.2221708],"country":"Nederland","osm_key":"highway","city":"Sassenheim","countrycode":"NL","osm_value":"residential","postcode":"2171 ME","name":"Berline","state":"Zuid-Holland","type":"street"}},{"geometry":{"coordinates":[5.39011,51.68516],"type":"Point"},"type":"Feature","properties":{"osm_type":"W","osm_id":6949048,"extent":[5.3896314,51.68553,5.3907,51.6845664],"country":"Nederland","osm_key":"highway","city":"Berlicum","countrycode":"NL","osm_value":"residential","postcode":"5258 CC","name":"Berlingenweg","state":"Noord-Brabant","type":"street"}},{"geometry":{"coordinates":[4.5118874,52.2235089],"type":"Point"},"type":"Feature","properties":{"osm_type":"W","osm_id":895720549,"extent":[4.5118708,52.2236448,4.5120613,52.2234932],"country":"Nederland","osm_key":"highway","city":"Sassenheim","countrycode":"NL","osm_value":"service","postcode":"2171 MG","name":"Berline","state":"Zuid-Holland","type":"street"}},{"geometry":{"coordinates":[5.0958033,51.5781666],"type":"Point"},"type":"Feature","properties":{"osm_id":459901960,"extent":[5.0957509,51.5786052,5.0959584,51.5777604],"country":"Nederland","city":"Tilburg","countrycode":"NL","postcode":"5012 BT","locality":"Quirijnstok","type":"street","osm_type":"W","osm_key":"highway","district":"Noord","osm_value":"residential","name":"Berlinstraat","state":"Noord-Brabant"}},{"geometry":{"coordinates":[5.3880624,51.6848814],"type":"Point"},"type":"Feature","properties":{"osm_type":"W","osm_id":6948989,"extent":[5.3870948,51.6855971,5.3896314,51.6845664],"country":"Nederland","osm_key":"highway","city":"Berlicum","countrycode":"NL","osm_value":"residential","postcode":"5258 CD","name":"Berlingenweg","state":"Noord-Brabant","type":"street"}},{"geometry":{"coordinates":[5.0452757,52.1058373],"type":"Point"},"type":"Feature","properties":{"osm_id":31306954,"extent":[5.0452757,52.1058373,5.0463927,52.1053591],"country":"Nederland","city":"Utrecht","countrycode":"NL","postcode":"3543 CN","locality":"Terwijde","type":"street","osm_type":"W","osm_key":"highway","district":"Leidsche Rijn","osm_value":"residential","name":"Irving Berlinhof","state":"Utrecht"}},{"geometry":{"coordinates":[4.7980788,52.4771795],"type":"Point"},"type":"Feature","properties":{"osm_type":"W","osm_id":6606110,"extent":[4.79794,52.4774521,4.798353,52.4765895],"country":"Nederland","osm_key":"highway","city":"Zaandijk","countrycode":"NL","osm_value":"residential","postcode":"1544 LC","name":"Irving Berlinstraat","state":"Noord-Holland","type":"street"}},{"geometry":{"coordinates":[4.7986101,52.476033],"type":"Point"},"type":"Feature","properties":{"osm_type":"W","osm_id":1311368716,"extent":[4.7985896,52.4760788,4.7986464,52.4759503],"country":"Nederland","osm_key":"highway","city":"Zaandijk","countrycode":"NL","osm_value":"residential","postcode":"1544 LE","name":"Irving Berlinstraat","state":"Noord-Holland","type":"street"}},{"geometry":{"coordinates":[4.798476,52.476329],"type":"Point"},"type":"Feature","properties":{"osm_type":"W","osm_id":6606005,"extent":[4.798353,52.4765895,4.7985896,52.4760788],"country":"Nederland","osm_key":"highway","city":"Zaandijk","countrycode":"NL","osm_value":"residential","postcode":"1544 NZ","name":"Irving Berlinstraat","state":"Noord-Holland","type":"street"}},{"geometry":{"coordinates":[5.6494325,53.2429762],"type":"Point"},"type":"Feature","properties":{"osm_type":"N","osm_id":659203572,"country":"Nederland","osm_key":"highway","city":"Berltsum","street":"Hôfsleane","countrycode":"NL","osm_value":"bus_stop","postcode":"9041 AL","name":"Berlingahiem","state":"Fryslân","type":"house"}},{"geometry":{"coordinates":[4.7983053,52.4759106],"type":"Point"},"type":"Feature","properties":{"osm_type":"N","osm_id":700180662,"country":"Nederland","osm_key":"highway","city":"Zaandijk","street":"John Lennonstraat","countrycode":"NL","osm_value":"bus_stop","postcode":"1544 LH","name":"Irving Berlinstraat","state":"Noord-Holland","type":"house"}}],"type":"FeatureCollection"}#
So I know the containers are speaking, they are in the same docker bridge network...however when I pull geodata in the webui via the jobs page, no geodata gets pulled for anything. I don't know what else to do.
I even switched to the custom tonsnoei/docker-photon:latest image recommended to no aval. Please assist. And thank you for this wonderful project you took on yourself.