2

I am trying to use JProfiler on my MAC to connect to a machine remotely that is behind a firewall and only accessible via a Linux machine.

I have set up a direct SSH tunnel as follows:

ssh -L 8849:remote:8849 forwardingmachine

And start Jprofiler with

java -agentpath:/path/jprofiler8/bin/linux-x64/libjprofilerti.so=port=8849 ..."

I systematically get the error:

Connection error

Either an old version of the native library is used or another application is listening on port 8849. Please check your DYLD_LIBRARY_PATH environment variable and your port configuration

Online there are solutions for using a 2 hop SSH tunnel, but I can't do that due to the second machine only being accessible to forwardingmachine.

Any ideas of how to get around this?

(The remote machine uses Java 1.7, whereas my Mac uses Java 1.8). Both machines are using jprofiler8

user1018513
  • 1,682
  • 1
  • 20
  • 42

1 Answers1

-1

A direct tunnel to remote is set up with the command

ssh -t user@remote -L [localPort]:localhost:[remotePort] -N
Ingo Kegel
  • 46,523
  • 10
  • 71
  • 102
  • I am setting up a connection via "forwardingmachine, from remote:8849 to local:8849 as remote:8849 is behind a firewall. I don't believe your answer is correct. – user1018513 Feb 18 '15 at 06:09
  • So the 2-hop solution should be applicable http://stackoverflow.com/questions/27138011/how-to-use-jprofiler-over-two-hop-ssh-tunnel in your case. – Ingo Kegel Feb 18 '15 at 10:50
  • The 2 hop approach requires you to have a direct connection to remote, which I don't – user1018513 Feb 18 '15 at 16:21
  • The idea of the 2-hop connection is that you don't have a direct connection to remote, the connection to remote is initiated on middle, not on localhost – Ingo Kegel Feb 18 '15 at 17:15