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 localhostor eithernc localhost 9009ortelnet 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 (ifsshortelnetcomes from there or crashes (ifncfrom 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_SENTon 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.