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

Consul service panics on journalctl restart #2404

Closed
xytis opened this issue Oct 8, 2016 · 4 comments
Closed

Consul service panics on journalctl restart #2404

xytis opened this issue Oct 8, 2016 · 4 comments
Labels
type/bug Feature does not function as expected type/crash The issue description contains a golang panic and stack trace
Milestone

Comments

@xytis
Copy link

xytis commented Oct 8, 2016

The same vulnerability as with docker: moby/moby#19728

consul version for Client

Client: Consul v0.6.3

consul info for Client

Client:

agent:
    check_monitors = 0
    check_ttls = 0
    checks = 1
    services = 1
build:
    prerelease =
    revision = c933efde
    version = 0.6.3
consul:
    known_servers = 5
    server = false
runtime:
    arch = amd64
    cpu_count = 24
    goroutines = 48
    max_procs = 2
    os = linux
    version = go1.5.3
serf_lan:
    encrypted = false
    event_queue = 0
    event_time = 62
    failed = 0
    intent_queue = 0
    left = 0
    member_time = 601
    members = 34
    query_queue = 0
    query_time = 1

Description of the Issue (and unexpected/desired result)

consul daemon restarts when journald is restarted

Reproduction steps

systemctl restart systemd-journald.service

@rbjorklin
Copy link

rbjorklin commented Oct 31, 2016

We've also encountered this problem. Not sure if it matters but we've been running consul as a service too.

[Unit]
Description=replicated key—value store
After=network-online.target
[Service]
User=consul
ExecStart=/usr/local/bin/consul agent -config-file /etc/consul.d/config.json
KillSignal=SIGINT
[Install]
WantedBy=default.target

EDIT:

# /usr/local/bin/consul version
Consul v0.6.4
Consul Protocol: 3 (Understands back to: 1)

@rbjorklin
Copy link

Reading through the thread over at the Docker project this issue might have been resolved in Consul >= 0.7.0 because Consul was built with golang >= 1.6. #1963

Will try this out and report back.

@xytis
Copy link
Author

xytis commented Oct 31, 2016

In addition to golang update such line has to exist:
hashicorp/nomad#1798
(hashicorp/nomad@3a4bb56)

@slackpad slackpad added type/crash The issue description contains a golang panic and stack trace type/bug Feature does not function as expected labels Nov 30, 2016
@slackpad slackpad added this to the 0.7.2 milestone Nov 30, 2016
mckennajones added a commit to mckennajones/consul that referenced this issue Nov 30, 2016
@mckennajones
Copy link
Contributor

Was unable to reproduce the issue on consul version 0.7.0. However, it still seems like a good idea to add the code that ignores sigpipe signals, so I created a quick PR.

jen20 added a commit to jen20/consul that referenced this issue Apr 11, 2018
Calling twice appears to have no adverse effects, however serves to
confuse as to what the semantics of such code may be! This seems like it
was probably introduced while resolving conflicts during the merge of
the fix for hashicorp#2404.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Feature does not function as expected type/crash The issue description contains a golang panic and stack trace
Projects
None yet
Development

No branches or pull requests

4 participants