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

No logs in Docker output #426

Closed
mbrennan opened this issue Oct 16, 2023 · 5 comments
Closed

No logs in Docker output #426

mbrennan opened this issue Oct 16, 2023 · 5 comments
Labels

Comments

@mbrennan
Copy link

Hello,

I was able to get the Recorder to successfully connect to my broker after struggling for quite some time. It turned out the problem was I am using the websockets protocol on my Mosquitto broker which was not compatible with the Recorder. I opened up another listener on a different port in Mosquitto with protocol 'mosquito' and had the Recorder connect to the new listener. This seemed to connect successfully as I can see output in the mosquitto logs for my Recorder user and running ocat --list shows: {"results":["me"]}

However, I still don't see any data in my Recorder when I visit the web interface and look at the table. I tried to see if there are any interesting things in the log in the Recorder but the log is empty. When I run the recorder from the Docker image's command line directly, I can see some output but all seems well. I don't know why I can't see the output in the Docker log (the logs work fine for the 43 other containers I'm running.

How can I get the Recorder to output the logs correctly to stdout? It seems like it has something to do with the --logfacility switch. Why can't I see any data in my Recorder?

@mbrennan mbrennan changed the title No logs in Docker output nad no data in Recorder No logs in Docker output and no data in Recorder Oct 16, 2023
@jpmens
Copy link
Member

jpmens commented Oct 24, 2023

Thanks for your report. I see we caused this issue in #398 when we checked isatty in order to determine whether a console is available to avoid duplicate log output.

@jpmens jpmens added the bug label Oct 24, 2023
@jpmens
Copy link
Member

jpmens commented Oct 24, 2023

Regarding the missing data: could you please launch the container with a console docker run ... -it, publish a location, and report what you see on the console?

jpmens added a commit that referenced this issue Oct 24, 2023
- FIX: logs to stderr if DOCKER_RUNNING in environment (#426)
- FIX: typo in help descriptions (#423)
- NEW: Updated Google Timeline Import script (#407)
- UPD: Improve GPX-Import (#413)
- FIX: Table of Locations sorting issue (#415)
jpmens added a commit that referenced this issue Oct 24, 2023
- FIX: logs to stderr if DOCKER_RUNNING in environment (#426)
- FIX: typo in help descriptions (#423)
- NEW: Updated Google Timeline Import script (#407)
- UPD: Improve GPX-Import (#413)
- FIX: Table of Locations sorting issue (#415)
jpmens added a commit to owntracks/docker-recorder that referenced this issue Oct 24, 2023
  the Recorder code will check this and if it's set use
  openlog(LOG_PERROR) for stderr messages

  addresses owntracks/recorder#426
@jpmens
Copy link
Member

jpmens commented Oct 24, 2023

We have released ot-recorder version 0.9.5 and docker images have been published which hopefully solve the issue with the logs; docker logs should now show the Recorder's log, including startup messages.

@jpmens
Copy link
Member

jpmens commented Oct 24, 2023

0.9.6 is out.

@jpmens jpmens changed the title No logs in Docker output and no data in Recorder No logs in Docker output Oct 24, 2023
@jpmens
Copy link
Member

jpmens commented Oct 24, 2023

I am closing this now as this issue concerns mainly docker logging.

Please open a new issue if you require help with "missing data". Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants