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

'Invalid PEM formatted message.' Error during lando setup #70

Open
edurenye opened this issue Nov 13, 2024 · 4 comments
Open

'Invalid PEM formatted message.' Error during lando setup #70

edurenye opened this issue Nov 13, 2024 · 4 comments

Comments

@edurenye
Copy link

On Ubuntu 24.10 with Docker Engine version 27.3.1.

When I run /bin/bash -c "$(curl -fsSL https://get.lando.dev/setup-lando.sh)"

And crashed, I do not remember the error message.

Then I run lando setup and seems to run fine without throwing any errors, but when I check with lando update I can see that it did not install most of the plugins in the output.

If I run again lando setup it does the same think finishes without error and the plugins like node are not installed.

Then I run lando setup --debug and I see this error:

lando automoved scripts from /home/username/.lando/plugins/@lando/platformsh/scripts to /home/username/.lando/scripts and set to mode 755  +2ms
lando error determining fingerprint of '/home/username/.lando/certs/LandoCA.crt': 'Invalid PEM formatted message.' 'Error: Invalid PEM formatted message.\n' +
  '    at Object.decode (/snapshot/core/node_modules/node-forge/lib/pem.js:192:11)\n' +
  '    at Object.certificateFromPem (/snapshot/core/node_modules/node-forge/lib/x509.js:803:23)\n' +
  '    at /snapshot/core/utils/get-fingerprint.js\n' +
  '    at Object.hasRun (/snapshot/core/hooks/lando-setup-install-ca-linux.js)\n' +
  '    at /snapshot/core/utils/parse-setup-task.js\n' +
  '    at async /snapshot/core/utils/parse-setup-task.js\n' +
  '    at async _Task.check (/snapshot/core/node_modules/listr2/dist/index.cjs:1914:22)\n' +
  '    at async Promise.all (index 3)\n' +
  '    at async _Listr.run (/snapshot/core/node_modules/listr2/dist/index.cjs:2200:5)\n' +
  '    at async /snapshot/core/utils/run-tasks.js\n' +
  '    at async Lando.runTasks (/snapshot/core/lib/lando.js)\n' +
  '    at async Lando.setup (/snapshot/core/lib/lando.js)\n' +
  '    at async Object.run (/snapshot/core/tasks/setup.js)'  +37899ms
  lando emitting event pre-engine-up  +9ms

Then it tells me this:

Generating setup task installation matrix... done [see table below]

 THING                                     STATUS          COMMENT             
 ───────────────────────────────────────── ─────────────── ─────────────────── 
 @lando/build-engine (docker-engine)       ✔ Installed     Dialed              
 @lando/build-engine-group (eduard@docker) ✔ Installed     Dialed              
 @lando/ca                                 ⚠ Not Installed Will create Lando … 
 @lando/install-ca                         ⚠ Not Installed Will install Lando… 
 @lando/orchestrator (docker-compose)      ⚠ Not Installed Will install docke… 
 @lando/landonet                           ⚠ Not Installed Will create Landon… 

Lando would like to run the 4 setup tasks listed above.
DO YOU CONSENT?: y

I say yes and this time works and installs everything fine.

@rtfm-47 rtfm-47 transferred this issue from lando/lando Nov 13, 2024
@edurenye
Copy link
Author

lando version
v3.23.5

@edurenye
Copy link
Author

I tried to update to v3.23.7, but I run into this error: lando/core#263
I uninstalled and try to install again, and I got into this same error, so when I run /bin/bash -c "$(curl -fsSL https://get.lando.dev/setup-lando.sh)" I get:

ERROR: Failed during: /usr/local/bin/lando setup

Without any more information.
I did the same as before and now I'm getting a different error, the following:

  lando [COMPLETED] Installing Lando Development CA Completed  +416ms
  lando [FAILED] Client network socket disconnected before secure TLS connection was established  +1004ms
  lando ran 3 of 3 tasks with 1 errors  +1ms
  lando emitting event post-setup  +0ms
  lando using docker-compose false  +1ms

  lando {"message":"Client network socket disconnected before secure TLS connection was established","name":"Error","stack":"Error: Client network socket disconnected before secure TLS connection was established\n    at Function.from (/snapshot/core/node_modules/axios/dist/node/axios.cjs)\n    at RedirectableRequest.handleRequestError (/snapshot/core/node_modules/axios/dist/node/axios.cjs)\n    at RedirectableRequest.emit (node:events:519:28)\n    at ClientRequest.<anonymous> (/snapshot/core/node_modules/follow-redirects/index.js:49:24)\n    at ClientRequest.emit (node:events:519:28)\n    at emitErrorEvent (node:_http_client:101:11)\n    at _destroy (node:_http_client:884:9)\n    at onSocketNT (node:_http_client:904:5)\n    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)\n    at Axios.request (/snapshot/core/node_modules/axios/dist/node/axios.cjs)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Object.canRun (/snapshot/core/hooks/lando-setup-orchestrator.js)\n    at async _Task.taskFn (/snapshot/core/utils/parse-setup-task.js)\n    at async _Task.run (/snapshot/core/node_modules/listr2/dist/index.cjs:2049:11)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"adapter":["xhr","http","fetch"],"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","User-Agent":"axios/1.7.7","Accept-Encoding":"gzip, compress, deflate, br"},"httpAgent":{"_events":{},"_eventsCount":2,"options":{"keepAliveMsecs":1000,"maxSockets":15,"maxTotalSockets":null,"maxFreeSockets":256,"scheduling":"fifo","family":4,"keepAlive":true,"hints":32,"noDelay":true,"path":null},"requests":{},"sockets":{},"freeSockets":{},"keepAliveMsecs":1000,"keepAlive":true,"maxSockets":15,"maxFreeSockets":256,"scheduling":"fifo","maxTotalSockets":null,"totalSocketCount":0},"httpsAgent":{"_events":{},"_eventsCount":2,"options":{"keepAliveMsecs":1000,"maxSockets":15,"maxTotalSockets":null,"maxFreeSockets":256,"scheduling":"fifo","family":4,"keepAlive":true,"hints":32,"noDelay":true,"path":null},"requests":{},"sockets":{},"freeSockets":{"objects.githubusercontent.com:443::4::::::::::::::::::::":[{"_tlsOptions":{"pipe":false,"secureContext":{"context":{}},"isServer":false,"requestCert":true,"rejectUnauthorized":true},"_secureEstablished":true,"_securePending":false,"_newSessionPending":false,"_controlReleased":true,"secureConnecting":false,"_SNICallback":null,"servername":"objects.githubusercontent.com","alpnProtocol":false,"authorized":true,"authorizationError":null,"encrypted":true,"_events":{"close":[null,null],"newListener":[null,null]},"_eventsCount":8,"connecting":false,"_hadError":false,"_parent":null,"_host":"objects.githubusercontent.com","_closeAfterHandlingError":false,"_readableState":{"highWaterMark":16384,"buffer":[],"bufferIndex":0,"length":0,"pipes":[],"awaitDrainWriters":null},"_writableState":{"highWaterMark":16384,"length":0,"corked":0,"writelen":0,"bufferedIndex":0,"pendingcb":0},"allowHalfOpen":false,"_sockname":null,"_pendingData":null,"_pendingEncoding":"","_server":null,"ssl":{"_parent":{"reading":true,"onconnection":null},"_parentWrap":null,"_secureContext":{"context":{}},"reading":true},"_requestCert":true,"_rejectUnauthorized":true,"parser":null,"_httpMessage":null,"timeout":0}]},"keepAliveMsecs":1000,"keepAlive":true,"maxSockets":15,"maxFreeSockets":256,"scheduling":"fifo","maxTotalSockets":null,"totalSocketCount":1},"method":"head","url":"https://github.com/docker/compose/releases/download/v2.29.2/docker-compose-linux-x86_64"},"code":"ECONNRESET"}  +1ms
  lando ERROR Error: A setup error occured! Rerun with lando setup --debug for more info.
    at Object.run (/snapshot/core/tasks/setup.js)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at process.processImmediate (node:internal/timers:454:9)
From previous event:
    at Object.handler (/snapshot/core/lib/cli.js)
    at Object.runCommand (/snapshot/core/node_modules/yargs/build/lib/command.js:196:48)
    at Object.parseArgs [as _parseArgs] (/snapshot/core/node_modules/yargs/build/lib/yargs.js:1043:55)
    at Function.get [as argv] (/snapshot/core/node_modules/yargs/build/lib/yargs.js:986:25)
    at Cli.init (/snapshot/core/lib/cli.js)
    at Cli.run (/snapshot/core/lib/cli.js)
    at /snapshot/core/bin/lando
From previous event:
    at Object.<anonymous> (/snapshot/core/bin/lando)
    at Module._compile (pkg/prelude/bootstrap.js:1930:22)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Function.runMain (pkg/prelude/bootstrap.js:1983:12)
    at node:internal/main/run_main_module:28:49  +3ms
  lando reporting error action to report=true, url=https://metrics.lando.dev, report=true, url=https://metrics.lando.dev +13ms
  lando reported data command=lando setup, context=local, devMode=false, instance=9d3cfedf68cbd40911dab0495a65f9bbb1def9fb, nodeVersion=v20.18.0, mode=cli, type=Linux, platform=linux, release=6.11.0-9-generic, arch=x64, isWsl=false, product=lando, version=3.23.7, message=A setup error occured! Rerun with lando setup --debug for more info., stack=Error: A setup error occured! Rerun with lando setup --debug for more info.
    at Object.run (setup.js)
    at runNextTicks (task_queues:60:5)
    at process.processImmediate (timers:454:9)
From previous event:
    at Object.handler (cli.js)
    at Object.runCommand (command.js:196:48)
    at Object.parseArgs [as _parseArgs] (yargs.js:1043:55)
    at Function.get [as argv] (yargs.js:986:25)
    at Cli.init (cli.js)
    at Cli.run (cli.js)
    at /snapshot/core/bin/lando
From previous event:
    at Object.<anonymous> (lando)
    at Module._compile (bootstrap.js:1930:22)
    at Module._extensions..js (loader:1548:10)
    at Module.load (loader:1288:32)
    at Module._load (loader:1104:12)
    at Function.runMain (bootstrap.js:1983:12)
    at node:internal/main/run_main_module:28:49, action=error, created=2024-11-20T10:31:05.287Z +1ms

@edurenye
Copy link
Author

And lando update still tells me @lando/core ⚠ Cannot update Please update manually.

@edurenye
Copy link
Author

Well, this time after this the 'orchestrator' was still missing @lando/orchestrator (docker-compose) ⚠ Not Installed Will install docker-compose v2.29.2.

So, I had to run lando setup --debug one more time and then it worked without throwing any errors.

This is not really the best experience to install lando, I never had any errors with the old .deb files. But I can't go back because now our projects use node 20 which was still not there in the last .deb file.

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