cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot start remote debugger for SAP Machine 17

kevsar
Discoverer
0 Kudos

I am trying to setup a remote debugger for a SAP Cloud application using IntelliJ and SAP Machine 17.

I followed the instructions shown in the two articles below:

In particular I made sure to use these commands:

  • cf set-env application JBP_CONFIG_DEBUG "{enabled: true}"
  • cf restage <application_name>
  • cf ssh -N -T -L 8000:localhost:8000 <application_name>

When I attempt to start the debugger I get the these errors

  • IntelliJ Error → Unable to open debugger port (localhost:8000): java.net.SocketException "Connection reset"
  • SSH server error → connect to localhost:8000 failed: ssh: rejected: connect failed (dial tcp 127.0.0.1:8000: connect: connection refused)

Kind regards,

Kevin

jschneider
Advisor
Advisor
0 Kudos

The error

> SSH server error → connect to localhost:8000 failed: ssh: rejected: connect failed (dial tcp 127.0.0.1:8000: connect: connection refused)

seems to indicate that binding the remote port to your local port (via the cf ssh) command didn't succeed.
Are there any logs you can share from the `cf ssh` command?

Best regards,
Johannes

kevsar
Discoverer
0 Kudos

Unfortunately, the command "cf ssh" doesn't seem to output any log

Accepted Solutions (1)

Accepted Solutions (1)

davidlam
Employee
Employee

Hi Kevin,

I ran into the same issue as you.

Do the following instead:

$ cf set-env <application_name> JBP_CONFIG_JAVA_OPTS '[java_opts: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:8000"]'
$ cf restage <application_name>
$ cf ssh <application_name> -N -T -L 8000:localhost:8000

That worked for me.

Best regards,

David

kevsar
Discoverer

Hi David,

That worked! Thank you very much!

Best regards,

Kevin

Answers (0)