I'm new to Docker. I get a connecting error when trying to setup Docker in PyCharm Professional edition.
I have followed this official manual and turn on the checkbox(Expose daemon on tcp://localhost:2375 without TLS)
But it still not work.
Cannot connect: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: localhost/127.O.O.1:2375
caused by: java.net.ConnectException: Connection refused: no further information
I have accidentally connected docker one time.But when i restart my computer i cannot connect docker anymore.
Any further help would be gratefully appreciated.
If you are facing connection refused then there may be a chance that there is no server to respond to your request.
So first check whether docker server is listening on 2375 port.
netstat -anp tcp | findstr 2375
Or, use tcpview for GUI.
If docker is not listening on this port, then check your C:\ProgramData\Docker\config\daemon.json file and verify whether you have the below Key value pair in your JSON.
"hosts": ["tcp://0.0.0.0:2375"]
If it is not there, then add this and restart your docker daemon.
If you are behind a proxy, then make sure to add this in no-proxy, so that your requests will not be routed via a proxy server.
NOTE: I don't have any experience with docker on windows
Related
Im very new to network programming and faced a following problem:
Im working on VMware CentOS7 virtual machine on Windows10 host.
My script should send WHOIS queries and parse their output (e.g. expiration date).
However, an attempt to send a query leads to a connection error:
>>>import whois
>>>whois.query('google.com')
WhoisCommandFailed: connect: Network is unreachable
I tried to whois from terminal, but error was the same.
When i tried to use whois directly from Windows, which hosts virtual machine, the error seemed to look same as well (connection timeout).
As i found out, it was most likely related to access to port 43. I created rules (for in and out) for Windows firewall for this port by a guide , but error still persisted.
It looks like access to this port was blocked by ISP (however ping command is working).
To sum up, I got two questions there:
1) (less important) How to check if port 43 is blocked by firewall either by ISP?
2) (most important) Is it possible somehow to reconfigure WHOIS for usage of another port (i.e. 23) for sending queries by Python script?
Unfortunately, ISP security policy doesn't allow them to open 43 port.
Mostly ISP doesn't block any port but yes, this is not 100% true.
Testing connection:
run tcpdump (install command: yum install tcpdump) command on CentOS: tcpdump -peni any tcp and port 43
You have to see lines with the following text: 192.168.1.1.57350 > 192.34.234.30.43 where 192.34.234.30 IP address means the remote whois server.
Try to telnet to remote server's TCP/43 port: telnet 192.34.234.30 43
You should see the following:
Trying 192.34.234.30...
Connected to 192.34.234.30.
Escape character is '^]'.
If you can`t see context like that and you get back prompt immediately you will a firewall rule somewhere what is block connection. I recommend to switch off firewall temporarily and test again.
You cannot change port number, because it is configured on the remote side, on the server.
Can CentOS7 server communicate towards the internet? In example can you install packages?
Is there any router between windows machine and ISP?
I am trying to connect to one of my development server via rabbitmq.
I am able to connect to all other servers except one.
I am able to connect this server to itself.
I have tried almost all the solutions in stackoverflow.
connection=pika.BlockingConnection(pika.ConnectionParameters(credentials=credentials,host="**.***.*.*",socket_timeout=300))
pika.exceptions.ConnectionClosed:Connection to **.***.*.*:5672 failed: timeout
first check wheather rabbitmq is running
sudo service rabbitmq-server status
then check if you are able to ping the server
run ping 12.123.1.1
now we have to check if port is open or not
telnet 12.123.1.1 5672
PyCharm remote debugging (pydevd) does not connect with the following message:
error: [Errno 10061] No connection could be made because the target machine actively refused it
How can I troubleshoot it?
The output console in PyCharm shows:
Starting debug server at port 21000
Use the following code to connect to the debugger:
import pydevd
pydevd.settrace('*.*.*.*', port=21000, suspend=False)
Waiting for process connection...
Server stopped.
I checked the firewall and PyCharm is allowed for both incoming and outgoing connections.
10061 is WSAECONNREFUSED, 'connection refused', which means there was nothing listening at the IP:port you tried to connect to.
Though I see that you have validated its not a firewall issue, but still I would suggest to check the port numbers again with respect to the ones opened in windows firewall. Or to narrow down just run a simplehttpserver or icmp server at the same port and confirm.
In a direct link communication, it often means that you have already something connected to this port.
To check what process is hearing what port, check this SO question.
You can then either kill the program or change the port, depending of what you can do.
Without more information of the "remote tested", it is hard to know what is happening.
I was having the trouble as well (Server stopped as soon as the client connected).
Turned out that I had apparently too many breakpoints defined.
after having removed most of them and re-initiated my remote debug connection from the client (and having restarted the debug server in pycharm) it doesn't trigger anymore the "Server stopped." problem.
I was setting up a public Ipython Notebook in my remote Ubuntu 12.04 server according to http://ipython.org/ipython-doc/1/interactive/public_server.html#notebook-public-server, but when all was done, I cannot connect to it via both chrome and safari (in both https and http modes), I got timeout error in chrome, safari told me server isn't responding. So I tested the system by setting up following simple python server:
python -m SimpleHTTPServer
And the same error occured. I also checked the port with sudo netstat -anltp|grep :8000, which seems fine:
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 22683/python
What surprises me is that I have the apache running and holding websites just fine (I also try to turn it off when configuring python server but that didn't help). Can anyone give me a clue what might be wrong in the Ubuntu server and how I should debug it?
I have found the issue: it turns out that the ports are closed by firewall, although in netstat it says python is listening to port 8000, but when incoming request reaches port 8000 it is rejected before getting to python server. By opening the ports the issue can be well resolved.
It turns out that the ports are closed by firewall, although in netstat it says python is listening to port 8000, but when incoming request reaches port 8000 it is rejected before getting to python server. By opening the ports the issue can be well resolved.
I'm having an issue running and connecting to my python django server on a windows 2012 server. To run the server I use command: python manage.py 0.0.0.0:80. This results in an error below
[Error 10013]: an attempt was made to access a socket in a way forbidden by its access permissions
I've tried running the command prompt as an administrator with no change. For reference, I am able to run the server on port 8000 but then I cannot connect to the port remotely. I have turned off firewalls as well so that is probably not the issue.
While it is preferable to run the django on port 80, I am trying to get this working on any port.
Port 80 (and many other ports) is reserved by Windows Server. Checkout this https://serverfault.com/questions/633179/cant-make-confluence-run-on-port-80-with-windows-server-2012-r2,
You may want to google "Windows Server Reserved port" for more info and a way to "unreserve" it.