Good day to all! Please help solve the already classic quest with xDebug :)

So, we have:

Remote server (shared hosting from nic.ru), FreeBSD / Apache + Nginx / PHP-5.6, xdebug 4.2.1 successfully assembled and installed, phpinfo () confirms this. XDebug settings in php.ini:

zend_extension="/home/nosorog/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/nosorog/logs/xdebug/xdebug.log" xdebug.profiler_output_dir="/home/nosorog/logs/xdebug/profiler/" xdebug.trace_output_dir="/home/nosorog/logs/xdebug/trace/" 

In general, xDebug is launched, logs are being written, an attempt to establish a connection when the site page is updated also takes place (more on this below).

The port is non-standard (because I read the opinion that 9000 sometimes deals with some kind of Apache extensions), but it is registered correctly everywhere, I checked it first. Other port numbers also tried, just in case.

Locally: WinXP, NetBeans 8.1, forward the reverse ssh tunnel using Putty:

 R9009 - localhost:9009 

check on that side with netstat -a | grep 9009:

 tcp6 0 0 localhost.9009 *.* LISTEN 

there is a tunnel, the port is listening.

Problem:

When you try to start a debug session (considering that autostart = 1, to do this, simply update the page of the site) - on the other side there is an attempt to connect,

 tcp4 0 0 nosorog.nichost..14107 localhost.9009 SYN_SENT tcp6 0 0 localhost.9009 *.* LISTEN 

but here netbins does not reagent. On the server in xDebuga logs -

 E: Time-out connecting to client. :-( 

after a couple of seconds on the server, the connection goes to time-veit

 tcp4 0 0 nosorog.nichost..14107 localhost.9009 TIME_WAIT tcp6 0 0 localhost.9009 *.* LISTEN 

, and after some time the connection disappears completely, only the list remains:

 tcp6 0 0 localhost.9009 *.* LISTEN 

And now - weirdness:

  • if on the other side try ssh -p 9009 localhost or either nc localhost 9009 or telnet localhost 9009 - then the connection can be established: ON THE SERVER - netstat shows localhost: 9009 ESTABLISHED; BY LOCAL MACHINE - test listener accepts a connection; netbins either ignore (if ssh or telnet comes from there or crashes (if nc from there, that is, in principle, it responds ; and wireshark , in all cases (all six possible combinations), it sees traffic , in other words, the tunnel is operational in principle;

  • and if from the other side trying to connect xDebug or a test script (the essence of which is reduced to sock.connect(('localhost', 9009)) , the script is locally checked) - the connection does NOT happen ( ON THE SERVER - SYN_SENT on the port and time out blade, LOCAL - complete silence in both netstat and wireshark ).

Actually, the question is:

how to be? where else to dig? What could I miss? What is the fundamental difference between these 2 options (why can some, and others not)?

my knowledge of niksov and network science is over, so I appeal :)

Thanks in advance for any hints.

  • Does NetBeans have the correct port / ide key specified in the settings? Well, maybe you have any problems with the firewall and port listening applications? - Dmitriy Simushev 3:51
  • port / ide-key - yes, the same as in php.ini (9009, netbeans-xdebug) - AlexandrX
  • The firewall was completely shut down for the duration of the tests, both regular and comodo ... but that's the problem - even if you turn on comodo on the local machine and run the test listener - ssh and telnet from the remote server successfully connect, and xdebug - no ... t. e. on the local machine, I did not change anything, I took advantage of another tool on the server - the situation changed ... therefore it seems to me that the firewall does not interfere here even when it is on ... but of course, just in case, I completely cut it off when I try something something else to protest ... - AlexandrX

0