lando / core

Current Lando v3 runtime
https://docs.lando.dev/core/v3
GNU General Public License v3.0
9 stars 21 forks source link

downloaded docker-compose binary cannot be made executable #63

Closed brsowers closed 1 year ago

brsowers commented 1 year ago

I upgraded from 3.18 today and when I try to run any lando command I get this error:

ERROR ==> Error: spawn /Users/brs49/.lando/bin/docker-compose-v2.21.0 EACCES

I downloaded a second time, tried to reinstall and the same behavior. Considering dropping back to 3.18 but will wait for input.

pirog commented 1 year ago

@brsowers best guess is that Lando is not able to make that file executable for whatever reason. You should be able to do that manually with chmod +x /Users/brs49/.lando/bin/docker-compose-v2.21.0

brsowers commented 1 year ago

@pirog thanks for that, it helped but now I have this error from 'lando rebuild -vvv'

yaa 16:48:33 INFO ==> stopping app... yaa 16:48:33 DEBUG ==> emitting event ready yaa 16:48:33 VERBOSE ==> discovering dynamic portforward info... yaa 16:48:33 VERBOSE ==> v4 app is ready! yaa 16:48:33 DEBUG ==> emitting event ready-v4 yaa 16:48:33 VERBOSE ==> reporting stop action to report=true, url=https://metrics.lando.dev, report=true, url=https://metrics.lando.dev yaa 16:48:33 DEBUG ==> reported data command=lando rebuild, context=local, devMode=false, instance=b24e5c699cac2a365111283e0ca15aa08760ae4e, nodeVersion=v16.16.0, mode=cli, type=Darwin, platform=darwin, release=22.6.0, arch=arm64, product=lando, version=3.20.1, app=97a235de4f9a7188e764e893d8c988139c3b69b8, type=drupal9, services=[api=3, type=nginx, version=1.24, api=3, type=php, version=8.1, api=3, type=mariadb, version=10.6], action=stop, created=2023-09-29T20:48:33.140Z yaa 16:48:33 DEBUG ==> emitting event pre-stop yaa 16:48:33 DEBUG ==> process pid5 running /Users/brs49/.lando/bin/docker-compose-v2.21.0 kill cstdio=inherit, silent=false, mode=spawn, detached=false yaa 16:48:33 DEBUG ==> process pid5 finished with exit code %s lando 16:48:33 ERROR ==> Error at /snapshot/cli/node_modules/@lando/core/lib/shell.js From previous event: at Shell.sh (/snapshot/cli/node_modules/@lando/core/lib/shell.js) at Object.dc (/snapshot/cli/node_modules/@lando/core/lib/bootstrap.js) at compose (/snapshot/cli/node_modules/@lando/core/lib/bootstrap.js) at /snapshot/cli/node_modules/@lando/core/lib/router.js From previous event: at retryEach (/snapshot/cli/node_modules/@lando/core/lib/router.js) at Object.stop (/snapshot/cli/node_modules/@lando/core/lib/router.js) at run (/snapshot/cli/node_modules/@lando/core/lib/engine.js) at /snapshot/cli/node_modules/@lando/core/lib/router.js From previous event: at Object.eventWrapper (/snapshot/cli/node_modules/@lando/core/lib/router.js) at Engine.engineCmd (/snapshot/cli/node_modules/@lando/core/lib/engine.js) at Engine.stop (/snapshot/cli/node_modules/@lando/core/lib/engine.js) From previous event: at App.stop (/snapshot/cli/node_modules/@lando/core/lib/app.js) at /snapshot/cli/node_modules/@lando/core/lib/app.js From previous event: at App.rebuild (/snapshot/cli/node_modules/@lando/core/lib/app.js) at Object.run (/snapshot/cli/node_modules/@lando/core/plugins/lando-core/tasks/rebuild.js) From previous event: at /snapshot/cli/lib/cli.js at processImmediate (node:internal/timers:466:21) From previous event: at Object.handler (/snapshot/cli/lib/cli.js) at Object.runCommand (/snapshot/cli/node_modules/yargs/lib/command.js:238:44) at Object.parseArgs [as _parseArgs] (/snapshot/cli/node_modules/yargs/yargs.js:1063:30) at Function.get [as argv] (/snapshot/cli/node_modules/yargs/yargs.js:1004:21) at Cli.init (/snapshot/cli/lib/cli.js) at Cli.run (/snapshot/cli/lib/cli.js) at Object. (/snapshot/cli/bin/lando.js) at Module._compile (pkg/prelude/bootstrap.js:1926:22) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.runMain (pkg/prelude/bootstrap.js:1979:12) at node:internal/main/run_main_module:17:47

pirog commented 1 year ago

@brsowers can you directly invoke docker-compose? just try pasting in something like /Users/brs49/.lando/bin/docker-compose-v2.21.0 --version into your terminal and seeing what happens.

its possible you were not able to download the file successfully. in this case its best to just rm -rf /Users/brs49/.lando/bin/docker-compose-v2.21.0 and just try lando start again

brsowers commented 1 year ago

@pirog ended up removing the file and trying start again which seems to have resolved the issue. Thanks!!!

brsowers commented 1 year ago

closing this bug

pirog commented 1 year ago

awesome! im going to reopen so we can do a "stronger" check here eg try to actually run a docker-compose command and verify its good

brsowers commented 1 year ago

@pirog initially /Users/brs49/.lando/bin/docker-compose-v2.21.0 --version this command died, but once I removed and ran lando start now I get the proper output (Docker Compose version v2.21.0)

pirog commented 1 year ago

im guessing what is happening here is that because we dont actually tell the user we are downloading docker-compose the user thinks lando is stuck so ctrl+c which leaves a partially downloaded version of docker-compose which obviously does not work.

bad assumption on our part to not have ux around downloading docker compose, similarly bad to download it to the "active" location instead of downloading it to a temp location first, verifying and then copying over.

pirog commented 1 year ago

will roll a release momentarily with these fixez

brsowers commented 1 year ago

im guessing what is happening here is that because we dont actually tell the user we are downloading docker-compose the user thinks lando is stuck so ctrl+c which leaves a partially downloaded version of docker-compose which obviously does not work.

bad assumption on our part to not have ux around downloading docker compose, similarly bad to download it to the "active" location instead of downloading it to a temp location first, verifying and then copying over.

That makes perfect sense and I think is exactly what I did.

cbrody commented 1 year ago

I had a related issue with docker-compose not being installed correctly on MacOS – please see https://github.com/lando/lando/issues/3614#issuecomment-1752696462