File "C:\Python27\lib\socket.py", line 224, in meth
return getattr(self._sock,name)(*args) gaierror: [Errno 11004]
getaddrinfo failed
Getting this error when launching the hello world sample from here:
http://bottlepy.org/docs/dev/
It most likely means the hostname can't be resolved.
import socket
socket.getaddrinfo('localhost', 8080)
If it doesn't work there, it's not going to work in the Bottle example. You can try '127.0.0.1' instead of 'localhost' in case that's the problem.
The problem, in my case, was that some install at some point defined an environment variable http_proxy on my machine when I had no proxy.
Removing the http_proxy environment variable fixed the problem.
The problem in my case was that I needed to add environment variables for http_proxy and https_proxy.
E.g.,
http_proxy=http://your_proxy:your_port
https_proxy=https://your_proxy:your_port
To set these environment variables in Windows, see the answers to this question.
Make sure you pass a proxy attribute in your command
forexample - pip install --proxy=http://proxyhost:proxyport pixiedust
Use a proxy port which has direct connection (with / without password). Speak with your corporate IT administrator. Quick way is find out network settings used in eclipse which will have direct connection.
You will encouter this issue often if you work behind a corporate firewall. You will have to check your internet explorer - InternetOptions -LAN Connection - Settings
Uncheck - Use automatic configuration script
Check - Use a proxy server for your LAN. Ensure you have given the right address and port.
Click Ok
Come back to anaconda terminal and you can try install commands
May be this will help some one. I have my proxy setup in python script but keep getting the error mentioned in the question.
Below is the piece of block which will take my username and password as a constant in the beginning.
if (use_proxy):
proxy = req.ProxyHandler({'https': proxy_url})
auth = req.HTTPBasicAuthHandler()
opener = req.build_opener(proxy, auth, req.HTTPHandler)
req.install_opener(opener)
If you are using corporate laptop and if you did not connect to Direct Access or office VPN then the above block will throw error. All you need to do is to connect to your org VPN and then execute your python script.
Thanks
I spent some good hours fixing this but the solution turned out to be really simple. I had my ftp server address starting with ftp://. I removed it and the code started working.
FTP address before:
ftp_css_address = "ftp://science-xyz.xyz.xyz.int"
Changed it to:
ftp_css_address = "science-xyz.xyz.xyz.int"
Related
I'm trying to launch an application in C++ done with QtCreator:
This is the error:
I can see the error if I try to test the connection with created device or calling run on QtCreator.
I don't have any idea how to align capabilities.
Can someone tell me which file I have to modify to fix the issue?
I found some info about "sshd_config" file but I didn't find a way to solve.
I tried to modify the file as suggested, thanks by the way, but with the change the ssh doesn't start at all.
So, I'm sorry for the question but, there is a position defined where I can/should place the suggested line?
This is my file
I tried at the begin, at bottom, in the middle, nothing the connection was refused.
The client is offering a list of broken ciphers. You should consider updating the Qt Craetor or whatever is this software using to connect to the remote device.
The other possibility is to allow these ciphers on the server (device). Add
Ciphers +aes128-cbc
to your /etc/ssh/sshd_config and restart the sshd service. If it will not work, use for example this list:
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc
and restart the sshd service on the device.
I solved adding this string and as I was not sure where apply it, I would like to show exactly which line was added:
My application use database which is on another server. To increase security, access to db server was restricted only for specified production servers.
However sometimes I need to have access to this db, when running development environment from my localhost.
For now a simply run in another console before running server:
ssh tunnel#server-with-access-to-db.com -L 12345:localhost:3306
..which works great, however I need to remember to do that.
I am wondering how to write custom runserver which will establish tunnel automatically, and what is important, will close that tunnel after server will be shut down.
I know that in the future VPN will be much better, however it is not possible for now.
I will be grateful for any suggestions.
FYI: one part of writing custom runserver command is extending it. You can use this example to do so.
Instead of directly connecting to SSh client I have to connect using proxy server and then to ssh client?
I have tried below approach:
in Boto\manage\cmdshell.py I have made below change
while retry < 5:
try:print "connecting ssh client"
proxy = paramiko.ProxyCommand('connect-proxy -S my_proxy_IP:8080')
self._ssh_client.connect(self.server.hostname,
username=self.uname,
pkey=self._pkey,sock=proxy)
which is giving me
File "C:\Python27\lib\site-packages\paramiko\transport.py", line 465, in start_client
raise e
paramiko.SSHException: Error reading SSH protocol banner
I referered this link here in stackoverflow
Paramiko Error: Error reading SSH protocol banner
where they are saying
answer is
This issue didn't lie with Paramiko, Fabric or the SSH daemon. It was simply a firewall configuration in ISPs internal network. For some reason, they don't allow communication between different subnets of theirs.
We couldn't really fix the firewall configuration so instead we switched all our IPs to be on the same subnet.
but in my case my host is amazonaws instance what should i do in that case.
I am doing anything wrong here or how can i ovecome this issue.
Fabric has this available as an option by default since version 1.5, documented here. If you're unable to use Fabric, you might then crib from it's source a better solution for yourself.
From my corporate network I tried using the following versions of vmc: 0.5.0.beta.7 and 0.4.7. When I try doing vmc target api.cloudfoundry.com, I get the following error:
CFoundry::TargetRefused: target refused connection (getaddrinfo: No such host is known. )
When I tried version 0.3.18, I did not get that error. Note that I have set the http proxy correct by setting http_proxy environmental variable.
Did anybody experience this issue or know why this happens?
To get VMC to work behind a corporate firewall (SOCKS), you can use socksify (http://socksify.rubyforge.org/). I just added the following (corrected for my environment) to gems/vmc-0.4.7/lib/vmc/cli.rb:
require 'socksify'
TCPSocket::socks_server = "127.0.0.1"
TCPSocket::socks_port = 9050
Not exactly elegant, but it worked well and I can finally use CF.
Can you please try doing vmc target on a network which doesn't require any proxy settings?
Hi I in an attempt to connect to more than one heroku account I did a number of stuff that has led to this error. "ssh: connect to host heroku.com port 22: No route to host" I dont know what the problem is or how to solve it so I want to start all over with heroku and ssh keys on my machine. How to I delete the present configurations and start afresh?
A few things I would attempt to do:
Ensure that there is no quirky setup in your HOSTS (/etc/hosts) file that is causing confusion
Check your ~/.ssh directory and ensure that the keys you expect to be there ... are there.
Check your ~/.ssh/config file for any incorrect information
Ensure that your heroku SSH server is actually listening on port 22. A lot of people will change the default SSH port for security purposes.
Ensure that the private key that you're attempting to use is uploaded to the heroku server. Some SSH instances won't tell you that it's an invalid key for security purposes. Instead it will just give you the rejection message you mentioned.
If I think of any other diagnostics I'll be sure to update.
Best of luck.
Perhaps something is set oddly in your $HOME/.ssh/config file. You can try backing up this file and then removing it to see if it resolves your problem.