i set fabric env.skip_bad_hosts=True,but it has no effect - fabric

There are some bad hosts in my host_list,so i set env.skip_bad_hosts=True,
but it ahs no effect, fabric already abort because of Fatal error: Timed out trying to connect to myip

I have solved this problem by adding try:...except:...,exceptional handling。

Related

Error: connect ECONNREFUSED 127.0.0.1:3306 when using cloud sql for MYSQL from NodeJS app

I followed all the steps mentioned in this sample app link. GitHubLink. When running the script (npm run init-cloudsql) to initialize mysql database, I get an error below:
D:\gcloud\nodejs-getting-started\2-structured-data\books\model-cloudsql.js:143
throw err;
^
Error: connect ECONNREFUSED 127.0.0.1:3306
at Object.exports._errnoException (util.js:1018:11)
at exports._exceptionWithHostPort (util.js:1041:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
--------------------
at Protocol._enqueue (D:\gcloud\nodejs-getting-started\2-structured- data\node_modules\mysql\lib\protocol\Protocol.js:145:48)
at Protocol.handshake (D:\gcloud\nodejs-getting-started\2-structured-data\node_modules\mysql\lib\protocol\Protocol.js:52:23)
at Connection.connect (D:\gcloud\nodejs-getting-started\2-structured-data\node_modules\mysql\lib\Connection.js:130:18)
at Connection._implyConnect (D:\gcloud\nodejs-getting-started\2-structured-data\node_modules\mysql\lib\Connection.js:461:10)
at Connection.query (D:\gcloud\nodejs-getting-started\2-structured-data\node_modules\mysql\lib\Connection.js:206:8)
at createSchema (D:\gcloud\nodejs-getting-started\2-structured-data\books\model-cloudsql.js:126:14)
at prompt.get (D:\gcloud\nodejs-getting-started\2-structured-data\books\model-cloudsql.js:117:5)
at D:\gcloud\nodejs-getting-started\2-structured-data\node_modules\prompt\lib\prompt.js:336:32
at D:\gcloud\nodejs-getting-started\2-structured-data\node_modules\utile\node_modules\async\lib\async.js:154:25
at assembler (D:\gcloud\nodejs-getting-started\2-structured-data\node_modules\prompt\lib\prompt.js:333:9)
What am i missing? I could not resolve this error. Can someone help me fix this issue?
This error occurs when you run an instance of PopSQL or Node.js and the MySQL server is not running on your local machine.
Try the below steps
Press Windows key and R on your keyboard. This opens the command prompt
Type in services.msc and click ok.
In the services pop up , check for MYSQL57. If its not in the running state, Click on run this service in the left column of the dialog box
Once the service is running connect to the POPSQL from the connections window
The error message you shared indicates your machine could not connect to the instance's IP address on port 3307 (which is used by the proxy). I tested this on my own machine, and it is listening there. This likely indicates a firewall on your machine or your local network that is preventing outbound connections on port 3307. Try and open this in the firewall, and see if you can connect.
You need to whitelist your IP to access Cloud SQL. https://cloud.google.com/sql/docs/mysql/instance-access-control

Cassandra cpp-driver throwing error but able to connect with the cluster

I'm trying to connect the cassandra cpp-driver with 2 node cassandra cluster. It is throwing some error, but able to retrieve the keyspace names.
1430309809.995 [ERROR] (src/connection.cpp:413:static void cass::Connection::on_connect(cass::Connector*)): Connect error
'connection refused' on host 192.168.1.5
1430309809.995 [ERROR] (src/connection.cpp:651:void cass::Connection::notify_error(const string&)): Host 192.168.1.5 had
the following error on startup: 'Unable to connect'
keyspace_name: 'mytest'
keyspace_name: 'system_traces'
keyspace_name: 'system'
It looks like your host 192.168.1.5 is not configured to accept the external connections but your driver is able to connect to the second node in the cluster.
I found the solution for it. My bad, i had set the broadcast_rpc_address to the client ip, that's the reason i got such an error. Now i changed the broadcast_rpc_address to the ip of the same machine. It works fine now.

Chef Server Installation error

I am a newbie to chef. I am trying to install chef server on an ec2 centos instance.
I am following this link to install the chef server.
But I am getting error at step 8 of installation.
[root#ip-10-105-203-174 ~]# knife configure -i
/usr/lib/ruby/gems/1.8/gems/ohai-7.0.4/lib/ohai/loader.rb:188: warning: character class has `[' without escape
/usr/lib/ruby/gems/1.8/gems/ohai-7.0.4/lib/ohai/loader.rb:188: warning: regexp has `]' without escape
Overwrite /root/.chef/knife.rb? (Y/N)Y
Please enter the chef server URL: [https://ip-10-105-23-174:443] https://10.105.23.174
Please enter a name for the new user: [root]
Please enter the existing admin name: [admin]
Please enter the location of the existing admin's private key: [/etc/chef-server/admin.pem]
Please enter the validation clientname: [chef-validator]
Please enter the location of the validation key: [/etc/chef-server/chef-validator.pem] /root/.chef/chef-server/chef-validator.pem
Please enter the path to a chef repository (or leave blank):
Creating initial API user...
Please enter a password for the new user:
ERROR: Connection refused connecting to https://10.105.203.174/users, retry 1/5
ERROR: Connection refused connecting to https://10.105.203.174/users, retry 2/5
ERROR: Connection refused connecting to https://10.105.203.174/users, retry 3/5
ERROR: Connection refused connecting to https://10.105.203.174/users, retry 4/5
ERROR: Connection refused connecting to https://10.105.203.174/users, retry 5/5
ERROR: Network Error: Connection refused - Connection refused connecting to https://10.105.23.174/users, giving up
Check your knife configuration and network settings
Is this the right tutorial. Please help me resolving the issue.
You seem to be doing the right thing for chef, but it looks like a fundamental networking issue. If I understand properly, you are logged into the chef server and trying to set up knife on the same box to talk contact itself. Is Chef server actually running? Use 'netstat -an' and verify that something is waiting on the :443 port. Can you use a browser from another host to contact it? You could also consider installing "knife" on another machine and running the same thing.
Are you providing a valid chef-server url. At first look it looks like you are giving the workstation ip address.

I got some errors when install single node mode

log:
error : gnutls_handshake() failed : a TLS packet with unexpected length was received .
while accessing https://github.com/cloudfoundry/vcap/info/refs
fatal: http request failed
.. unable to clone cloudfoundry vcap repo
What can I do?
Thanks tt64
are you behind a firewall? Are you using vcap dev_setup to install your CF instance? If you are make sure you are not behind any sort of firewalls that would block your execution from grabbing anything it needs from the net.

Problems getting RabbitMQ and Django-Celery Running: Target Machine actively refused connection

I am trying to get Django-Celery running on my Django App. I cannot get the worker server to run. When I try I get the message: No Connection could be made because the target machine actively refused it
Here is what I have done so far. First, I installed the django celery package: http://pypi.python.org/pypi/django-celery
I can load it into python without problems. I also installed the RabbitMQ server per the windows install instructions: http://www.rabbitmq.com/install.html#windows
Starting the tutorials in pytho on the RabbitMQ site I saw the need to install pika: http://pypi.python.org/pypi/pika. It imports without any problems.
From there I start the RabbitMQ server by running this at the command line: rabbitmq-service start
I get the message back that Service RabbitMQ started
Here is where I start to have problems.
I attempted the first steps in django-celery: http://packages.python.org/django-celery/getting-started/first-steps-with-django.html and the "hello world" example on the rabbitMQ site: http://www.rabbitmq.com/tutorials/tutorial-one-python.html
In both cases I get the message: No Connection could be made because the target machine actively refused it
My first thought was that this sounded like a firewall problem. So I went into the windows 7 firewall and added inbound and outbound rules to open the local and remote ports 5672 and 5673 to TCP protocol, but I still get the same error message.
When I run rabbitmqctl status i get the message:
Error: unable to connect to node 'rabbit#hostname': nodedown
diagnostics:
- nodes and their ports on hostname: [{rabbitmqctl18856, 505031}]
Does that mean it that it is trying to operate on those ports? what about the default 5672?
Any suggestions?
UPDATE: This was actually a problem resulting from several failed rabbitmq installs conflicting with the latest installation. If you have to remove rabbitmq use the 'rabbitmq-service remove' command and not SC DELETE, which cause a lot of problems for me and I had to go in and clean up my windows registry file.
The nodedown error indicated by rabbitmqctl suggests that the server isn't running on that machine.
Try going though the steps in RabbitMQ's troubleshooting guide. In particular, pay close attention to the logs. Has the server crashed for some reason? Could you post the logs somewhere?