Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: fixed, non-random trace port for firewall rule #20

Open
eostermueller opened this issue Jan 13, 2012 · 5 comments
Open

Comments

@eostermueller
Copy link
Contributor

#18 (comment)

At the above link, mchr3k gives a good description of the two TCP connections in InTrace.
The 2nd port, the "trace" port, is opened on a random port on the "agent."

In one of our environments, we need to add a firewall rule so the InTrace client can access the trace port.
But we can't do it because a different port is randomly selected on each restart of the agent's JVM.

--Erik

@mchr3k
Copy link
Owner

mchr3k commented Jan 14, 2012

This issue has a slightly tricky interaction with multi user cases. I will give this some thought and try to fix this soon.

@eostermueller
Copy link
Contributor Author

I added this to my agent parameters and it didn't help:
[callbackport-9124

I've got a tcpdump .pcap trace, but don't see any way to upload it to this issue. Any support for attachments anywhere?

--Erik

@eostermueller
Copy link
Contributor Author

Thanks for the upgraded error message on this.
Below is the latest error.
Instead of 44415, I was hoping to get 9124, because of my agent parameter [callbackport-9124

*** Failed to setup network trace: java.net.ConnectException: Connection timed out: connect
Remote address: myhost/my-ip
Remote port: 44415
*** Latest Settings Received

@mchr3k
Copy link
Owner

mchr3k commented Jan 18, 2012

[callbackport causes the Agent to make a reverse Control connection - the Agent connects to a listening port opened by the Client. The Trace connection is then set up normally using a random port.

This callback is used by the Eclipse plugin which launches the program which it wants to trace. The callback allows the plugin to connect to the Agent as soon as the Agent is ready.

@eostermueller
Copy link
Contributor Author

On my own local copy, I was able to get by this:
I changed the following on about line 97 in AgentHelper.java:

      //networkSocket = new ServerSocket(0);
  networkSocket = new ServerSocket(9124);  //hard coded temporary fix/workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants