eclipse debug can not connect to VM - eclipse

Eclipse remote debug: can not connect to VM.
After starting tomcat,
telnet localhost 8787
works.
Then in eclipse, I tried to enable remote debug, got error: can not connect to VM.
telnet localhost 8787
will not work anymore.
What is the problem? It suddenly stopped working without any reason.
Thanks.

Related

Connect to a remote host from terminal works but not from deployment

I was trying to connect to a remote server from the terminal (PyCharm IDE in Mac), and it works.
I tried to connect to the same remote host from Deployment to see the files on the server, and I am getting the error
"host not found"
connecting from tools->deployment->brows remote host error

Connecting Xdebug with NetBeans and Vagrant

I have spent quite a bit of time on this with no success. I am trying to connect my Xdebug through NetBeans to my Vagrant server.
The IP address of the Vagrant box is 192.168.33.10.
When NetBeans opens the debugging connection it says that it's looking at 192.168.33.1.
My php.ini settings are as follows
zend_extension=/usr/lib/php/20151012/xdebug.so
xdebug.profiler_enable=1
xdebug.profiler_output_name="cachegrind.out.%t.%p"
xdebug.collect_params=4
xdebug.collect_return=1
xdebug.remote_enable=1
xdebug.remote_log = /tmp/xdebug.log
xdebug.remote_port = 9000
xdebug.remote_host=192.168.33.1
xdebug.remote_handler="dbgp"
xdebug.remote_autostart=0
xdebug.idekey="vagrant"
xdebug.remote_mode=req
;xdebug.remote_connect_back=1
In NetBeans my project URL is set to http://192.168.33.1:9000
debugger port is 9000 and Session ID is vagrant.
I know that NetBeans also looks at IP address 10.0.2.2 and I can't get this going either. When I run the debugger NetBeans just says that it's waiting for connection and my log stats that the connection has timed out.
I have also tried it with remote_connect_back=1 and to no avail.
Thank LazyOne for your feedback much appreciated
What I had to do to get this going was to open the ports 9000 on my windows machine and port 9000 on my server. I then login to my ssh server connecting to 127.0.0.1:2222 as specified by the vagrant bootup messages. Then set up a ssh tunnel to connect to port 9000. I did this using putty

MongoDB Server Ubuntu 16.04

I've installed MongoDB on my Ubuntu 16.04 VPS and allowed connections through the firewall. When I run the server using the command (mongod), it starts without a problem and I can then connect to it (using RoboMongo as test application).
However, when I run the service automatically on startup (using systemctl), I cannot connect to it. I verified it was running, and could not run it myself as the address was already in use.
Does anyone have any experience with this, or any tips on how to solve the problem? The server will be running localhost only and I'm going to be using an SSH tunnel for testing purposes, so no authentication is necessary.
Anyone?
When you started mongod did you then provide a configuration file (using the --config or -f parameter)? If not then it defaults to listening on all interfaces.
The default configuration file which is used when starting the daemon with systemctl defaults to only listen on localhost preventing it from being available on the network. This is fine if you intend to connect to the server using a tunnel.

Remote xDebug not connected to NetBeans, despite the xdebug and ssh-tunnel works?

I have a trouble with the connection from remote xDebug to local NetBeans debugger.
Synopsis:
Remote server: FreeBSD (shared hosting, no root), Apache/Nginx, PHP5.6.
I've installed and configured xdebug with following settings in php.ini:
[debug]
zend_extension="/home/USERNAME/usr/php/lib/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_host=localhost
xdebug.remote_port=9009
;xdebug.remote_connect_back=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
xdebug.remote_log="/home/USERNAME/logs/xdebug/xdebug.log"
xdebug.profiler_output_dir="/home/USERNAME/logs/xdebug/profiler/"
xdebug.trace_output_dir="/home/USERNAME/logs/xdebug/trace/"
USERNAME - is a real user name folder... in other words, the paths are correct, it is tested.
autostart - is just for now, until I will solve a problem.
phpinfo() tells me that xdebug installed successfully.
Local machine:
Windows XP, NetBeans, firewalls are off.
I have no a reserved IP, so I've created a reverse SSH-Tunnel via Putty:
R9009 - localhost:9009
Remote 9009 port forwards to local 9009, everything seems simple.
Next I went back to remote server and check the tunnel by netstat -a|grep 9009
tcp6 0 0 localhost.9009 *.* LISTEN
Ok, next I checked xDebug activity by refreshing my website page in my browser; due to autostart options any request should cause a xdebug data transmittion, and my test shown me that xdebug works well:
tcp4 0 0 nosorog.nichost..14107 localhost.9009 SYN_SENT
tcp6 0 0 localhost.9009 *.* LISTEN
Ok, xDebug tries to establish connection to localhost:9000, but nothing happens on my local machine...
xdebug's log contains the timeout message:
E: Time-out connecting to client. :-(
So, what I've tried:
First, I decided to re-check if ssh-tunnel works. I just ran simple python script-listener on local machine, and ssh -p 9009 localhost on remote server, and connection was successful.
Ok, tunnel works well.
BUT neither netbeans nor listener-script receive any connection when xdebug tries to establish connection.
UPD:
I've tried to establish connection with telnet or nc, and that was successfull too...
So at this moment:
if I try to connect from remote to local via ssh or telnet or netcat - connection is successfull (test script accepts connection, netbeans ignores (if I connect via ssh or telnet) or crashes (if i connect via netcat), but wireshark sees packets in both cases);
but if xDebug or test script with sock.connect(('localhost', 9009)) tries to connect - there are SYN_SENT port state and timeout erroron remote machine, and no reaction on local machine (just LISTEN at port 9009 and nothing at all in wireshark)
I guess the clue is what is the key difference between first and second cases?

Remote debugging tomcat with OpenShift

I am using openshift for my tomcat webapp. I am able to run the app but unable to debug it. As openshift starts tomcat in debug mode, I was expecting I'll be able to debug.
Host:
$OPENSHIFT_JBOSSEWS_IP
Value of this is 127.5.20.129 for me which I got from command:
rhc port-forward -a {appname}
Port:
$OPENSHIFT_JBOSSEWS_HTTP_PORT
Value is 8080 for me.
I tried above host/port. I tried port 8000 too but nothing works. I am unable to connect from eclipse remote debugger each time.
Please help.
You should read through the Developer Portal's pages on Port Forwarding (https://developers.openshift.com/en/managing-port-forwarding.html) to make sure that you are using it correctly. You will want to connect to your local loopback address: 127.0.0.1 along with the correct forwarded port once you have run the port-forwarding command.