Comments (3)
One more thing I tried is edit docker-stack.yml to include
logging:
driver: journald
Then run this command:
$ journalctl -u docker CONTAINER_NAME=db
As described here:
https://stackoverflow.com/questions/43663013/access-logs-of-a-killed-docker-container/43663253
It tells me:
-- Logs begin at Mon 2018-11-12 21:37:13 CET, end at Thu 2018-12-27 14:15:03 CET. --
-- No entries --
from full-stack.
Found a way to print errors here is a possible solution for anyone else wondering how to do this:
docker service ls // list the services
docker service ps <id>
// shows container id and a truncated error message in second to last column
docker inspect <container id from first column>
| grep Err // print out the error message belonging to the service container
"Err": "no suitable node (scheduling constraints not satisfied on 1 node)"
Running these commands no longer requires enabling experimental docker features, it works by default
from full-stack.
Sorry for the delay.
When you create a Docker Swarm mode stack, all the "services" get a name prefixed by the stack name.
So, if you create a stack my-super-app-com
, your backend
service will be named my-super-app-com_backend
.
Then you can see the logs with:
docker service logs my-super-app-com_backend
To see only the last 100 logs:
docker service logs my-super-app-com_backend --tail=100
To see only the last 100 logs and keep showing any new logs live, "following" the logs:
docker service logs my-super-app-com_backend --tail=100 -f
(This last one is what I use the most).
from full-stack.
Related Issues (16)
- backports.functools_lru_cache HOT 1
- Localhost login error after running Pytest HOT 13
- Cannot create container for service proxy: b'Mount denied:\nThe source path "\\\\var\\\\run\\\\docker.sock:/var/run/docker.sock"\nis not a valid Windows path' HOT 2
- How to setup Flask-Admin HOT 5
- Request: more documentation for configuring/setting up tasks HOT 4
- Flower not showing tasks/workers in development HOT 5
- apispec marshmellow error when attempting to run app via manage.py HOT 2
- Expected username password for pgAdmin4 on startup after first docker-compose up HOT 5
- Modify the existing nginx configuration, including an additional nginx module HOT 3
- FastAPI - Python 3.7 - Nginx - Angular - MariaDB - Docker HOT 6
- How to add Websockets HOT 4
- Traefik on Swarm deploy HOT 4
- backend app won't start HOT 1
- Compose file invalid when running `docker-compose up -d` HOT 2
- Error after running docker-compose up -d HOT 11
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 full-stack.