Comments (14)
Yeah, it is logged to standard out.
from server.
Thanks. I get noting after podman gotify
.
I'm running 2.4.0, started by:
podman run --replace --name=gotify -d \
-e TZ=$GLOBAL_TZ \
--pod $PODNAME \
--net $NETWORKSTRING \
-v $GOTIFY_DIR/data:/app/data \
-p $GOTIFY_PORT:80 \
docker.io/gotify/server:latest
Am I missing something?
from server.
Probably something like
podman logs gotify
See podman documentation.
from server.
sorry, that's what I meant by podman gotify
: it was actually podman logs gotify
!
Upon further inspection, I just realised podman logs
is not returning any output for any of my containers. So the issue seems to be with podman.
from server.
sorry. that's no true. some containers don't seem to show anything when I do podman logs
, but others do.
$ podman logs whoami
2023/10/26 18:43:39 Starting up on port 80
2023/10/26 18:43:44 Starting up on port 80
2023/10/31 22:45:31 Starting up on port 80
from server.
Works for me.
$ sudo podman run --name=gotify -d -v ~/src/playground/gotify/data:/app/data -p 80:80 docker.io/gotify/server:latest
c8ff083e03947a4febb146ba456c2662cb1c3a86158b641c46fe1a91660aa46f
$ sudo podman logs gotify
Starting Gotify version 2.4.0@2023-09-17-08:24:00
Started Listening for plain HTTP connection on :80
2023-11-01T13:28:32Z | 200 | 291.416µs | 10.88.0.1 | GET "/"
2023-11-01T13:28:32Z | 200 | 1.994447ms | 10.88.0.1 | GET "/static/css/2.0f3898ba.chunk.css"
2023-11-01T13:28:32Z | 200 | 2.719047ms | 10.88.0.1 | GET "/static/js/main.f445756e.chunk.js"
2023-11-01T13:28:32Z | 200 | 25.122091ms | 10.88.0.1 | GET "/static/js/2.a296d629.chunk.js"
2023-11-01T13:28:32Z | 401 | 218.017µs | 10.88.0.1 | GET "/current/user"
Error #01: you need to provide a valid access token or user credentials to access this api
2023-11-01T13:28:32Z | 200 | 118.385µs | 10.88.0.1 | GET "/static/media/roboto-latin-400.176f8f5b.woff2"
2023-11-01T13:28:32Z | 200 | 77.77µs | 10.88.0.1 | GET "/static/media/roboto-latin-500.f5b74d7f.woff2"
2023-11-01T13:28:33Z | 200 | 89.05µs | 10.88.0.1 | GET "/static/favicon-196x196.png"
2023-11-01T13:28:33Z | 200 | 11.282µs | 10.88.0.1 | GET "/static/favicon-16x16.png"
2023-11-01T13:28:33Z | 401 | 163.158µs | 10.88.0.1 | GET "/client"
Error #01: you need to provide a valid access token or user credentials to access this api
2023-11-01T13:28:33Z | 401 | 145.957µs | 10.88.0.1 | GET "/current/user"
Error #01: you need to provide a valid access token or user credentials to access this api
2023-11-01T13:28:33Z | 401 | 20.783µs | 10.88.0.1 | GET "/client"
Error #01: you need to provide a valid access token or user credentials to access this api
from server.
thank you. what podman version are you running? I've tried to run 4.6.2 as root and rootless (the reason I use podman instead of docker in the first place) with no luck.
from server.
$ podman version
Client: Podman Engine
Version: 4.7.1
API Version: 4.7.1
Go Version: go1.21.1
Git Commit: ef83eeb9c7482826672f3efa12db3d61c88df6c4-dirty
Built: Fri Oct 6 11:12:34 2023
OS/Arch: linux/amd64
Is the gotify container running podman ps
?
from server.
yes. I can send messages to it and all. unfortunately I'm running ubuntu 22.04 and have the kubic repo so I can get to podman 4...
$ podman version
Client: Podman Engine
Version: 4.6.2
API Version: 4.6.2
Go Version: go1.18.1
Built: Thu Jan 1 10:00:00 1970
OS/Arch: linux/amd64
from server.
Could you try run'ning the gotify image with --log-driver json-file
? E.g.
podman run --replace --name=gotify -d -v ~/src/playground/gotify/data:/app/data -p 80:80 --log-driver json-file docker.io/gotify/server:latest
and verify if the log works?
from server.
It does! Thank you!
$ podman logs gotify
Starting Gotify version 2.4.0@2023-09-17-08:24:00
Started Listening for plain HTTP connection on :80
2023-11-05T09:02:04+11:00 | 200 | 83.895571ms | 192.168.0.205 | GET "/"
2023-11-05T09:02:05+11:00 | 200 | 204.585058ms | 192.168.0.205 | GET "/static/css/2.0f3898ba.chunk.css"
2023-11-05T09:02:05+11:00 | 200 | 203.380579ms | 192.168.0.205 | GET "/static/js/main.f445756e.chunk.js"
2023-11-05T09:02:05+11:00 | 200 | 382.025282ms | 192.168.0.205 | GET "/static/js/2.a296d629.chunk.js"
2023-11-05T09:02:06+11:00 | 200 | 523.037µs | 192.168.0.205 | GET "/static/favicon-196x196.png"
2023-11-05T09:02:06+11:00 | 200 | 140.473µs | 192.168.0.205 | GET "/static/favicon-16x16.png"
from server.
I know this is a podman question, but do you know a way to have the logs written to a file at a specific location?
Executing podman inspect --format='{{.HostConfig.LogConfig.Path}}' gotify
gives me a ctr.log file under $HOME/.local/share/containers/storage/overlay-containers//userdata. The problem is my container id will change from time to time and I need it to be on a predictable location.
from server.
To summarize the original problem, podman isn't able to log into the default log-driver (probably journald) this could be because of the rootless execution and missing permissions.
See podman docs for your question: https://docs.podman.io/en/latest/markdown/podman-run.1.html#log-opt-name-value
from server.
Thank you! To summarise the solution:
podman run --replace --name=gotify -d -v ~/path/to/gotify/data/on/host:/app/data -p 80:80 --log-driver json-file --log-opt path=/path/to/gotify.log docker.io/gotify/server:latest
from server.
Related Issues (20)
- A proposal of access control HOT 1
- WebSocket connection closed, trying again in 30 seconds. HOT 1
- tailscale notifications via webhooks HOT 4
- the ability to turn off push notifications in server HOT 3
- request to add app icon left to name in webui HOT 1
- Message to many users possible? HOT 1
- build problem HOT 5
- JavaScript say unable to verify the first certificate','name' HOT 4
- ability to have webUI and API on different ports HOT 4
- add new plaform at release linux_mipsle
- How to Setup Nginx to use with Nginx Proxy Manager HOT 1
- Anybody had any luck with cloudflared? HOT 2
- [PEBCAK] is there a way to capture 403 errors in the logs? HOT 2
- Windows Application for Gotify HOT 1
- yarn编译报错 HOT 10
- can git submodule add web source build files HOT 1
- Push notifications for specific user / group of users HOT 2
- Is there any way to automatically enable plugins after container restart? HOT 2
- Windows server command line options HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from server.