faradayio / cage

Develop and deploy complex Docker applications
http://cage.faraday.io
Apache License 2.0
307 stars 26 forks source link

cage status -> Error: error getting the project's state from Docker #61

Closed Dangeranger closed 7 years ago

Dangeranger commented 7 years ago

Environment:

ProductName:    Mac OS X
ProductVersion: 10.10.5
BuildVersion:   14F2009

Docker version 1.12.3, build 6b644ec docker-compose version 1.9.0, build 2585387 docker-machine version 0.8.1, build 41b3b25 cage 0.1.10

Cage binary was downloaded from the releases page and not compiled locally.

Short Error:

Error: error getting the project's state from Docker
could not connected to Docker at 'tcp://192.168.99.100:2376'
Docker SSL support was disabled at compile time

Full error with debug flags enabled:

$ cage status
DEBUG:cage: Arguments: ArgMatches { args: {}, subcommand: Some(SubCommand { name: "status", matches: ArgMatches { args: {}, subcommand: None, usage: Some("USAGE:\n    cage status [<POD_OR_SERVICE>]") } }), usage: Some("USAGE:\n    cage [OPTIONS] [SUBCOMMAND]") }
DEBUG:cage::pod: Parsing /Users/mansfield/Dev/cage/test_project/pods/db.yml
DEBUG:cage::pod: Parsing /Users/mansfield/Dev/cage/test_project/pods/frontend.yml
DEBUG:cage::pod: Parsing /Users/mansfield/Dev/cage/test_project/pods/rake.yml
DEBUG:cage::plugins: vault generator was disabled at build time
DEBUG:cage::plugins: vault transform was disabled at build time
DEBUG:cage::project: Outputting /Users/mansfield/Dev/cage/test_project/.cage/pods/db.yml
DEBUG:cage::pod: Merging pod db with target development
DEBUG:cage::project: Outputting /Users/mansfield/Dev/cage/test_project/.cage/pods/frontend.yml
DEBUG:cage::project: Outputting /Users/mansfield/Dev/cage/test_project/.cage/pods/rake.yml
DEBUG:cage::pod: Merging pod frontend with target development
DEBUG:cage::pod: Merging pod rake with target development
Error: error getting the project's state from Docker
could not connected to Docker at 'tcp://192.168.99.100:2376'
Docker SSL support was disabled at compile time
stack backtrace:
   0:        0x104e9ca1e - backtrace::backtrace::trace::hbb3527c862dcb156
   1:        0x104e9cd2c - backtrace::capture::Backtrace::new::hb88c898ead0c41a6
   2:        0x104e9c754 - error_chain::make_backtrace::hf6780bdef7b8a72b
   3:        0x104daf805 - boondock::docker::Docker::connect_with_defaults::h6ee39577b20b0ecf
   4:        0x104d3b7a5 - cage::runtime_state::RuntimeState::for_project::he7f15f11730daafc
   5:        0x104c872dc - cage::run::hc3b00895a655f469
   6:        0x104c91943 - cage::main::h1f9b8c28fd949fc8
   7:        0x104f7178a - __rust_maybe_catch_panic
   8:        0x104f6fbf6 - std::rt::lang_start::h538f8960e7644c80
emk commented 7 years ago

This is a problem with SSL on Mac binary builds. For now, you'll need to rebuild the Mac binaries from source until I update everything to use the native-tls crate. Or disable SSL on your local Docker daemon.

Dangeranger commented 7 years ago

Thanks. I'll do that and confirm the fix worked. Is that documented somewhere in the README? If not I can issue a PR for it.

Dangeranger commented 7 years ago

Ok this worked to solve the issue

$ curl https://sh.rustup.rs -sSf | sh
$ source $HOME/.cargo/env
$ cargo install cage
$ cage status
db              enabled type:placeholder
└─ db           RUNNING
frontend        enabled type:service
└─ web          RUNNING ports:3000
rake            enabled type:task
└─ rake
emk commented 7 years ago

If the Mac requires SSL for Docker now, yes, I would happily accept a README PR!