zsquare
zsquare

Reputation: 10146

Problems with fabric deployment

Im using the fab script from here. fab deploy throws an error at right after creating the application. The error is:

Fatal error: Low level socket error connecting to host username.webfactional.com: Connection refused (tried 1 time)

Underlying exception:
    Connection refused

I have seen this answer, but I have ssh running on my machine.

Upvotes: 5

Views: 1442

Answers (3)

linqu
linqu

Reputation: 11970

I had a similar connection problem with recently started EC2 instances from AWS. Apparently, the instances may not yet be accessible via ssh even though their status has switched to running already.

There seems to be no proper solution, this is the most elegant I got:

while True:
    try:
        run('whoami')
        break
    except Exception, e:
        print "instance not yet reachable, wait a little bit", e
        time.sleep(10)

Upvotes: 1

zsquare
zsquare

Reputation: 10146

The root cause of the issue ended up being use of port within the code.

The bug report is here, and the fix is here

Upvotes: 1

Ivan Ivanov
Ivan Ivanov

Reputation: 2052

The problem has been solved by downgrading to Fabric 1.3.4 instead of 1.4

Upvotes: 0

Related Questions