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

`docker service logs` hangs with non-json logging driver #28793

Open
friism opened this Issue Nov 24, 2016 · 10 comments

Comments

Projects
None yet
8 participants
@friism
Contributor

friism commented Nov 24, 2016

Description

Service logs only works with json-file and journald drivers (fine). Running `docker service logs will just hang.

Describe the results you received:

Docker cli hangs

Describe the results you expected:

Error saying that docker service logs is not supported for this service since it uses a log driver that doesn't support that.

Output of docker version:

 $ docker version
Client:
 Version:      1.13.0-rc2
 API version:  1.25
 Go version:   go1.7.3
 Git commit:   1f9b3ef
 Built:        Wed Nov 23 17:40:58 2016
 OS/Arch:      linux/amd64

Server:
 Version:             1.13.0-rc2
 API version:         1.25
 Minimum API version: 1.12
 Go version:          go1.7.3
 Git commit:          1f9b3ef
 Built:               Wed Nov 23 17:40:58 2016
 OS/Arch:             linux/amd64
 Experimental:        true

Additional environment details (AWS, VirtualBox, physical, etc.):

Docker for AWS

@boaz1337

This comment has been minimized.

Show comment
Hide comment
@boaz1337

boaz1337 Jan 10, 2017

Member

@thaJeztah was this resolved? if not, can i call dibs?

Member

boaz1337 commented Jan 10, 2017

@thaJeztah was this resolved? if not, can i call dibs?

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Jan 10, 2017

Member

not sure actually - could you try if it's still an issue?

Member

thaJeztah commented Jan 10, 2017

not sure actually - could you try if it's still an issue?

@boaz1337

This comment has been minimized.

Show comment
Hide comment
@boaz1337

boaz1337 Jan 10, 2017

Member

@thaJeztah it seems like it hasn't been fixed yet.
What I did was:

  1. Setup two Docker hosts
  2. Run docker swarm init on one of them
  3. Run on the other one the docker swarm join --token... command
  4. Created a new service and set gelf as the logging driver
  5. Verified the service is running by docker service ls and docker ps.
  6. Run docker service logs <service-name>.

Did I miss something?

Thanks.

Member

boaz1337 commented Jan 10, 2017

@thaJeztah it seems like it hasn't been fixed yet.
What I did was:

  1. Setup two Docker hosts
  2. Run docker swarm init on one of them
  3. Run on the other one the docker swarm join --token... command
  4. Created a new service and set gelf as the logging driver
  5. Verified the service is running by docker service ls and docker ps.
  6. Run docker service logs <service-name>.

Did I miss something?

Thanks.

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah
Member

thaJeztah commented Jan 10, 2017

ping @aluzzardi

@aluzzardi aluzzardi assigned dperny and unassigned aluzzardi Jan 31, 2017

@aluzzardi

This comment has been minimized.

Show comment
Hide comment
@aluzzardi

aluzzardi Feb 16, 2017

Member

@thaJeztah @dperny is looking into this

Member

aluzzardi commented Feb 16, 2017

@thaJeztah @dperny is looking into this

@dperny

This comment has been minimized.

Show comment
Hide comment
@dperny

dperny Feb 16, 2017

Contributor

I'm actively working on this right now, actually, it's my current P1.

Contributor

dperny commented Feb 16, 2017

I'm actively working on this right now, actually, it's my current P1.

@dperny dperny referenced this issue Mar 8, 2017

Closed

Make Docker Service Logs GA #31399

7 of 12 tasks complete
@dperny

This comment has been minimized.

Show comment
Hide comment
@dperny

dperny Mar 8, 2017

Contributor

Hey @friism it's likely that I accidentally fixed this as part of docker/swarmkit#1973, which should be vendored in #31535.

However, I don't know if I have access to a system that supports nonstandard log drivers, and I don't know how hard it is to set that up. If it's a quick thing, could you verify on master that this hang is resolved?

If it's not a quick thing, would you let me know and I'll spend the time verifying this myself?

The problem I fixed there is that logs would hang if the agent had no log messages to report, which I believe is what was causing this hang. The fact that no error is reported is a separate issue.

Contributor

dperny commented Mar 8, 2017

Hey @friism it's likely that I accidentally fixed this as part of docker/swarmkit#1973, which should be vendored in #31535.

However, I don't know if I have access to a system that supports nonstandard log drivers, and I don't know how hard it is to set that up. If it's a quick thing, could you verify on master that this hang is resolved?

If it's not a quick thing, would you let me know and I'll spend the time verifying this myself?

The problem I fixed there is that logs would hang if the agent had no log messages to report, which I believe is what was causing this hang. The fact that no error is reported is a separate issue.

@friism

This comment has been minimized.

Show comment
Hide comment
@friism

friism Mar 9, 2017

Contributor

@dperny I'm only testing on Docker for AWS which uses a non-standard logging driver. I cannot easily switch out the docker daemon, however. Creating a machine with docker-machine and switching the logging driver should be simple though: https://docs.docker.com/engine/admin/logging/overview/#configure-the-default-logging-driver-for-the-docker-daemon

Contributor

friism commented Mar 9, 2017

@dperny I'm only testing on Docker for AWS which uses a non-standard logging driver. I cannot easily switch out the docker daemon, however. Creating a machine with docker-machine and switching the logging driver should be simple though: https://docs.docker.com/engine/admin/logging/overview/#configure-the-default-logging-driver-for-the-docker-daemon

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Mar 27, 2017

Contributor

This is still an issue for me with 17.04-ce-rc1

Contributor

nathanleclaire commented Mar 27, 2017

This is still an issue for me with 17.04-ce-rc1

@nathanleclaire

This comment has been minimized.

Show comment
Hide comment
@nathanleclaire

nathanleclaire Mar 27, 2017

Contributor

I don't know if I have access to a system that supports nonstandard log drivers

@dperny Maybe you could just set the --log-driver for the daemon to none?

Contributor

nathanleclaire commented Mar 27, 2017

I don't know if I have access to a system that supports nonstandard log drivers

@dperny Maybe you could just set the --log-driver for the daemon to none?

@thaJeztah thaJeztah removed this from Backlog / undecided in 1.13-rcX Dec 27, 2017

@thaJeztah thaJeztah removed this from the 1.13.0 milestone Dec 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment