Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors in the log: MessageUnknown on NOKEY with id=0 #1958

Open
GD-Dal opened this issue Jan 15, 2025 · 4 comments
Open

Errors in the log: MessageUnknown on NOKEY with id=0 #1958

GD-Dal opened this issue Jan 15, 2025 · 4 comments
Labels
needs-more-info A little more info requested from the submitter

Comments

@GD-Dal
Copy link

GD-Dal commented Jan 15, 2025

Hi
I have connected Owntrack to my DaWarIch, but I see some errors in the log on the phone I cannot explain.
Not sure if this is a DaWarIch problem or a Owntrack problem, though.

Maybe someone else have seen the same error and knows what to to with it?

I [DefaultDispatcher-worker-1] MessageProcessor: Received incoming message: MessageUnknown on NOKEY with id=0
W [DefaultDispatcher-worker-1] MessageProcessor: Unknown message type received

The message seems to occur once per minute

Thanks

@growse
Copy link
Collaborator

growse commented Jan 15, 2025

Message unknown just means that it received a response that it couldn't parse into an OT message.

Any logs from the dawarich side? What happens if you curl POST your dawarich endpoint manually - do you get a JSON response?

@growse growse added the needs-more-info A little more info requested from the submitter label Jan 15, 2025
@GD-Dal
Copy link
Author

GD-Dal commented Jan 16, 2025

Not sure how to form a curl POST, but I tried to:
curl -d "param1=value1&param2=value2" -X POST https://dwi.domain.tld/api/v1, and that seem to return html, not json.

It gives a rather long answer, but it begins with:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="turbo-visit-control" content="reload">
  <title>Action Controller: Exception caught</title>

and ends with:
<!-- END vendor/bundle/ruby/3.3.0/gems/actionpack-8.0.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb -->

I dont' see anything imported from Owntracks in Dawarich, but I see traces of Owntracks in the logs:

18:50:18 web.1  | E, [2025-01-16T18:50:18.519239 #22] ERROR -- :   
18:50:18 web.1  | ActionController::RoutingError (No route matches [POST] "/"):
18:50:18 web.1  |   
18:50:18 web.1  | D, [2025-01-16T18:50:18.578809 #22] DEBUG -- :   Rendering layout vendor/bundle/ruby/3.3.0/gems/actionpack-8.0.1/lib/action_dispatch/middleware/templates/rescues/layout.erb
18:50:18 web.1  | D, [2025-01-16T18:50:18.579060 #22] DEBUG -- :   Rendering vendor/bundle/ruby/3.3.0/gems/actionpack-8.0.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout
18:50:18 web.1  | D, [2025-01-16T18:50:18.704579 #22] DEBUG -- :   Rendering vendor/bundle/ruby/3.3.0/gems/actionpack-8.0.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
18:54:22 web.1  | D, [2025-01-16T18:54:22.064627 #22] DEBUG -- :   User Load (28.7ms)  SELECT "users".* FROM "users" WHERE "users"."api_key" = $1 LIMIT $2  [["api_key", "[FILTERED]"], ["LIMIT", 1]]
18:54:22 web.1  | D, [2025-01-16T18:54:22.064917 #22] DEBUG -- :   ↳ app/controllers/api_controller.rb:16:in `current_api_user'
18:54:22 web.1  | I, [2025-01-16T18:54:22.073072 #22]  INFO -- : Enqueued Owntracks::PointCreatingJob (Job ID: dd86ba1f-257c-47d6-a444-415d2c33c2f8) to Sidekiq(default) with arguments: #<ActionController::Parameters {"_type"=>"location", "BSSID"=>"34:85:84:04:19:57", "SSID"=>"RvN-IoT", "_id"=>"c2714404", "acc"=>100, "alt"=>55, "batt"=>25, "bs"=>1, "cog"=>0, "conn"=>"w", "created_at"=>1737050060, "lat"=>62.4621236, "lon"=>6.257504, "m"=>1, "tid"=>"0s", "topic"=>"owntracks/user/g0s", "tst"=>1737050028, "vac"=>100, "vel"=>0, "api_key"=>"2435153e72e667330016ae4acec2cfa4", "controller"=>"api/v1/owntracks/points", "action"=>"create", "point"=>#<ActionController::Parameters {"topic"=>"owntracks/user/g0s", "created_at"=>1737050060} permitted: true>} permitted: true>, 1
18:54:22 web.1  | I, [2025-01-16T18:54:22.073271 #22]  INFO -- : ↳ app/controllers/api/v1/owntracks/points_controller.rb:5:in `create'
18:54:22 web.1  | I, [2025-01-16T18:54:22.073462 #22]  INFO -- : {"method":"POST","path":"/api/v1/owntracks/points","format":"html","controller":"Api::V1::Owntracks::PointsController","action":"create","status":200,"allocations":4876,"duration":38.5,"view":0.09,"db":33.02}
18:54:22 web.1  | D, [2025-01-16T18:54:22.099359 #22] DEBUG -- :   User Load (0.6ms)  SELECT "users".* FROM "users" WHERE "users"."api_key" = $1 LIMIT $2  [["api_key", "[FILTERED]"], ["LIMIT", 1]]
18:54:22 web.1  | D, [2025-01-16T18:54:22.099861 #22] DEBUG -- :   ↳ app/controllers/api_controller.rb:16:in `current_api_user'
18:54:22 web.1  | I, [2025-01-16T18:54:22.101103 #22]  INFO -- : Enqueued Owntracks::PointCreatingJob (Job ID: 8b7c6d3a-457e-4dc1-8611-505430ae5c7f) to Sidekiq(default) with arguments: #<ActionController::Parameters {"_type"=>"location", "BSSID"=>"34:85:84:04:19:57", "SSID"=>"RvN-IoT", "_id"=>"e54e0e30", "acc"=>100, "alt"=>55, "batt"=>25, "bs"=>1, "cog"=>0, "conn"=>"w", "created_at"=>1737050060, "lat"=>62.4621236, "lon"=>6.257504, "m"=>1, "t"=>"p", "tid"=>"0s", "topic"=>"owntracks/user/g0s", "tst"=>1737050028, "vac"=>100, "vel"=>0, "api_key"=>"2435153e72e667330016ae4acec2cfa4", "controller"=>"api/v1/owntracks/points", "action"=>"create", "point"=>#<ActionController::Parameters {"topic"=>"owntracks/user/g0s", "created_at"=>1737050060} permitted: true>} permitted: true>, 1
18:54:22 web.1  | I, [2025-01-16T18:54:22.101366 #22]  INFO -- : ↳ app/controllers/api/v1/owntracks/points_controller.rb:5:in `create'
18:54:22 web.1  | I, [2025-01-16T18:54:22.101549 #22]  INFO -- : {"method":"POST","path":"/api/v1/owntracks/points","format":"html","controller":"Api::V1::Owntracks::PointsController","action":"create","status":200,"allocations":1275,"duration":3.37,"view":0.09,"db":0.59}

Owntrack claims to be connected to the DaWarIch instance though

@GD-Dal
Copy link
Author

GD-Dal commented Jan 16, 2025

Update: I see a lot of points now that I installed the sidekiq container. That's good :) Didn't know I needed that container as well
But I still see errors, though:

2025-01-16T22:12:01.920Z pid=1 tid=kqp WARN: {"context":"Job raised exception","job":{"retry":true,"queue":"default","wrapped":"Owntracks::PointCreatingJob","args":[{"job_class":"Owntracks::PointCreatingJob","job_id":"87e3cc6b-981a-400a-b65a-c99a81e653f0","provider_job_id":null,"queue_name":"default","priority":null,"arguments":[{"_type":"status","_id":"8a60ab08","android":{"hib":1,"bo":1,"loc":0,"ps":0,"wifi":1,"_aj_hash_with_indifferent_access":true},"topic":"owntracks/user/g0s/status","api_key":"2435153e72e667330016ae4acec2cfa4","controller":"api/v1/owntracks/points","action":"create","point":{"topic":"owntracks/user/g0s/status","_aj_hash_with_indifferent_access":true},"_aj_hash_with_indifferent_access":true},1],"executions":0,"exception_executions":{},"locale":"en","timezone":"Europe/Oslo","enqueued_at":"2025-01-16T17:16:55.153677057Z","scheduled_at":null}],"class":"ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper","jid":"53070b3f5e2de1837fbeffb4","created_at":1737047815.1537192,"enqueued_at":1737065521.9027097,"error_message":"Validation failed: Latitude can't be blank, Longitude can't be blank","error_class":"ActiveRecord::RecordInvalid","failed_at":1737065306.092042,"retry_count":3,"retried_at":1737065400.4620693}}
2025-01-16T22:12:01.920Z pid=1 tid=kqp WARN: ActiveRecord::RecordInvalid: Validation failed: Latitude can't be blank, Longitude can't be blank

What could cause this?

Thanks

@growse
Copy link
Collaborator

growse commented Jan 18, 2025

Not sure - never used dawarich. Might be worth asking in their issue tracker?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-more-info A little more info requested from the submitter
Projects
None yet
Development

No branches or pull requests

2 participants