Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8497559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:09:35+00:00 2026-06-11T00:09:35+00:00

Sorry if this is a repeat of a question asked previously, but I have

  • 0

Sorry if this is a repeat of a question asked previously, but I have tried out the solutions provided here and elsewhere and none of them seem to work for me.

Scenario: I need to profile a production Tomcat 7 server that lives behind a firewall. I only have SSH access to this server. The profiling tool of choice is Visualvm and these servers do not have a GUI installed. Both the server and the machine I am trying to connect from run Ubuntu 10.04 server LTS.

Possible solution: Using visualvm over SSH tunnels seem to be possible and the link given below gives a pretty detailed guide to doing this:

Tomcat+VisualVM+SSH guide

Also I have added a jmxremote.access file to the /conf dir in Tomcat with the following two lines:

monitorRole readonly
controlRole readwrite

Problem: I followed the steps provided in the article and everything seems to be fine. I can connect to the jmx ports in the server locally (from the server) using jmxterm and the connection string given in the guide.

I configured local tomcat as per the guide as a test and Visualvm had no problem connecting to this tomcat instance using the connection string.

However, VisualVM will not connect to the remote server over SSH tunnel. I tried JConsole as it it simpler and has better logging facilities and I get the following sequence of messages:

FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi://localhost:12009/jndi/rmi://localhost:12008/jmxrmi]  connecting...
FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi://localhost:12009/jndi/rmi://localhost:12008/jmxrmi] finding stub...
FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi://localhost:12009/jndi/rmi://localhost:12008/jmxrmi] connecting stub...
FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi://localhost:12009/jndi/rmi://localhost:12008/jmxrmi] getting connection...
FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi://localhost:12009/jndi/rmi://localhost:12008/jmxrmi] failed to connect: java.rmi.NoSuchObjectException: no such object in table

Any ideas as to what I’ve done wrong here? Any help is greatly appreciated!

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:09:36+00:00Added an answer on June 11, 2026 at 12:09 am

    I think the issue you are having, which the referenced article does not really address, is the way that jmx-rmi, or more specifically, RMI itself works. Your Tomcat server setup like this:

    1. Created an RMI remotable that is configured to connect to localhost:12009.
    2. Created an RMI registry on localhost with a listening port of localhost:12008.

    When you run locally, you lookup the stub in the RMI registry, and when you invoke against the stub to issue a jmx call, it connects to localhost:12009, no problem.

    When you run remotely through SSH, I am assuming you have tunneled from your remote to the tomcat server on port 12008, so when you issue your request, your remote’s localhost:12008 is tunneled to tomcatServer:12008 since the log output seems to indicate that you found the stub ok.

    Next, your remote executes against the stub which in turn attempts to connect to localhost:12009 and fails.

    My guess is that you need to tunnel your remote’s localhost:12008 and localhost:12009 to be redirected to tomcatServer:12008 and tomcatServer:12009.

    Another way of getting around this is to ditch the RMI jmx protocol and use something like Jolokia (HTTP), JMX-WS (HTTP WebService) or JMXMP (Socket). This will make your SSH tunelling life a lot easier. If you want to try JMXMP, I created a github project called OpenDMK which has mavenized builds. You will want the jmx-optional package.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

sorry this is such a simple question but I can't figure it out. How
Sorry if I repeat my question but I have still had no clues of
sorry if this is a repeat question! I have the following Javascript which works
Sorry if this is a repeat question. I've looked at other threads, but while
Sorry this is a basic question, but all my research just barely missed answering
Sorry for this simple question, but I can't solve it... There is an example:
Sorry if this question seems stupid, but it's stumped me for a couple days,
Sorry if this is a stupid question, but is there an easy way to
Sorry if this question is a bit open ended, but I'm pretty new to
(Sorry, I know that is this is mostly a repeat of John Evan's question,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.