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

Raspberry Pi Error #351

Closed
Roy-H23 opened this issue Aug 18, 2020 · 2 comments
Closed

Raspberry Pi Error #351

Roy-H23 opened this issue Aug 18, 2020 · 2 comments

Comments

@Roy-H23
Copy link

Roy-H23 commented Aug 18, 2020

Subject of the issue

Pulling docker image step-ca for the raspberry and initialising it via the doc:
https://github.com/smallstep/certificates/blob/master/docs/docker.md works fine.
But starting the container produces:

/usr/local/bin/step-ca: line 2: syntax error: unterminated quoted string

Your environment

  • OS - Raspbian GNU/Linux 10 (buster)
  • Version - Linux 5.4.51-v7l+ armv7l

Steps to reproduce

Start container

Expected behaviour

Running container

Actual behaviour

Container stops

Additional context

pi@raspberrypi:/opt/docker $ docker run -it -v /opt/docker/stepca:/home/step smallstep/step-ca sh
Unable to find image 'smallstep/step-ca:latest' locally
latest: Pulling from smallstep/step-ca
52278dd8e579: Already exists
a3584099b63a: Pull complete
642a82358774: Pull complete
e11f58359f30: Pull complete
1496ff902cad: Pull complete
a6e8a68bee91: Pull complete
Digest: sha256:99daac27a78fad54db435a73905bbbd28c99cd31f021a0735269e4fe048edcad
Status: Downloaded newer image for smallstep/step-ca:latest
~ $ step ca init
✔ What would you like to name your new PKI? (e.g. Smallstep): local
✔ What DNS names or IP addresses would you like to add to your new CA? (e.g. ca.smallstep.com[,1.1.1.1,etc.]): localhost
✔ What address will your new CA listen at? (e.g. :443): :9443
✔ What would you like to name the first provisioner for your new CA? (e.g. [email protected]): admin
✔ What do you want your password to be? [leave empty and we'll generate one]:

Generating root certificate...
all done!

Generating intermediate certificate...
all done!

✔ Root certificate: /home/step/certs/root_ca.crt
✔ Root private key: /home/step/secrets/root_ca_key
✔ Root fingerprint: 57fee099c3ac1fa2cf84f26bd678a56ba21eee14c22a1e7dcb9d4761e5101a9d
✔ Intermediate certificate: /home/step/certs/intermediate_ca.crt
✔ Intermediate private key: /home/step/secrets/intermediate_ca_key
✔ Database folder: /home/step/db
✔ Default configuration: /home/step/config/defaults.json
✔ Certificate Authority configuration: /home/step/config/ca.json

Your PKI is ready to go. To generate certificates for individual services see 'step help ca'.

FEEDBACK 😍 🍻
The step utility is not instrumented for usage statistics. It does not
phone home. But your feedback is extremely valuable. Any information you
can provide regarding how you’re using step helps. Please send us a
sentence or two, good or bad: [email protected] or join
https://gitter.im/smallstep/community.
~ $ echo DUMMY > /home/step/secrets/password
~ $ ^C
~ $ exit
pi@raspberrypi:/opt/docker $ docker run -d -p 127.0.0.1:9433:9433 -v step:/home/step smallstep/step-ca
58e8e4ef8b09f06ab93e9faca6bd8457ce07160f7c698ea4a196c9557711e54f
pi@raspberrypi:/opt/docker $ curl https://localhost:9443/health
curl: (7) Failed to connect to localhost port 9443: Verbindungsaufbau abgelehnt

@Roy-H23 Roy-H23 added bug needs triage Waiting for discussion / prioritization by team labels Aug 18, 2020
@dopey
Copy link
Contributor

dopey commented Aug 18, 2020

Hey @Roy-H23, thanks for the reminder. I think this is similar to #344. I'm going to push a release candidate in a moment and let's see if that fixes it for you. @tashian's work hadn't been merged in until after I had made the 0.15.0 release over the weekend.

@dopey dopey removed the needs triage Waiting for discussion / prioritization by team label Aug 18, 2020
@Roy-H23
Copy link
Author

Roy-H23 commented Aug 19, 2020

Hi @dopey , thanks for bringing some more light into the dark.

It is related to #344 but the issue was still persistant yesterday. So it is more or less a duplicate.
I've builded a new container with the latest image of smallstep/step-ca:0.15.1-rc.1 today.
It looks like the issue is fixed by now!

Maybe this helps other people:

pi@raspberrypi:/opt/docker $ docker run -it -v /opt/docker/stepca:/home/step smallstep/step-ca sh
Unable to find image 'smallstep/step-ca:latest' locally
latest: Pulling from smallstep/step-ca
52278dd8e579: Already exists
a3584099b63a: Pull complete
642a82358774: Pull complete
e11f58359f30: Pull complete
1496ff902cad: Pull complete
a6e8a68bee91: Pull complete
Digest: sha256:99daac27a78fad54db435a73905bbbd28c99cd31f021a0735269e4fe048edcad
Status: Downloaded newer image for smallstep/step-ca:latest
~ $ step ca init
✔ What would you like to name your new PKI? (e.g. Smallstep): local
✔ What DNS names or IP addresses would you like to add to your new CA? (e.g. ca.smallstep.com[,1.1.1.1,etc.]): localhost
✔ What address will your new CA listen at? (e.g. :443): :9443
✔ What would you like to name the first provisioner for your new CA? (e.g. [email protected]): admin
✔ What do you want your password to be? [leave empty and we'll generate one]:

Generating root certificate...
all done!

Generating intermediate certificate...
all done!

✔ Root certificate: /home/step/certs/root_ca.crt
✔ Root private key: /home/step/secrets/root_ca_key
✔ Root fingerprint: ef339c9c2190f81f3a622e4304fcf566a7b97c23b3ff8c6b13c1ac19636e9fd2
✔ Intermediate certificate: /home/step/certs/intermediate_ca.crt
✔ Intermediate private key: /home/step/secrets/intermediate_ca_key
✔ Database folder: /home/step/db
✔ Default configuration: /home/step/config/defaults.json
✔ Certificate Authority configuration: /home/step/config/ca.json

Your PKI is ready to go. To generate certificates for individual services see 'step help ca'.

FEEDBACK 😍 🍻
The step utility is not instrumented for usage statistics. It does not
phone home. But your feedback is extremely valuable. Any information you
can provide regarding how you’re using step helps. Please send us a
sentence or two, good or bad: [email protected] or join
https://gitter.im/smallstep/community.
~ $ echo DUMMY > /home/step/secrets/password
~ $ exit

LOGS:

Error opening database of Type badger with source /home/step/db: error opening Badger database: Unable to mmap RDWR log file: invalid argument
Error opening database of Type badger with source /home/step/db: error opening Badger database: Unable to mmap RDWR log file: invalid argument
Error opening datase of Type badger with source /home/step/db: error opening Badger database: Unable to mmap RDWR log file: invalid argument
Error opening database of Type badger with source /home/step/db: error opening Badger database: Unable to mmap RDWR log file: invalid argument
Error opening database of Type badger with source /home/step/db: error opening Badger database: Unable to mmap RDWR log file: invalid argument
Error opening database of Type badger with source /home/step/db: error opening Badger database: Unable to mmap RDWR log file: invalid argument
Error opening database of Type badger with source /home/step/db: error opening Badger database: Unable to mmap RDWR log file: invalid argument
Error opening database of Type badger with source /home/step/db: error opening Badger database: Unable to mmap RDWR log file: invalid argument
Error opening database of Type badger with source /home/step/db: error opening Badger database: Unable to mmap RDWR log file: invalid argument
Error opening database of Type badger with source /home/step/db: error opening Badger database: Unable to mmap RDWR log file: invalid argument
Error opening database of Type badger with source /home/step/db: error opening Badger database: Unable to mmap RDWR log file: invalid argument
Error opening database of Type badger with source /home/step/db: error opening Badger database: Unable to mmap RDWR log file: invalid argument
Error opening database of Type badger with source /home/step/db: error opening Badger database: Unable to mmap RDWR log file: invalid argument
Error opening database of Type badger with source /home/step/db: error opening Badger database: Unable to mmap RDWR log file: invalid argument
Error opening database of Type badger with source /home/step/db: error opening Badger database: Unable to mmap RDWR log file: invalid argument
Error opening database of Type badger with source /home/step/db: error opening Badger database: Unable to mmap RDWR log file: invalid argument
error decrypting /home/step/secrets/intermediate_ca_key: x509: decryption password incorrect
error decrypting /home/step/secrets/intermediate_ca_key: x509: decryption password incorrect
error decrypting /home/step/secrets/intermediate_ca_key: x509: decryption password incorrect
error decrypting /home/step/secrets/intermediate_ca_key: x509: decryption password incorrect
error decrypting /home/step/secrets/intermediate_ca_key: x509: decryption password incorrect
error decrypting /home/step/secrets/intermediate_ca_key: x509: decryption password incorrect
error decrypting /home/step/secrets/intermediate_ca_key: x509: decryption password incorrect
error decrypting /home/step/secrets/intermediate_ca_key: x509: decryption password incorrect
2020/08/19 08:03:06 Serving HTTPS on :9443 ...
2020/08/19 08:03:15 shutting down ...
2020/08/19 08:03:18 Serving HTTPS on :9443 ...
2020/08/19 08:04:56 /usr/local/go/src/net/http/server.go:3093: http: TLS handshake error from 172.26.0.1:40128: remote error: tls: unknown certificate authority

I could fix this issue with the report #279 !

Thanks for your help!

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

No branches or pull requests

2 participants