Using Add rule in windows firewall, I was able to open TCP port 15537. When i am trying to executing command netstat -ano on terminal windows, this port is not listed. I tried to execute telnet command on terminal window (e.g. telnet IP port) but getting
Connecting To localhost...Could not open connection to the host, on port 15537: Connect failed
Then I downloaded PortQry application and execute it from different machine, this machine is also in the same network, the result I received was
"Not Listening".
I already spent more than 2 days and asked internal group but could not find solution.
Note: both machines are having Windows 10 OS.
No solution is needed as no problem is indicated in the question. You have opened a TCP port successfully. You have not made any attempt to cause anything to listen to that TCP port.
It's not clear what results you expected, but you got the results that you should have expected. Nothing is wrong. The port is open because you opened it. Nothing is listening on that port because you didn't set anything to listen on that port.
There may be some forwarding rules? Since the purpose of access is not on the local machine, the netstat command cannot see the port on listening, but it can see the next action based on this port, usually to do some forwarding
I am not very familiar with windows firewall configuration, but I know that if there is a forwarding rule in linux, like
-p tcp -m tcp --dport 8080 -j {other forwading chain}
we can not see 8080 listening on this host (netstat -tunpl), but telnet host:8080 may see connected
Use nmap instead of netstat for detecting opening port
nmap -p your_port_number your_local_ip
Run service on that port
For eg- In my case,in order to open port,I use
"service ssh start" or "service apache2 start "and it's open port 22 and 80 for connection respectively in my linux machine.
On using nmap in my lan network both ports opened.
Hope it help
I am currently set up using xdebug, PhpStorm & Vagrant.
It works perfect, but when I am connected to the internet through a VPN, the debug page never loads, it hangs on connecting to the page.
Specifically I click Run > Debug, and Firefox browser opens and the page is blank, the tab says "Connecting..." with the spinning icon, the bottom left says "Waiting for {page address}...". PhpStorm gives no indication it is waiting for anything, it looks like it is connected in debug mode.
If I wait for about 5 minutes or more, sometimes the page does load, but it is unusable for debugging purposes, and if I click a link/refresh the page, again it is 5 minutes.
Any idea why being connected through VPN would break it like this?
Andrew, can we get a few more details about your setup?
Without knowing your specific setup, I'm going to guess that the remote PHP app may not be able to connect to port 9000 on your laptop.
Before starting your debug session, you might try setting up a reverse tunnel to allow your remote host to talk to port 9000 on your laptop.
From a command line on your laptop you would do something like the following :
ssh -R 127.0.0.1:9000:laptop-IP:9000 remoteUser#webServerIP
For example, ssh -R 127.0.0.1:9000:192.168.1.29:9000 user500#192.168.0.100
In the above example, your laptop (192.168.1.29) will be logged into the remote server (192.168.0.100) as user500 and will be able to see via the netstat command that it's listening for connections on port 9000 :
user500#192.168.0.100$ netstat -natep | grep 9000
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 500 5189077 -
tcp 0 0 ::1:9000 :::* LISTEN 500 5189076 -
Now you should be able to initiate a debug session with PhpStorm by setting xdebug.remote_host=127.0.0.1 on your remote server in php.ini .
Similarly, initiating a php debug session from the command line while logged into the remote server would look like this -
php -dxdebug.remote_host=127.0.0.1 -dxdebug.remote_enable=1 -dxdebug.remote_autostart=1 my_php_code.php
I'm running linux / CentOS on both my laptop and remote server.
I get this message:
Status change detected: stopped
Error: Apache shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method.
Press the Logs button to view error logs and check
the Windows Event Viewer for more clues
If you need more help, copy and post this
entire log window on the forums
all other services load, bar apache
this may happen often because of other programs using the port 80 or 443 which Apache uses.
I ran into this issue with Skype and I had to configure it to use another port rather than 443.
Check your port by typing in your command line netstat -np TCP | find "80" and for port 443 to see the network status of them.
Check your Skype configurations for the ports :
Tools->Options->Advanced->Connections and uncheck the button that says "Use port 80 and 443 ..."
Are there difference in the way how Tomcat8 is bind to windows network socket whe is started from console (by startup.bat) of if is started as a windows service? I am not able to connect to application web if Tomcat is started as a windows service. See netstat if started from console:
C:\Program Files\Apache Software Foundation\apache-tomcat-8.0.0-RC10\bin>netstat -abnop tcp | grep -i -B2 8089
[java.exe]**
TCP 0.0.0.0:8089 0.0.0.0:0 LISTENING 6016
See netstat if started as a service (notice different name of listening process):
C:\Program Files\Apache Software Foundation\apache-tomcat-8.0.0-RC10\bin>netstat -abnop tcp | grep -i -B2 8089
[tomcat8.exe]**
TCP 0.0.0.0:8089 0.0.0.0:0 LISTENING 2856
Windows service was created by documentation: 'service.bat Install'.
"Image path" of service is: "c:\Program Files\Apache Software Foundation\apache-tomcat-8.0.0-RC10\bin\tomcat8.exe" //RS//Tomcat8
What am I doing wrong?
1st thing you should do:
Check your Windows Firewall :)
When you say "different name of listening process", are you talking about the PID? Have you tried to use "ProcessExplorer" (http://technet.microsoft.com/en-us/sysinternals/bb896653) to check the discrepancies between the Java processes that are created when you start the Tomcat instance?
When you mouse over the java process you can see the JVM arguments assigned for that JVM instance, also, when you right-click the java.exe process you can check its properties, on the "TCP/IP" tab you can check if your Tomcat is listening on the right port. Try to start Tomcat using both approaches and take a closer look with ProcessExplorer, that should help you identify any misconfiguration.
My lab runs RStudio on a server. A couple weeks ago, from my cousin's house, I successfully ssh'd into the server and pulled up the server-side RStudio through my local Firefox browser. Now when I try to access the server RStudio from home (via my own router), it doesn't work. I need help troubleshooting, and I'm guessing it's some problem on the router. I'm running Mac OSX 10.6.8. No idea what the university server's running, but I don't think it's a server-side problem.
Here's how it worked the first time I did it, at my cousin's house: first, I VPN into the university network; then I call SSH with port forwarding; then I open a Firefox browser, connect to my localhost port, and it opens up RStudio on the server side which I can access through my local browser window.
Here's the problem I'm having right now when I try to log-in from my home network:
I can make the VPN connection successfully. I can also set up SSH successfully with this command:
ssh -v -L 8783:localhost:8783 myacct#server.com
Here are the last several lines of the verbose output from the successful ssh command:
debug1: Authentication succeeded (password).
debug1: Local connections to LOCALHOST:8783 forwarded to remote address localhost:8783
debug1: Local forwarding listening on 127.0.0.1 port 8783.
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on ::1 port 8783.
debug1: channel 1: new [port listener]
debug1: channel 2: new [client-session]
debug1: Entering interactive session.
Last login: Mon Sep 2 04:02:40 2013 from vpnipaddress
So I think I'm still succeeding at the VPN and SSH stage (though I don't know why it says my last login was Sep 2 when I've logged in a few times since then).
Next, I open Firefox, and I type localhost:8783, and instead of getting an RStudio server app through my browser window, I get the following errors:
In the Firefox browser window, it says: Server not found, Firefox can't find the server at www.localhost.com, Check the address for typing errors etc.
In the terminal window, it says:
debug1: Connection to port 8783 forwarding to localhost port 8783 requested.
debug1: channel 3: new [direct-tcpip]
channel 3: open failed: connect failed: Connection refused
debug1: channel 3: free: direct-tcpip: listening port 8783 for localhost port 8783, connect from 127.0.0.1 port 50420, nchannels 4
I'm not sure what I've got wrong. I haven't changed anything on my laptop since my last successful connection. I'm on my own router (instead of my cousin's), so maybe I need to mess with the firewall? I already allowed ports 22 and 8783 to come through the firewall to my laptop (I'm not even sure I needed to do that though). Help?
ssh -v -L 8783:localhost:8783 myacct#server.com
...
channel 3: open failed: connect failed: Connection refused
When you connect to port 8783 on your local system, that connection is tunneled through your ssh link to the ssh server on server.com. From there, the ssh server makes TCP connection to localhost port 8783 and relays data between the tunneled connection and the connection to target of the tunnel.
The "connection refused" error is coming from the ssh server on server.com when it tries to make the TCP connection to the target of the tunnel. "Connection refused" means that a connection attempt was rejected. The simplest explanation for the rejection is that, on server.com, there's nothing listening for connections on localhost port 8783. In other words, the server software that you were trying to tunnel to isn't running, or else it is running but it's not listening on that port.
Posting this to help someone.
Symptom:
channel 2: open failed: connect failed: Connection refused
debug1: channel 2: free: direct-tcpip:
listening port 8890 for 169.254.76.1 port 8890,
connect from ::1 port 52337 to ::1 port 8890, nchannels 8
My scenario; i had to use the remote server as a bastion host to connect elsewhere. Final Destination/Target: 169.254.76.1, port 8890. Through intermediary server with public ip: ec2-54-162-180-7.compute-1.amazonaws.com
SSH local port forwarding command:
ssh -i ~/keys/dev.tst -vnNT -L :8890:169.254.76.1:8890
glue#ec2-54-162-180-7.compute-1.amazonaws.com
What the problem was:
There was no service bound on port 8890 in the target host. i had forgotten to start the service.
How did i trouble shoot:
SSH into bastion host and then do curl.
Hope this helps.
Note: localhost is the hostname for an address using the local (loopback) network interface, and 127.0.0.1 is its IP in the IPv4 network standard (it's ::1 in IPv6). 0.0.0.0 is the IPv4 standard "current network" IP address.
I experienced this error with a Docker setup. I had a Docker container running on an external server, and I'd (correctly) mapped its ports out as 127.0.0.1:9232:9232. By port-forwarding ssh remote -L 9232:127.0.0.1:9232, I'd expected to be able to communicate with the remote server's port 9232 as if it were my own local port.
It turned out that the Docker container was internally running its process on 127.0.0.1:9232 rather than 0.0.0.0:9232, and so even though I'd specified the container's port-mappings correctly, they weren't on the correct interface for being mapped out.
In my case, it worked after running the vncserver on linux.
Entered this on linux command line : sudo ssh -L 5901:localhost:5901 -i <ssh_private_key> <username>#<public-IP-address>
Type there vncserver
Go to VncViewer application and connect using localhost:5901
I used to meet the similar problem because 'localhost' was not available on server when it restarted network service, e.g. 'ifdown -a' but followed by only 'ifup -eo1'. Besides server is not listening to the port, you can also check 'localhost' is available or not.
ps: Post it just hope someone who has the similar problem may benefit.
I had this problem when I wanted to make a vnc connection via a tunnel.
But the vncserver was not running.
I solved it by opening the channel on the remote machine with vncserver :3.
In my case, it worked after checking the correct IP address of the user credentials
previously I was using the wrong IP of the server
ssh -NfL 127.0.0.1:8084:127.0.0.1:8888 user#ip_address_of_server
after correcting it, works fine.
Encountered with the same error.
In my case, I found the problem was in the config file of jupyter.
Let's say there are 3 computers named A, B, and C, and A can access B but can't access C; B can access C.
To access jupyter-notebook service of C from A, first I established ssh tunnel from A to C through B, then I access jupyter-notebook by typing localhost:port_number, then I got the error.
Finally the problem was solved by writing the "c.NotebookApp.ip = '0.0.0.0'" in jupyter-notebook's config file, where '0.0.0.0' allows the access of other IPs.
Hope someone in a similar situation may benefit.
I had the same error when I was trying to tunnel my mlflow ui over ssh to view remotely. As mentioned in the first answer, the error arises because nothing on the server is listening for the port. This, for me, is because I forgot to start the mlflow app on my remote machine! So in general – make sure the app you're trying to access remotely is running.
Just replace localhost with 127.0.0.1.
(The answer is based on answers of other people on this page.)
This means the remote vm is not listening to current port i solved this by adding the port in the vm server