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

cannot connect to itself panic on weave launch (using coreOS 1122.2.0) #2527

Closed
girishramnani opened this issue Sep 25, 2016 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@girishramnani
Copy link

girishramnani commented Sep 25, 2016

Hi,
I have one coreOS 1122.2.0 running on azure ( private ip 10.0.2.5).
I am trying to detect other machines having weave running on them using weave discovery.
i am starting weave using a systemd unit file (user data) but it panics.
This is the log.

db4e6f647ffb: Pull complete
Sep 24 07:39:41 girish weave[1657]: Digest: sha256:fcc8f2cd41bb6cf5d8649f29512254b9b6b1d907bfe268b81875577edf285c42
Sep 24 07:39:41 girish weave[1657]: Status: Downloaded newer image for weaveworks/weavedb:latest
Sep 24 07:39:49 girish systemd[1]: Started Weave Network.
Sep 24 07:39:57 girish docker[2513]: INFO: 2016/09/24 07:39:57.156428 ->[0.0.0.0:6783] attempting connection
Sep 24 07:39:57 girish docker[2513]: INFO: 2016/09/24 07:39:57.156581 ->[127.0.0.1:60787] connection accepted
Sep 24 07:39:57 girish docker[2513]: INFO: 2016/09/24 07:39:57.157311 ->[127.0.0.1:6783|26:5f:60:b9:cc:7f(girish)]:  connection shutting down due to error: cannot connect to ourself
Sep 24 07:39:57 girish docker[2513]: panic: runtime error: invalid memory address or nil pointer dereference
Sep 24 07:39:57 girish docker[2513]: [signal 0xb code=0x1 addr=0x0 pc=0x550aa3]
Sep 24 07:39:57 girish docker[2513]: goroutine 24 [running]:

when i stop the unit file and run weave directly it starts without any problem.

This is the unit file

[Unit]
Description=Weave Network
Documentation=https://weave.works/
After=docker.service
Requires=docker.service
After=install-weave.service
Requires=install-weave.service

[Service]
Environment="WEAVE_DOCKER_ARGS=--env='LOGSPOUT=ignore'"
ExecStartPre=/opt/bin/weave launch --http-addr 0.0.0.0:6784
ExecStart=/usr/bin/docker attach weave
ExecStop=/opt/bin/weave stop

[Install]
WantedBy=multi-user.target
@rade rade added this to the 1.7.0 milestone Sep 25, 2016
@rade rade added the bug label Sep 25, 2016
@rade
Copy link
Member

rade commented Sep 25, 2016

I can reproduce this with weave launch 0.0.0.0. Full stack trace is

github.com/weaveworks/weave/vendor/github.com/weaveworks/mesh.(*connectionMaker).connectionTerminated.func1(0xc8223f1f08)
    /go/src/github.com/weaveworks/weave/vendor/github.com/weaveworks/mesh/connection_maker.go:195 +0x103
github.com/weaveworks/weave/vendor/github.com/weaveworks/mesh.(*connectionMaker).queryLoop(0xc820014c60, 0xc820014c00)
    /go/src/github.com/weaveworks/weave/vendor/github.com/weaveworks/mesh/connection_maker.go:224 +0xf4
created by github.com/weaveworks/weave/vendor/github.com/weaveworks/mesh.newConnectionMaker
    /go/src/github.com/weaveworks/weave/vendor/github.com/weaveworks/mesh/connection_maker.go:74 +0x24a

Thanks for the report!

@rade
Copy link
Member

rade commented Sep 25, 2016

@girishramnani I doubt the unit file you posted causes the problem; I suspect you probably experimented with command line options in the ExecStartPre, and the unit file in force was somewhat different. Nevertheless, as you see above, I have managed to reproduce this.

@awh awh modified the milestones: 1.7.1, 1.7.0 Sep 27, 2016
@awh awh modified the milestones: 1.7.1, 1.7.2 Oct 5, 2016
@rade rade self-assigned this Oct 6, 2016
@bboreham bboreham self-assigned this Oct 7, 2016
@rade rade closed this as completed in 1abce14 Oct 7, 2016
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

4 participants