NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] failed to connect to the client address...


Joined: 01 Aug 2007
Posts: 7
Reply with quote
Hi,
I'm afraid I need some help ;(

I have installed PHP-5.1 with Apache 2.2.3 on Centos5. It works fine.
I struggled with installing debugger but I finally managed to do this.

The phpinfo() reports followings:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with DBG v3.1.6, (C) 2000,2006, by Dmitri Dmitrienko

and:

dbg
DBG DBG php debugger, version 3.1.6, Copyright 2001, 2006 Dmitri Dmitrienko, http://www.nusphere.com/dbg

Version 3.1.6
Linked as a shared library.
Dbg SSL not available
Dbg ip security enabled.
Profiler enabled
Target PHP version 5.1.4
Server API Apache 2.0 Handler
Extensions API 220051025
Modules API 20050922
PHP API 20041225

Directive Local Value Master Value
debugger.enable_session_cookie On On
debugger.enabled On On
debugger.fail_silently Off Off
debugger.hosts_allow protected value protected value
debugger.hosts_deny protected value protected value
debugger.ignore_nops Off Off
debugger.JIT_enabled Off Off
debugger.JIT_host clienthost clienthost
debugger.JIT_level 3 3
debugger.JIT_port 7869 7869
debugger.net.chunksize 48000 48000
debugger.net.maxpacketsize 4096000 4096000
debugger.ports protected value protected value
debugger.profiler_enabled On On
debugger.session_nocache On On
debugger.timeout_seconds 300 300


The debugger section in php.ini has following content:
[debugger]
debugger.enabled = on
debugger.hosts_allow = localhost, 127.0.0.1, 192.168.32.11, 192.168.32.28
debugger.hosts_deny = all
debugger.ports = 10000/16, 7868

The project settings:
Run mode: HTTP mode (3rd party WEB server)
Root URL: http://mywebserver/

Debugger settings:
Use custom port and hots (checked)
Debugger port: 7869
Debugger host: clienthost
...


What is wrong?
Independently what I do, I am always getting following message:

Pop-up window:
Failed to start debug session.
Please verify if degugger module is installed on the server that corresponds to "httpd//192.168.32.28/accounts.php" URL


Content of the output:
DBG 3.1.6

Failed to run DBG session

Reason: failed to connect to the client address 192.168.32.11:7869
Not sure what it means? Visit http://www.nusphere.com/dbg/ for troubleshooting.

Debugger request: "392964324016100007@clienthost;d=1,p=0,c=1"
Request found in: "query_string"
Target PHP version: "5.1.4"
Server API: "Apache 2.0 Handler"
Extensions API: "220051025"
Modules API: "20050922"
PHP API: "20041225"


I tested "telnet 192.168.32.11 7869" from my server and it works pretty fine.

Moreover, when testing with analogical server platform (Contos4.4, apache-2.0, PHP-5.1) the debugger works well (all settings except URL in project settings are the same).

Is there any other way except phpinfo() and dbg-wizard.php to test that debugger is really installed? Sad


Last edited by polymer on Tue Aug 14, 2007 8:13 am; edited 2 times in total
View user's profileFind all posts by polymerSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
I tested "telnet 192.168.32.11 7869" from my server and it works pretty fine.

please check if it's firewall affair and it blocks Apache process (it's httpd) from connecting to your client machine.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 01 Aug 2007
Posts: 7
Reply with quote
Hi dimitri,
thx for reply

both firewalls on windows (where phpEd is installed) and linux (server) are turned off
View user's profileFind all posts by polymerSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
failed to connect to the client address 192.168.32.11:7869

It means that debugger module tried to connect to 192.168.32.11 on TCP/7869 port and connection was refused.
please check that 192.168.32.11 is your workstation IP,
check that DbgListener is running and has its socket opened at 192.168.32.11 address (or 0.0.0.0) on 7869 port (netstat -naop will show all LISTENing sockets)
check that telnet running on the server can connect to 192.168.32.11 on 7869 port

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 01 Aug 2007
Posts: 7
Reply with quote
Quote:
please check that 192.168.32.11 is your workstation IP,


Yes, this is a correct IP. I have checked output from ipconfig /all

Quote:
check that telnet running on the server can connect to 192.168.32.11 on 7869 port

I wrote it in my first post.
I am able to make connection using telnet from server to workstation.
The DBGlistener is reporting connection during such test so everything seems to be right.
View user's profileFind all posts by polymerSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
then please check if httpd process is not allowed to make such connections. Can you try to connect from php?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 01 Aug 2007
Posts: 7
Reply with quote
I am not quite sure dmitri how to do that.

I was trying to use ssh2_connect function to make connection from php but it seems that this group of functions is not supported by my PHP version.
Do you know any simple way to test it?
Is there any command-line command that could be used to test apache access abilities from the server site?
View user's profileFind all posts by polymerSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
http://www.php.net/manual/en/function.fsockopen.php

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 01 Aug 2007
Posts: 7
Reply with quote
thx dmitri

I finally fixed it. It was nothing wrong with debugger.
The culprit here was selinux that kept apache from opening port 7869.
After some changes the debugger works pretty well right now.
View user's profileFind all posts by polymerSend private message


Joined: 25 Jul 2006
Posts: 70
Reply with quote
Just an additional tip, I had this problem and determined it was getting a permission denied due to SELinux being enabled. You can edit the /etc/selinux/config file to disable it.
View user's profileFind all posts by cpriestSend private message
[resolved] failed to connect to the client address...
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic