Repository navigation
Closed
Description
Bug Report
- Concourse version: 3.10.0
- Deployment type (BOSH/Docker/binary): binary via systemd unit, both worker and TSA are running on the same machine
- Infrastructure/IaaS: GCP
- Browser (if applicable): N/A
- Did this used to work? Not sure, first time setting up concourse after those were introduced.
$ concourse land-worker --name concourse
{"timestamp":"1523160334.815049648","source":"land-worker","message":"land-worker.setting-up-beacon-runner","log_level":0,"data":{}}
{"timestamp":"1523160334.815135479","source":"land-worker","message":"land-worker.land-worker","log_level":0,"data":{}}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x59c6a5]
goroutine 6 [running]:
crypto/rsa.(*PrivateKey).Public(0x0, 0xc4200b8868, 0xc420685b28)
/usr/local/go/src/crypto/rsa/rsa.go:92 +0x5
golang.org/x/crypto/ssh.NewSignerFromSigner(0x7f8fe85f8480, 0x0, 0x0, 0x7f8fe85f8480, 0x0, 0x1)
/tmp/build/9674af12/concourse/src/golang.org/x/crypto/ssh/keys.go:681 +0x35
golang.org/x/crypto/ssh.NewSignerFromKey(0x19b4e60, 0x0, 0x197858c, 0xe, 0x2540be400, 0x130a4200)
/tmp/build/9674af12/concourse/src/golang.org/x/crypto/ssh/keys.go:656 +0x163
github.com/concourse/worker/beacon.(*sshClient).Dial(0xc4206373b0, 0x0, 0xc42006fdc8, 0x53b31d, 0xc4204b7418)
/tmp/build/9674af12/concourse/src/github.com/concourse/worker/beacon/client_ssh.go:38 +0x193
github.com/concourse/worker/beacon.(*Beacon).run(0xc4204083c0, 0x1b92da9, 0xb, 0xc4200984e0, 0xc420098540, 0x0, 0x0)
/tmp/build/9674af12/concourse/src/github.com/concourse/worker/beacon/beacon.go:93 +0x5d
github.com/concourse/worker/beacon.(*Beacon).LandWorker(0xc4204083c0, 0xc4200984e0, 0xc420098540, 0x0, 0x0)
/tmp/build/9674af12/concourse/src/github.com/concourse/worker/beacon/beacon.go:89 +0x94
github.com/concourse/worker/beacon.(*Beacon).LandWorker-fm(0xc4200984e0, 0xc420098540, 0x0, 0x0)
/tmp/build/9674af12/concourse/src/github.com/concourse/worker/land/land_runner.go:40 +0x3e
github.com/tedsuo/ifrit.RunFunc.Run(0xc42044bc00, 0xc4200984e0, 0xc420098540, 0x0, 0x0)
/tmp/build/9674af12/concourse/src/github.com/tedsuo/ifrit/runner.go:36 +0x3a
github.com/tedsuo/ifrit.(*process).run(0xc42037f440)
/tmp/build/9674af12/concourse/src/github.com/tedsuo/ifrit/process.go:71 +0x45
created by github.com/tedsuo/ifrit.Background
/tmp/build/9674af12/concourse/src/github.com/tedsuo/ifrit/process.go:49 +0x107
$ concourse retire-worker --name concourse
{"timestamp":"1523160644.815204859","source":"retire-worker","message":"retire-worker.setting-up-beacon-runner","log_level":0,"data":{}}
{"timestamp":"1523160644.815549850","source":"retire-worker","message":"retire-worker.retire-worker","log_level":0,"data":{}}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x59c6a5]
goroutine 7 [running]:
crypto/rsa.(*PrivateKey).Public(0x0, 0xc4200b8868, 0xc420535b28)
/usr/local/go/src/crypto/rsa/rsa.go:92 +0x5
golang.org/x/crypto/ssh.NewSignerFromSigner(0x7fb2b099ec80, 0x0, 0x0, 0x7fb2b099ec80, 0x0, 0x1)
/tmp/build/9674af12/concourse/src/golang.org/x/crypto/ssh/keys.go:681 +0x35
golang.org/x/crypto/ssh.NewSignerFromKey(0x19b4e60, 0x0, 0x197858c, 0xe, 0x2540be400, 0x130a4200)
/tmp/build/9674af12/concourse/src/golang.org/x/crypto/ssh/keys.go:656 +0x163
github.com/concourse/worker/beacon.(*sshClient).Dial(0xc42064b440, 0x0, 0xc42006fdc8, 0x53b31d, 0xc42050f558)
/tmp/build/9674af12/concourse/src/github.com/concourse/worker/beacon/client_ssh.go:38 +0x193
github.com/concourse/worker/beacon.(*Beacon).run(0xc420402640, 0x1b966c6, 0xd, 0xc4200984e0, 0xc420098540, 0x0, 0x0)
/tmp/build/9674af12/concourse/src/github.com/concourse/worker/beacon/beacon.go:93 +0x5d
github.com/concourse/worker/beacon.(*Beacon).RetireWorker(0xc420402640, 0xc4200984e0, 0xc420098540, 0x0, 0x0)
/tmp/build/9674af12/concourse/src/github.com/concourse/worker/beacon/beacon.go:84 +0x94
github.com/concourse/worker/beacon.(*Beacon).RetireWorker-fm(0xc4200984e0, 0xc420098540, 0x0, 0x0)
/tmp/build/9674af12/concourse/src/github.com/concourse/worker/retire/retire_runner.go:40 +0x3e
github.com/tedsuo/ifrit.RunFunc.Run(0xc42004b290, 0xc4200984e0, 0xc420098540, 0x0, 0x0)
/tmp/build/9674af12/concourse/src/github.com/tedsuo/ifrit/runner.go:36 +0x3a
github.com/tedsuo/ifrit.(*process).run(0xc420389d40)
/tmp/build/9674af12/concourse/src/github.com/tedsuo/ifrit/process.go:71 +0x45
created by github.com/tedsuo/ifrit.Background
/tmp/build/9674af12/concourse/src/github.com/tedsuo/ifrit/process.go:49 +0x107
$ uname -a
Linux concourse 4.13.0-1012-gcp #16-Ubuntu SMP Thu Mar 15 12:00:42 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
If there's anything additional I can help with or provide - please, let me know.
Reacted by amy null, Marco Molteni and Denis Gukov
Activity
queer commentedon Apr 8, 2018
Getting this same thing trying to use the
docker-composefile at https://github.com/concourse/concourse-docker/blob/master/docker-compose.ymlConcourse version: 3.10.0
Deployment type (BOSH/Docker/binary): Docker, all on one machine
Infrastructure/IaaS: OVH dedicated server
Browser (if applicable): N/A
Did this used to work? No idea; first time using concourse on this box.
This is happening on initial setup; can't get a working install at all.
Full error:
This above error is the only thing to show up in the logs.
Didn't feel that this was worth adding another comment for, so edit:
Starting withI think I'm just a moron who forgot to generate the keys; in this case I guess the error could be clearer?quickstartworks fine, so I guess it's specifically an issue with handling the priv/pub keys.edtan commentedon Apr 13, 2018
I was getting the same SIGSEGV error when running
concourse land-worker --name worker. However, I got it working by providing the TSA configuration parameters, e.g.concourse land-worker --name worker --tsa-public-key keys/web/tsa_host_key.pub --tsa-worker-private-key keys/worker/worker_keyshashwathi commentedon Apr 27, 2018
Looks like in few parts of code we are not checking for TSA config correctly.
Eg: https://github.com/concourse/worker/blob/master/beacon/client_ssh.go#L42
We need to check if
WorkerPrivateKeyis not nill before accessingPrivateKeyvariable.Thank you so much for reporting this issue. I will look into this.
bump worker
bump bin tsa
shashwathi commentedon May 4, 2018
For acceptance @jama-pivotal
Previous behaviour
concourse land-worker --name test-workerwould panic without clear msg as to why it failed.Updated behaviour the command will fail with error msg
public worker key is not provided. Similar update toretire-worker,bump bin
bump atc
eltoru commentedon May 7, 2018
Had same problem. Running concourse web and worker by use of docker composer. Tried with different concourse version 3.11.0, 3.10.0 and 3.9.2. Finaly with older version, I got a valid output, telling that ssh keys had wrong permissions. As the keys were generated by another user than the docker server user, and that they are volume mounted in, it seems that permissions for them are not open enouch for the concourse container that are useing them.
Solved by chmod generated keys in current working directory with 744, before starting up concourse with: docker-compose -f docker-compose.yml up
StoyanIvanovI commentedon May 15, 2018
I can confirm the solution provided by @eltoru solves the problem. I had the same issue with ECS containers but the key commonality was that I used keys generated on another EC2 instance. After regenerating the keys, everything works okay. Thanks a lot for the suggestion.
eedwards-sk commentedon Aug 8, 2018
Still getting this on 4.0.0, likely due to missing keys in the command as per above
Edit: Are we supposed to be landing from the web container or from the worker container?
The command indicates it needs the worker private key, but the worker private key is not stored on the web container.
bump etree tsa handlers mux clockwork goxmldsig genproto grpc
metacoma commentedon Oct 26, 2018
faced with the same issue, concourse version 4.2.1
metacoma commentedon Oct 26, 2018
sorry folks, missclick