cancel
Showing results for 
Search instead for 
Did you mean: 

Remote Debugging with Eclipse

ghernando
Champ in-the-making
Champ in-the-making
What must I set in the development environment to enable remote debugging of the server code in Eclipse?

Thanks!
31 REPLIES 31

chrisokelly
Champ on-the-rise
Champ on-the-rise
Is it at all possible to debug Alfresco from a machine OTHER than the one that it (Tomcat et al) runs on? I see plenty of information all over the wiki and forums on setting up eclipse and tomcat in the same location, but nothing for connecting from a remote machine (what I actually thought this thread would be, but does not appear to be). Is it simply impossible? We have no GUI on the Ubuntu machine serving Alfresco for us, and the IT manager wants it to stay that way, meaning Eclipse just will not happen for me in this installation. I have a windows 7 PC that I do almost all my actual work on, through Putty and onto the server. Is there any way I can set up debugging from this computer?

rdanner
Champ in-the-making
Champ in-the-making
Is it at all possible to debug Alfresco from a machine OTHER than the one that it (Tomcat et al) runs on? I see plenty of information all over the wiki and forums on setting up eclipse and tomcat in the same location, but nothing for connecting from a remote machine (what I actually thought this thread would be, but does not appear to be). Is it simply impossible? We have no GUI on the Ubuntu machine serving Alfresco for us, and the IT manager wants it to stay that way, meaning Eclipse just will not happen for me in this installation. I have a windows 7 PC that I do almost all my actual work on, through Putty and onto the server. Is there any way I can set up debugging from this computer?


Yes it's even easier to debug than ever before

Start the alfresco server in debug mode
Then in eclipse
Run–>debug configurations

Create a Remote Java Application Profile
This will ask you for host and port

Now, if you need to deal with SSH it can get a little more tricky because you need to create an SSH tunnel on your machine which basically maps traffic on the remote machine through a port on your machine.
http://www.revsys.com/writings/quicktips/ssh-tunnel.html

Once you have the tunnel running you then set the server to localhost and the port to whatever port you map

chrisokelly
Champ on-the-rise
Champ on-the-rise
Yes it's even easier to debug than ever before

Start the alfresco server in debug mode
Then in eclipse
Run–>debug configurations

Create a Remote Java Application Profile
This will ask you for host and port

Now, if you need to deal with SSH it can get a little more tricky because you need to create an SSH tunnel on your machine which basically maps traffic on the remote machine through a port on your machine.
http://www.revsys.com/writings/quicktips/ssh-tunnel.html

Once you have the tunnel running you then set the server to localhost and the port to whatever port you map

Thanks for the response, When it asks for my port, should I be entering the port I would use to open it in browser (8080, 8443) or another? When you say if I need to deal with SSH I am not quite sure I follow… SSH is already working fine via putty to the server, would it conflict with how Eclipse runs?

How exactly would I start Alfresco in Debug mode? I had a look around the wiki for this but could only find something to do with virtualization servers, and the process only seemed to be one of increasing logging levels.

At the moment when I try using 8080 it sits for a minute or so then gives me
Failed to connect to remote VM. Connection timed out. org.eclipse.jdi.TimeoutException

When I try 8443 I get -
Failed to connect to remote VM com.sun.jdi.connect.spi.ClosedConnectionException
straightaway. For the record, the reason I am trying to get debug working in the first place is to figure out why share died when I tried to configure SSL, so I am guessing that might contribute to the error on 8443.

rdanner
Champ in-the-making
Champ in-the-making
Yes it's even easier to debug than ever before

Start the alfresco server in debug mode
Then in eclipse
Run–>debug configurations

Create a Remote Java Application Profile
This will ask you for host and port

Now, if you need to deal with SSH it can get a little more tricky because you need to create an SSH tunnel on your machine which basically maps traffic on the remote machine through a port on your machine.
http://www.revsys.com/writings/quicktips/ssh-tunnel.html

Once you have the tunnel running you then set the server to localhost and the port to whatever port you map

Thanks for the response, When it asks for my port, should I be entering the port I would use to open it in browser (8080, 8443) or another? When you say if I need to deal with SSH I am not quite sure I follow… SSH is already working fine via putty to the server, would it conflict with how Eclipse runs?

How exactly would I start Alfresco in Debug mode? I had a look around the wiki for this but could only find something to do with virtualization servers, and the process only seemed to be one of increasing logging levels.

At the moment when I try using 8080 it sits for a minute or so then gives me
Failed to connect to remote VM. Connection timed out. org.eclipse.jdi.TimeoutException

When I try 8443 I get -
Failed to connect to remote VM com.sun.jdi.connect.spi.ClosedConnectionException
straightaway. For the record, the reason I am trying to get debug working in the first place is to figure out why share died when I tried to configure SSL, so I am guessing that might contribute to the error on 8443.

You want to use the JDP debugging port (By default it's 8000 with Alfresco 4.0)

You will only need to tunnel if your server is behind a firewall and you cannot get to port 8000 on the box from your box

chrisokelly
Champ on-the-rise
Champ on-the-rise
You want to use the JDP debugging port (By default it's 8000 with Alfresco 4.0)

You will only need to tunnel if your server is behind a firewall and you cannot get to port 8000 on the box from your box

for 8000 I get
Failed to connect to remote VM. Connection refused.
Connection refused: connect
I am 99.999% sure that the server is not behind a firewall (I haven't had to do special configuration for any of my other connections to it). I have not, myself, changed this port configuration. Should it appear when I rpcinfo -p localhost from the server?

rivetlogic
Champ on-the-rise
Champ on-the-rise
On the target machine, run "netstat -an" and look for your process. It must be binding port 8000 and the IP address can't be 127.0.0.1 (loopback won't pick up from remote connections).

If you're binding loopback, then change your container's configuration to bind 0.0.0.0.

To test, you can just telnet to your target machine to test the connection using: "telnet IP 8000" where IP is the IP of the target. Once this works, you should be in good shape.

–sumer

chrisokelly
Champ on-the-rise
Champ on-the-rise
On the target machine, run "netstat -an" and look for your process. It must be binding port 8000 and the IP address can't be 127.0.0.1 (loopback won't pick up from remote connections).

If you're binding loopback, then change your container's configuration to bind 0.0.0.0.

To test, you can just telnet to your target machine to test the connection using: "telnet IP 8000" where IP is the IP of the target. Once this works, you should be in good shape.

–sumer

Hi Sumer, I'm really sorry if I am being a tad dense here, I don't quite understand some of your terminology (alot of this is covering new ground for me). When I netstat -an on the VM running the Alfresco server I get -

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:58433           0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:8100          0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:389             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:8009            0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:47862           0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN
tcp        0      0 192.168.1.114:32965     192.168.1.200:445       ESTABLISHED
tcp        0      0 127.0.0.1:5432          127.0.0.1:50529         ESTABLISHED
tcp        1      0 127.0.0.1:34918         127.0.0.1:8009          CLOSE_WAIT
tcp        0      0 127.0.0.1:5432          127.0.0.1:50533         ESTABLISHED
tcp        1      0 127.0.0.1:34914         127.0.0.1:8009          CLOSE_WAIT
tcp        0      0 127.0.0.1:5432          127.0.0.1:50537         ESTABLISHED
tcp        0      0 127.0.0.1:5432          127.0.0.1:50530         ESTABLISHED
tcp        1      0 127.0.0.1:38862         127.0.0.1:8009          CLOSE_WAIT
tcp        0      0 127.0.0.1:5432          127.0.0.1:50536         ESTABLISHED
tcp        0      0 127.0.0.1:5432          127.0.0.1:50531         ESTABLISHED
tcp        1      0 127.0.0.1:34916         127.0.0.1:8009          CLOSE_WAIT
tcp        0      0 192.168.1.114:33059     192.168.1.200:389       ESTABLISHED
tcp        0      0 192.168.1.114:22        192.168.1.55:49737      ESTABLISHED
tcp        1      0 127.0.0.1:34911         127.0.0.1:8009          CLOSE_WAIT
tcp        0      0 127.0.0.1:8100          127.0.0.1:51117         ESTABLISHED
tcp        1      0 127.0.0.1:34920         127.0.0.1:8009          CLOSE_WAIT
tcp        1      0 127.0.0.1:34908         127.0.0.1:8009          CLOSE_WAIT
tcp        0      0 192.168.1.114:769       192.168.1.52:2049       ESTABLISHED
tcp        0      0 127.0.0.1:5432          127.0.0.1:50532         ESTABLISHED
tcp        1      0 127.0.0.1:34919         127.0.0.1:8009          CLOSE_WAIT
tcp        0      0 127.0.0.1:5432          127.0.0.1:50534         ESTABLISHED
tcp        1      0 127.0.0.1:34910         127.0.0.1:8009          CLOSE_WAIT
tcp        0      0 127.0.0.1:5432          127.0.0.1:50535         ESTABLISHED
tcp6       0      0 :::50500                :::*                    LISTEN
tcp6       0      0 :::36068                :::*                    LISTEN
tcp6       0      0 127.0.0.1:8005          :::*                    LISTEN
tcp6       0      0 :::389                  :::*                    LISTEN
tcp6       0      0 :::57734                :::*                    LISTEN
tcp6       0      0 :::139                  :::*                    LISTEN
tcp6       0      0 :::50508                :::*                    LISTEN
tcp6       0      0 :::36525                :::*                    LISTEN
tcp6       0      0 :::21                   :::*                    LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN
tcp6       0      0 ::1:5432                :::*                    LISTEN
tcp6       0      0 :::8443                 :::*                    LISTEN
tcp6       0      0 :::445                  :::*                    LISTEN
tcp6       0      0 :::7070                 :::*                    LISTEN
tcp6       0      0 127.0.0.1:50533         127.0.0.1:5432          ESTABLISHED
tcp6       0      0 127.0.0.1:50534         127.0.0.1:5432          ESTABLISHED
tcp6       0      0 127.0.0.1:46718         127.0.0.1:8443          ESTABLISHED
tcp6       0      0 127.0.0.1:8443          127.0.0.1:56452         ESTABLISHED
tcp6       0      0 127.0.0.1:8443          127.0.0.1:38441         ESTABLISHED
tcp6       0      0 127.0.0.1:50535         127.0.0.1:5432          ESTABLISHED
tcp6       0      0 127.0.0.1:8443          127.0.0.1:60748         ESTABLISHED
tcp6       0      0 127.0.0.1:8443          127.0.0.1:46718         ESTABLISHED
tcp6       0      0 127.0.0.1:60748         127.0.0.1:8443          ESTABLISHED
tcp6       0      0 127.0.0.1:56452         127.0.0.1:8443          ESTABLISHED
tcp6       0      0 127.0.0.1:50537         127.0.0.1:5432          ESTABLISHED
tcp6       0      0 192.168.1.114:8443      192.168.1.55:49273      ESTABLISHED
tcp6       0      0 127.0.0.1:50529         127.0.0.1:5432          ESTABLISHED
tcp6       0      0 127.0.0.1:50531         127.0.0.1:5432          ESTABLISHED
tcp6       0      0 127.0.0.1:50532         127.0.0.1:5432          ESTABLISHED
tcp6       0      0 127.0.0.1:50530         127.0.0.1:5432          ESTABLISHED
tcp6       0      0 127.0.0.1:38441         127.0.0.1:8443          ESTABLISHED
tcp6       0      0 127.0.0.1:51117         127.0.0.1:8100          ESTABLISHED
tcp6       0      0 127.0.0.1:50536         127.0.0.1:5432          ESTABLISHED
tcp6      24      0 127.0.0.1:56103         127.0.0.1:8443          CLOSE_WAIT
udp        0      0 0.0.0.0:49092           0.0.0.0:*
udp        0      0 0.0.0.0:848             0.0.0.0:*
udp        0      0 0.0.0.0:52590           0.0.0.0:*
udp        0      0 0.0.0.0:111             0.0.0.0:*
udp6       0      0 :::44805                :::*
udp6       0      0 :::137                  :::*
udp6       0      0 ::1:33092               ::1:33092               ESTABLISHED
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ACC ]     STREAM     LISTENING     210481   /tmp/OSL_PIPE_0_Singl                                                                                                                                                             eOfficeIPC_1dde35942bad5b1147f0f79e9a19d
unix  2      [ ACC ]     STREAM     LISTENING     68227    /tmp/.winbindd/pipe
unix  2      [ ACC ]     STREAM     LISTENING     2372     @/com/ubuntu/upstart
unix  2      [ ACC ]     STREAM     LISTENING     208797   /opt/alfresco-4.0.d/p                                                                                                                                                             ostgresql/.s.PGSQL.5432
unix  2      [ ]         DGRAM                    2482     @/org/kernel/udev/ude                                                                                                                                                             vd
unix  2      [ ACC ]     STREAM     LISTENING     68229    /var/run/samba/winbin                                                                                                                                                             dd_privileged/pipe
unix  2      [ ACC ]     STREAM     LISTENING     3486     /var/run/dbus/system_                                                                                                                                                             bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     4262     /var/run/mysqld/mysql                                                                                                                                                             d.sock
unix  5      [ ]         DGRAM                    3528     /dev/log
unix  2      [ ACC ]     STREAM     LISTENING     42959    /var/run/slapd/ldapi
unix  3      [ ]         STREAM     CONNECTED     245604
unix  3      [ ]         STREAM     CONNECTED     245603
unix  3      [ ]         STREAM     CONNECTED     245417   /var/run/dbus/system_                                                                                                                                                             bus_socket
unix  3      [ ]         STREAM     CONNECTED     245416
unix  2      [ ]         DGRAM                    245415
unix  2      [ ]         STREAM     CONNECTED     209118
unix  3      [ ]         STREAM     CONNECTED     68310
unix  3      [ ]         STREAM     CONNECTED     68309
unix  3      [ ]         STREAM     CONNECTED     68308
unix  3      [ ]         STREAM     CONNECTED     68307
unix  2      [ ]         STREAM     CONNECTED     68306    /tmp/.winbindd/pipe
unix  3      [ ]         STREAM     CONNECTED     68232
unix  3      [ ]         STREAM     CONNECTED     68231
unix  2      [ ]         DGRAM                    42952
unix  3      [ ]         STREAM     CONNECTED     4589     /var/run/dbus/system_                                                                                                                                                             bus_socket
unix  3      [ ]         STREAM     CONNECTED     4588
unix  3      [ ]         STREAM     CONNECTED     4564     /var/run/dbus/system_                                                                                                                                                             bus_socket
unix  3      [ ]         STREAM     CONNECTED     4563
unix  2      [ ]         DGRAM                    3613
unix  3      [ ]         STREAM     CONNECTED     3544
unix  3      [ ]         STREAM     CONNECTED     3543
unix  3      [ ]         STREAM     CONNECTED     3525     /var/run/dbus/system_                                                                                                                                                             bus_socket
unix  3      [ ]         STREAM     CONNECTED     3524
unix  3      [ ]         STREAM     CONNECTED     3512
unix  3      [ ]         STREAM     CONNECTED     3511
unix  3      [ ]         DGRAM                    2516
unix  3      [ ]         DGRAM                    2515
unix  3      [ ]         STREAM     CONNECTED     2476     @/com/ubuntu/upstart
unix  3      [ ]         STREAM     CONNECTED     2475

I can see the UNIX domain socket that is running from the alfresco Postgres directory, and I can see the tomcat connector (8443) and postgress connectors (5432). Nothing is running on 8000, which I verified with netstat -an | grep 8000, should the JDP port be set in alfresco-global.properties, tomcat's server.xml or similar first? I understand loopback and it's function, and that it would not be suitable for remote connections, however when you say I would have the change the containers configuration to bind to 0.0.0.0 I am a little lost as to how to do so. Is there a way for me to know if one of the other ports listed here is the one set up for JDP?
Thanks very much both Sumer and rdanner for all your help so far btw

rdanner
Champ in-the-making
Champ in-the-making
On the target machine, run "netstat -an" and look for your process. It must be binding port 8000 and the IP address can't be 127.0.0.1 (loopback won't pick up from remote connections).

If you're binding loopback, then change your container's configuration to bind 0.0.0.0.

To test, you can just telnet to your target machine to test the connection using: "telnet IP 8000" where IP is the IP of the target. Once this works, you should be in good shape.

–sumer

Hi Sumer, I'm really sorry if I am being a tad dense here, I don't quite understand some of your terminology (alot of this is covering new ground for me). When I netstat -an on the VM running the Alfresco server I get -

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:58433           0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:8100          0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:389             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:8009            0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:47862           0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN
tcp        0      0 192.168.1.114:32965     192.168.1.200:445       ESTABLISHED
tcp        0      0 127.0.0.1:5432          127.0.0.1:50529         ESTABLISHED
tcp        1      0 127.0.0.1:34918         127.0.0.1:8009          CLOSE_WAIT
tcp        0      0 127.0.0.1:5432          127.0.0.1:50533         ESTABLISHED
tcp        1      0 127.0.0.1:34914         127.0.0.1:8009          CLOSE_WAIT
tcp        0      0 127.0.0.1:5432          127.0.0.1:50537         ESTABLISHED
tcp        0      0 127.0.0.1:5432          127.0.0.1:50530         ESTABLISHED
tcp        1      0 127.0.0.1:38862         127.0.0.1:8009          CLOSE_WAIT
tcp        0      0 127.0.0.1:5432          127.0.0.1:50536         ESTABLISHED
tcp        0      0 127.0.0.1:5432          127.0.0.1:50531         ESTABLISHED
tcp        1      0 127.0.0.1:34916         127.0.0.1:8009          CLOSE_WAIT
tcp        0      0 192.168.1.114:33059     192.168.1.200:389       ESTABLISHED
tcp        0      0 192.168.1.114:22        192.168.1.55:49737      ESTABLISHED
tcp        1      0 127.0.0.1:34911         127.0.0.1:8009          CLOSE_WAIT
tcp        0      0 127.0.0.1:8100          127.0.0.1:51117         ESTABLISHED
tcp        1      0 127.0.0.1:34920         127.0.0.1:8009          CLOSE_WAIT
tcp        1      0 127.0.0.1:34908         127.0.0.1:8009          CLOSE_WAIT
tcp        0      0 192.168.1.114:769       192.168.1.52:2049       ESTABLISHED
tcp        0      0 127.0.0.1:5432          127.0.0.1:50532         ESTABLISHED
tcp        1      0 127.0.0.1:34919         127.0.0.1:8009          CLOSE_WAIT
tcp        0      0 127.0.0.1:5432          127.0.0.1:50534         ESTABLISHED
tcp        1      0 127.0.0.1:34910         127.0.0.1:8009          CLOSE_WAIT
tcp        0      0 127.0.0.1:5432          127.0.0.1:50535         ESTABLISHED
tcp6       0      0 :::50500                :::*                    LISTEN
tcp6       0      0 :::36068                :::*                    LISTEN
tcp6       0      0 127.0.0.1:8005          :::*                    LISTEN
tcp6       0      0 :::389                  :::*                    LISTEN
tcp6       0      0 :::57734                :::*                    LISTEN
tcp6       0      0 :::139                  :::*                    LISTEN
tcp6       0      0 :::50508                :::*                    LISTEN
tcp6       0      0 :::36525                :::*                    LISTEN
tcp6       0      0 :::21                   :::*                    LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN
tcp6       0      0 ::1:5432                :::*                    LISTEN
tcp6       0      0 :::8443                 :::*                    LISTEN
tcp6       0      0 :::445                  :::*                    LISTEN
tcp6       0      0 :::7070                 :::*                    LISTEN
tcp6       0      0 127.0.0.1:50533         127.0.0.1:5432          ESTABLISHED
tcp6       0      0 127.0.0.1:50534         127.0.0.1:5432          ESTABLISHED
tcp6       0      0 127.0.0.1:46718         127.0.0.1:8443          ESTABLISHED
tcp6       0      0 127.0.0.1:8443          127.0.0.1:56452         ESTABLISHED
tcp6       0      0 127.0.0.1:8443          127.0.0.1:38441         ESTABLISHED
tcp6       0      0 127.0.0.1:50535         127.0.0.1:5432          ESTABLISHED
tcp6       0      0 127.0.0.1:8443          127.0.0.1:60748         ESTABLISHED
tcp6       0      0 127.0.0.1:8443          127.0.0.1:46718         ESTABLISHED
tcp6       0      0 127.0.0.1:60748         127.0.0.1:8443          ESTABLISHED
tcp6       0      0 127.0.0.1:56452         127.0.0.1:8443          ESTABLISHED
tcp6       0      0 127.0.0.1:50537         127.0.0.1:5432          ESTABLISHED
tcp6       0      0 192.168.1.114:8443      192.168.1.55:49273      ESTABLISHED
tcp6       0      0 127.0.0.1:50529         127.0.0.1:5432          ESTABLISHED
tcp6       0      0 127.0.0.1:50531         127.0.0.1:5432          ESTABLISHED
tcp6       0      0 127.0.0.1:50532         127.0.0.1:5432          ESTABLISHED
tcp6       0      0 127.0.0.1:50530         127.0.0.1:5432          ESTABLISHED
tcp6       0      0 127.0.0.1:38441         127.0.0.1:8443          ESTABLISHED
tcp6       0      0 127.0.0.1:51117         127.0.0.1:8100          ESTABLISHED
tcp6       0      0 127.0.0.1:50536         127.0.0.1:5432          ESTABLISHED
tcp6      24      0 127.0.0.1:56103         127.0.0.1:8443          CLOSE_WAIT
udp        0      0 0.0.0.0:49092           0.0.0.0:*
udp        0      0 0.0.0.0:848             0.0.0.0:*
udp        0      0 0.0.0.0:52590           0.0.0.0:*
udp        0      0 0.0.0.0:111             0.0.0.0:*
udp6       0      0 :::44805                :::*
udp6       0      0 :::137                  :::*
udp6       0      0 ::1:33092               ::1:33092               ESTABLISHED
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ACC ]     STREAM     LISTENING     210481   /tmp/OSL_PIPE_0_Singl                                                                                                                                                             eOfficeIPC_1dde35942bad5b1147f0f79e9a19d
unix  2      [ ACC ]     STREAM     LISTENING     68227    /tmp/.winbindd/pipe
unix  2      [ ACC ]     STREAM     LISTENING     2372     @/com/ubuntu/upstart
unix  2      [ ACC ]     STREAM     LISTENING     208797   /opt/alfresco-4.0.d/p                                                                                                                                                             ostgresql/.s.PGSQL.5432
unix  2      [ ]         DGRAM                    2482     @/org/kernel/udev/ude                                                                                                                                                             vd
unix  2      [ ACC ]     STREAM     LISTENING     68229    /var/run/samba/winbin                                                                                                                                                             dd_privileged/pipe
unix  2      [ ACC ]     STREAM     LISTENING     3486     /var/run/dbus/system_                                                                                                                                                             bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     4262     /var/run/mysqld/mysql                                                                                                                                                             d.sock
unix  5      [ ]         DGRAM                    3528     /dev/log
unix  2      [ ACC ]     STREAM     LISTENING     42959    /var/run/slapd/ldapi
unix  3      [ ]         STREAM     CONNECTED     245604
unix  3      [ ]         STREAM     CONNECTED     245603
unix  3      [ ]         STREAM     CONNECTED     245417   /var/run/dbus/system_                                                                                                                                                             bus_socket
unix  3      [ ]         STREAM     CONNECTED     245416
unix  2      [ ]         DGRAM                    245415
unix  2      [ ]         STREAM     CONNECTED     209118
unix  3      [ ]         STREAM     CONNECTED     68310
unix  3      [ ]         STREAM     CONNECTED     68309
unix  3      [ ]         STREAM     CONNECTED     68308
unix  3      [ ]         STREAM     CONNECTED     68307
unix  2      [ ]         STREAM     CONNECTED     68306    /tmp/.winbindd/pipe
unix  3      [ ]         STREAM     CONNECTED     68232
unix  3      [ ]         STREAM     CONNECTED     68231
unix  2      [ ]         DGRAM                    42952
unix  3      [ ]         STREAM     CONNECTED     4589     /var/run/dbus/system_                                                                                                                                                             bus_socket
unix  3      [ ]         STREAM     CONNECTED     4588
unix  3      [ ]         STREAM     CONNECTED     4564     /var/run/dbus/system_                                                                                                                                                             bus_socket
unix  3      [ ]         STREAM     CONNECTED     4563
unix  2      [ ]         DGRAM                    3613
unix  3      [ ]         STREAM     CONNECTED     3544
unix  3      [ ]         STREAM     CONNECTED     3543
unix  3      [ ]         STREAM     CONNECTED     3525     /var/run/dbus/system_                                                                                                                                                             bus_socket
unix  3      [ ]         STREAM     CONNECTED     3524
unix  3      [ ]         STREAM     CONNECTED     3512
unix  3      [ ]         STREAM     CONNECTED     3511
unix  3      [ ]         DGRAM                    2516
unix  3      [ ]         DGRAM                    2515
unix  3      [ ]         STREAM     CONNECTED     2476     @/com/ubuntu/upstart
unix  3      [ ]         STREAM     CONNECTED     2475

I can see the UNIX domain socket that is running from the alfresco Postgres directory, and I can see the tomcat connector (8443) and postgress connectors (5432). Nothing is running on 8000, which I verified with netstat -an | grep 8000, should the JDP port be set in alfresco-global.properties, tomcat's server.xml or similar first? I understand loopback and it's function, and that it would not be suitable for remote connections, however when you say I would have the change the containers configuration to bind to 0.0.0.0 I am a little lost as to how to do so. Is there a way for me to know if one of the other ports listed here is the one set up for JDP?
Thanks very much both Sumer and rdanner for all your help so far btw

The port will be 8000 by default  However, Alfresco will not start up with this turned on by default.  You have to tell it to turn it on.  My guess is that you are not starting up in debug mode.

How are you starting Alfresco?  Through the console with the installer or through the scripts?

What you need is for the following to be part of your java opts
-Xrunjdwp:transport=dt_socket,server=y,suspend=n, address=8000

If you are using the alfresco.sh file to start alfresco, instead of using "start" use alfresco.sh jpda

You can use -X on a bash line to ensure the right code is getting run to start this which is in catalina.sh
if [ "$1" = "jpda" ] ; then
  if [ -z "$JPDA_TRANSPORT" ]; then
    JPDA_TRANSPORT="dt_socket"
  fi
  if [ -z "$JPDA_ADDRESS" ]; then
    JPDA_ADDRESS="8000"
  fi
  if [ -z "$JPDA_SUSPEND" ]; then
    JPDA_SUSPEND="n"
  fi
  if [ -z "$JPDA_OPTS" ]; then
    JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
  fi
  CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS"
  shift
fi

chrisokelly
Champ on-the-rise
Champ on-the-rise
The port will be 8000 by default  However, Alfresco will not start up with this turned on by default.  You have to tell it to turn it on.  My guess is that you are not starting up in debug mode.

How are you starting Alfresco?  Through the console with the installer or through the scripts?

What you need is for the following to be part of your java opts
-Xrunjdwp:transport=dt_socket,server=y,suspend=n, address=8000

If you are using the alfresco.sh file to start alfresco, instead of using "start" use alfresco.sh jpda

You can use -X on a bash line to ensure the right code is getting run to start this which is in catalina.sh
if [ "$1" = "jpda" ] ; then
  if [ -z "$JPDA_TRANSPORT" ]; then
    JPDA_TRANSPORT="dt_socket"
  fi
  if [ -z "$JPDA_ADDRESS" ]; then
    JPDA_ADDRESS="8000"
  fi
  if [ -z "$JPDA_SUSPEND" ]; then
    JPDA_SUSPEND="n"
  fi
  if [ -z "$JPDA_OPTS" ]; then
    JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
  fi
  CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS"
  shift
fi

Thanks very much! That's exactly what I needed. Will try this out during the day but it makes sense that would be what I am missing. I can't mark your posts useful (I think because it isn't my topic) but if I could, I would spam yes so very much Smiley Happy

rdanner
Champ in-the-making
Champ in-the-making
The port will be 8000 by default  However, Alfresco will not start up with this turned on by default.  You have to tell it to turn it on.  My guess is that you are not starting up in debug mode.

How are you starting Alfresco?  Through the console with the installer or through the scripts?

What you need is for the following to be part of your java opts
-Xrunjdwp:transport=dt_socket,server=y,suspend=n, address=8000

If you are using the alfresco.sh file to start alfresco, instead of using "start" use alfresco.sh jpda

You can use -X on a bash line to ensure the right code is getting run to start this which is in catalina.sh
if [ "$1" = "jpda" ] ; then
  if [ -z "$JPDA_TRANSPORT" ]; then
    JPDA_TRANSPORT="dt_socket"
  fi
  if [ -z "$JPDA_ADDRESS" ]; then
    JPDA_ADDRESS="8000"
  fi
  if [ -z "$JPDA_SUSPEND" ]; then
    JPDA_SUSPEND="n"
  fi
  if [ -z "$JPDA_OPTS" ]; then
    JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
  fi
  CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS"
  shift
fi

Thanks very much! That's exactly what I needed. Will try this out during the day but it makes sense that would be what I am missing. I can't mark your posts useful (I think because it isn't my topic) but if I could, I would spam yes so very much Smiley Happy


Sweet! Let us know how it goes!