Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remote Debug for Cloud Foundry application fails when connecting eclipse remote debugger to forwarded local port

I'm trying to remotely debug a Spring boot application deployed on a cloud foundry Instance. Below are the steps that I'm following to setup remote debug using eclipse:

  1. Setting up JBP_CONFIG_DEBUG: '{enabled: true}' environment variable for the application.
  2. After that I'm setting up the local port forwarding to my app container with cf ssh -N -T -L 8000:localhost:8000 <APP_NAME>
  3. Then I'm setting up the remote debug configuration in eclipse as shown below image:Eclipse remote debug setup

After that when I try to start remote debug session, It tried to connect to the app but fails with the message at the port forwarded terminal:

connect to localhost:8000 failed: ssh: rejected: connect failed (dial tcp 127.0.0.1:8000: getsockopt: connection refused)

Please help, if anyone has any clue about this error!!

like image 487
pritamprasad Avatar asked Sep 01 '25 22:09

pritamprasad


1 Answers

You might have to restage the application for the change to take place, debug configuration to change.

You can use alternatively ssh into the container using cf ssh <application name> and check that the debug port is opened on not using netstat -an

like image 103
Shiva Avatar answered Sep 03 '25 13:09

Shiva