habitat-sh / habitat

Modern applications with built-in automation
https://www.habitat.sh
Apache License 2.0
2.6k stars 314 forks source link

Improve error handling when Supervisor not started #6301

Open dmccown opened 5 years ago

dmccown commented 5 years ago

Description

When attempting to load a svc hab svc load while the Supervisor is starting you get an error that you can't contact the Supervisor. We should indicate that the Supervisor is in a "starting" state and you should retry after the Supervisor has loaded.

Alternatively, we could wait until the Supervisor has started and then load your package if we detect the Supervisor is "starting".

Example of current error

    ###
            ### Unable to contact the Supervisor.
            ###
            ### If the Supervisor you are contacting is local, this probably means it is not running. You can run a Supervisor in the foreground with:
            ###
    ### hab sup run
    ### Or try restarting the Supervisor through your operating system's init process or Windows service.
    ###
    ### Original error is:
    ###
    ### Connection refused (os error 111)
    ###

Acceptance Criteria

  1. While a Supervisor is starting we give a warning that you should wait and try again.
  2. While a Supervisor is starting we wait until it has started and then load the package.

Demo

  1. Start a Supervisor
  2. Load a package hab svc load
  3. Either see the warning or wait on the Supervisor to finish starting
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

saurabh1611 commented 4 years ago

Still facing similar issue while installing chef automate 2.0 Can someone help here.? chef error

nicholasleejk commented 4 years ago

I'm also encountering this issue when deploying chef-automate

nicholasleejk commented 4 years ago

just managed to resolve this by setting the selinux to permissive then proceed with the chef-automate deploy

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.