Menu

Error: Could not connect to debug port!

Help
2007-08-31
2021-08-12
  • Jeff Hancock

    Jeff Hancock - 2007-08-31

    I am running Eclipse 3.2.2 with EPIC 0.6.13.  I am unable to start a debug session even with a fresh load of Eclipse.

    I turned the logging on so here are the results.

    From the web server log:
    Found default config file
    Server started on 5004
    LOG: 5 5004-server: main.: starting handler: cgi
    LOG: 5 5004-server: main.: starting handler: file
    LOG: 4 5004-server: 0:0:0:0:0:0:0:1: new connection
    LOG: 3 5004-0:0:0:0:0:0:0:1-0: Request 24 GET /index.pl HTTP/1.1
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: main.: invoking handler: cgi
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: suffix=.cgi,.pl root=C:/data/metadot url: /index.pl
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: Checking for suffix: .cgi
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: looking for: C:\data\metadot\index.pl.cgi
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: Checking for suffix: .pl
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: looking for: C:\data\metadot\index.pl
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: found: C:\data\metadot\index.pl
    LOG: 5 5004-0:0:0:0:0:0:0:1-0: CGI output 0 bytes.
    LOG: 3 5004-0:0:0:0:0:0:0:1-0: request done
    LOG: 3 5004-0:0:0:0:0:0:0:1-0: Error: 408 Request Time-out: Read timed out
    LOG: 4 5004-0:0:0:0:0:0:0:1-0: socket close

    From the CGI Process log:
    ***********************************************************
    Requested URI: /index.pl
    ---------------------CGI Command Line----------------------
    perl
    -IC:/data/metadot
    -Ic:/data/metadot/Gizmo
    -Ic:/data/metadot
    -IC:/data/metadot/metadot_core/metadot
    -IC:/Documents and Settings/Jeff/My Documents/Business/Affinity Portals/portal/webstore/webstore_core
    -IC:/Documents and Settings/Jeff/My Documents/Business/Affinity Portals/portal/.metadata/.plugins/org.epic.debug
    -d
    C:\data\metadot\index.pl

    -------------------Environment Variables-------------------
    HTTP_HOST=localhost:5004
    HTTP_USER_AGENT=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
    HTTP_ACCEPT=text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    HTTP_ACCEPT_LANGUAGE=en-us,en;q=0.5
    HTTP_ACCEPT_ENCODING=gzip,deflate
    HTTP_ACCEPT_CHARSET=ISO-8859-1,utf-8;q=0.7,*;q=0.7
    HTTP_KEEP_ALIVE=300
    HTTP_CONNECTION=keep-alive
    HTTP_REFERER=http://localhost:5004/index.html
    HTTP_COOKIE=sessionid=fGyM8t2lEIzaIr0f36l
    GATEWAY_INTERFACE=CGI/1.1
    SERVER_SOFTWARE=Mini Java CgiHandler 0.2
    SERVER_NAME=192.168.0.101
    PATH_INFO=
    SCRIPT_NAME=/index.pl
    SERVER_PORT=5004
    REMOTE_ADDR=0:0:0:0:0:0:0:1
    PATH_TRANSLATED=C:/data/metadot
    REQUEST_METHOD=GET
    SERVER_PROTOCOL=HTTP/1.1
    QUERY_STRING=
    SERVER_URL=http://localhost:5004
    USERPROFILE=C:\Documents and Settings\Jeff
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    PERLDB_OPTS=RemotePort=192.168.0.101:5000 DumpReused ReadLine=0
    JAVA_HOME=C:\Progra~1\Java\jre1.5.0_04
    TEMP=C:\DOCUME~1\Jeff\LOCALS~1\Temp
    COMMONPROGRAMFILES=C:\Program Files\Common Files
    HOMEDRIVE=C:
    PROCESSOR_REVISION=0905
    SYSTEMDRIVE=C:
    SQLPATH=C:\XEClient\sqlplus
    USERDOMAIN=JEFF-D600
    QTJAVA=C:\Program Files\Java\jre1.6.0_01\lib\ext\QTJava.zip
    ALLUSERSPROFILE=C:\Documents and Settings\All Users
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 9 Stepping 5, GenuineIntel
    SESSIONNAME=Console
    TMP=C:\DOCUME~1\Jeff\LOCALS~1\Temp
    CLASSPATH=.;C:\Program Files\Java\jre1.6.0_01\lib\ext\QTJava.zip
    PROCESSOR_ARCHITECTURE=x86
    LOGONSERVER=\\JEFF-D600
    PATH=C:\XEClient\bin;c:\data\perl\bin;c:\data\ImageMagick;c:\data\mysql\bin;c:\data\apache\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\j2sdk1.4.2_04\bin;C:\Program Files\DataDirect\slodbc54\;C:\php\;C:\data\php;C:\Program Files\Palm;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\SSH Communications Security\SSH Secure Shell;C:\Program Files\Common Files\Ahead\Lib\;C:\Program Files\Common Files\Ahead\Lib\;C:\Program Files\Common Files\Ahead\Lib\;C:\Program Files\Common Files\Ahead\Lib\;C:\Program Files\Common Files\Ahead\Lib\ OS=Windows_NT
    FP_NO_HOST_CHECK=NO
    HOMEPATH=\Documents and Settings\Jeff
    COMSPEC=C:\WINDOWS\system32\cmd.exe
    PROCESSOR_LEVEL=6
    PROGRAMFILES=C:\Program Files
    COMPUTERNAME=JEFF-D600
    NUMBER_OF_PROCESSORS=1
    SYSTEMROOT=C:\WINDOWS
    USERNAME=Jeff
    TZ=EST5EDT
    WINDIR=C:\WINDOWS
    APPDATA=C:\Documents and Settings\Jeff\Application Data
    -----------------------Script Output-----------------------
    Cannot chdir to C:\data\metadot\index.pl: No such file or directory at C:/Documents and Settings/Jeff/My Documents/Business/Affinity Portals/portal/.metadata/.plugins/org.epic.debug/epic_breakpoints.pm line 76
    Compilation failed in require at C:/Documents and Settings/Jeff/My Documents/Business/Affinity Portals/portal/.metadata/.plugins/org.epic.debug/perl5db.pl line 5238.
    BEGIN failed--compilation aborted at C:/Documents and Settings/Jeff/My Documents/Business/Affinity Portals/portal/.metadata/.plugins/org.epic.debug/perl5db.pl line 5238.
    Compilation failed in require.
    BEGIN failed--compilation aborted.

    From netstat:
    C:\Documents and Settings\Jeff\My Documents>netstat

    Active Connections

      Proto  Local Address          Foreign Address        State
      TCP    JEFF-D600:1062         localhost:40000        ESTABLISHED
      TCP    JEFF-D600:1105         localhost:27015        ESTABLISHED
      TCP    JEFF-D600:2435         localhost:2436         ESTABLISHED
      TCP    JEFF-D600:2436         localhost:2435         ESTABLISHED
      TCP    JEFF-D600:2438         localhost:2439         ESTABLISHED
      TCP    JEFF-D600:2439         localhost:2438         ESTABLISHED
      TCP    JEFF-D600:2500         localhost:6999         TIME_WAIT
      TCP    JEFF-D600:2537         localhost:6999         TIME_WAIT
      TCP    JEFF-D600:2592         localhost:6999         TIME_WAIT
      TCP    JEFF-D600:27015        localhost:1105         ESTABLISHED
      TCP    JEFF-D600:40000        localhost:1062         ESTABLISHED
      TCP    JEFF-D600:1076         64.68.120.228:http     ESTABLISHED
      TCP    JEFF-D600:1289         192.168.0.181:netbios-ssn  ESTABLISHED
      TCP    JEFF-D600:2501         ro-in-f99.google.com:http  FIN_WAIT_1
      TCP    JEFF-D600:2538         ar-in-f164.google.com:http  TIME_WAIT
      TCP    JEFF-D600:2577         google-ssl-2.ostg.com:https  FIN_WAIT_1
      TCP    JEFF-D600:2593         ar-in-f165.google.com:http  TIME_WAIT
      TCP    JEFF-D600:4932         by2msg2104608.phx.gbl:1863  ESTABLISHED
      TCP    JEFF-D600:5004         JEFF-D600:1195         TIME_WAIT       0

    I get processes spawned on ports 5001, 5003, and 5003 also but they go away when I close the error dialog.

    Can you help me et a debug session going?

     
    • Jan Ploski

      Jan Ploski - 2007-08-31

      1) Is there a file C:\data\metadot\index.pl on your disk?
      2) Did you use backslashes anywhere in setting up the launch configuration? (If so, try using slashes.)

      The module epic_breakpoints.pm invokes the function Cwd::abs_path to determine an absolute path of a file. For some strange reason, this function attempts to change directory to "C:\data\metadot\index.pl" in your case, which obviously fails. It would be useful to know what argument abs_path is invoked with in case of failure. To find out, you could edit C:/Documents and Settings/Jeff/My Documents/Business/Affinity
      Portals/portal/.metadata/.plugins/org.epic.debug/epic_breakpoints.pm and insert some debugging output before line 76. Something like:

      open(FL, '>>c:/temp.txt');
      print FL "calling abs_path with $path\n";
      close(FL);

      This should provide (among others) the path which makes abs_path fail. You could then examine it further, e.g. create a little script which calls abs_path with just this argument and observe what happens.

      Note: I'm not 100% sure if epic_breakpoints.pm is or is not overwritten each time you start a debug session. If it is overwritten, causing your change to become lost, then you'd have to change the version of epic_breakpoints.pm which is zipped in the org.epic.debug plugin JAR (unzip, edit, zip again). Or you could set up a hosted workbench as explained in the EPIC devguide and edit version of epic_breakpoints.pm in the host workbench

       
    • Jeff Hancock

      Jeff Hancock - 2007-09-01

      The file C:\data\metadot\index.pl does exist on my disk.

      I did use backslashes for the HTML Root Directory, HTML Startup File, and CGI Root Directory entries in the Run/Debug configuration.  I will change those to slashes and let you know the results. 

      It may take a few days due to the holiday weekend in the US but I will report the results.

       
  • John Arnold

    John Arnold - 2021-08-04

    This issue reoccurred on my latest install of Eclipse and e-p-i-c plugin
    Eclipse 2021-06 and plugin version 0.7.x
    I was given (by my employer) a new laptop. I installed identical s/w on my new that was on my previous (Strawberry Perl, Eclipse and plugin). OS and network settings identical, no difference in Antivirus (AV was disabled for a period while I did a troubleshooting test, along with connection to open network)
    I have review all previous posts (SF etc) on this topic, reviewed CWD.pm, checked perl5db.pl - Nada
    Thoughts?

     
    • Jan Ploski

      Jan Ploski - 2021-08-04

      Take note of the PERLDB_OPTS environment variable passed to the perl -d process when you start the debugging session. In the original poster's example

      PERLDB_OPTS=RemotePort=192.168.0.101:5000 DumpReused ReadLine=0

      This means that the perl -d subprocess will try establishing a TCP connection to 192.168.0.101:5000, which is where the EPIC IDE should be listening for it.

      Check with netstat -a that the port is indeed being listened to (once you launch a debug session) and that the IP address being listened to is the same as the one appearing in PERLDB_OPTS.

      You could also simulate the TCP listening server yourself using netcat ( e.g. netcat -l -s 192.168.0.101 -p 5000) and simulate the TCP client (netcat 192.168.0.101 5000) to check that it works on that level.

       
      • John Arnold

        John Arnold - 2021-08-04

        Jan

        OK. How do I display PERLB_OPTS? The debug fails as soon as it is initiated.
        I cannot run netcat - I do not have authority to install unauthorised s/w
        on my work laptop

        On Wed, Aug 4, 2021 at 1:07 PM Jan Ploski jploski@users.sourceforge.net
        wrote:

        Take note of the PERLDB_OPTS environment variable passed to the perl -d
        process when you start the debugging session. In the original poster's
        example

        PERLDB_OPTS=RemotePort=192.168.0.101:5000 DumpReused ReadLine=0

        This means that the perl -d subprocess will try establishing a TCP
        connection to 192.168.0.101:5000, which is where the EPIC IDE should be
        listening for it.

        Check with netstat -a that the port is indeed being listened to (once you
        launch a debug session) and that the IP address being listened to is the
        same as the one appearing in PERLDB_OPTS.

        You could also simulate the TCP listening server yourself using netcat (
        e.g. netcat -l -s 192.168.0.101 -p 5000) and simulate the TCP client
        (netcat 192.168.0.101 5000) to check that it works on that level.


        Error: Could not connect to debug port!
        https://sourceforge.net/p/e-p-i-c/discussion/258688/thread/f8f575ca/?limit=25#465e/61aa


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/e-p-i-c/discussion/258688/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/

         
        • Jan Ploski

          Jan Ploski - 2021-08-04

          You can see PERLDB_OPTS by first checking Preferences > Perl > Enable debugger console (experimental). Then when you launch the debug session, an entry is added to the "Error Log" view (if your Eclipse has it) with the perl -d command line and environment variables, among them PERLDB_OPTS. If you don't have Error Log, the same information is written to file ...path-to-workspace/.metadata/.log

           
          • John Arnold

            John Arnold - 2021-08-05

            From the .log file
            PERLDB_OPTS=RemotePort=5000 DumpReused ReadLine=0 PrintRet=0

            Regards

             
            • Jan Ploski

              Jan Ploski - 2021-08-05

              Can't be, the RemotePort must also include an IP address (or at least a colon before the port number). And you should check with netstat -a whether that IP address and port number are being listened on (when you launch the debug session).

               
              • John Arnold

                John Arnold - 2021-08-05

                Sorry - I typed manually:

                Actual value PERLDB_OPTS=RemotePort=10.0.0.76:5000 DumpReused ReadLine=0
                PrintRet=0
                netstat does not show port 5000 in use

                On Thu, Aug 5, 2021 at 4:42 PM Jan Ploski jploski@users.sourceforge.net
                wrote:

                Can't be, the RemotePort must also include an IP address (or at least a
                colon before the port number). And you should check with netstat -a whether
                that IP address and port number are being listened on (when you launch the
                debug session).


                Error: Could not connect to debug port!
                https://sourceforge.net/p/e-p-i-c/discussion/258688/thread/f8f575ca/?limit=25#465e/61aa/ced8/5ccf/ed13/3721


                Sent from sourceforge.net because you indicated interest in
                https://sourceforge.net/p/e-p-i-c/discussion/258688/

                To unsubscribe from further messages, please visit
                https://sourceforge.net/auth/subscriptions/

                 
                • Jan Ploski

                  Jan Ploski - 2021-08-05

                  Are we talking about a "Perl Local" or "Perl Remote" launch configuration here? Is 10.0.0.76 the IP of your host? Are you able to listen on 10.0.0.76:5000 and connect to it yourself (you said you can't install netcat, but maybe with a Perl script)?

                   
                  • John Arnold

                    John Arnold - 2021-08-12

                    Jan et al,

                    Resolved: (or at least root cause identified). It turns out that this issue
                    only occurs when I am connected via VPN to the company's host network. When
                    'offline' the Perl debugger is enabled.
                    Thank you for your input/advice.

                    On to the next issue: perl debug output displayed on console
                    pane...hopefully I'll fix that soon

                    On Thu, Aug 5, 2021 at 5:10 PM Jan Ploski jploski@users.sourceforge.net
                    wrote:

                    Are we talking about a "Perl Local" or "Perl Remote" launch configuration
                    here? Is 10.0.0.76 the IP of your host? Are you able to listen on
                    10.0.0.76:5000 and connect to it yourself (you said you can't install
                    netcat, but maybe with a Perl script)?


                    Error: Could not connect to debug port!
                    https://sourceforge.net/p/e-p-i-c/discussion/258688/thread/f8f575ca/?limit=25#465e/61aa/ced8/5ccf/ed13/3721/6203/f06d


                    Sent from sourceforge.net because you indicated interest in
                    https://sourceforge.net/p/e-p-i-c/discussion/258688/

                    To unsubscribe from further messages, please visit
                    https://sourceforge.net/auth/subscriptions/

                     
                    • Jan Ploski

                      Jan Ploski - 2021-08-12

                      "perl debug output displayed on console
                      pane" - perhaps because "Preferences > Perl > Enable debugger console (experimental)" is still enabled?

                       

Log in to post a comment.