It's all about the answers!

Ask a question

RAMSession connection refused


Dave Hobbs (2622) | asked May 30 '12, 2:19 p.m.
I have a local RAM installation (7.5.1) which I am trying to connect to using the Java API.

RAMSession session = null;
session = new RAMSession("http://localhost:8080/ram.ws", "admin", admin");
RAMUser user = session.getUser("user1");

This throws a:

Exception in thread "main" com.ibm.ram.common.data.exception.RAMRuntimeException: Unable to access server services: ; nested exception is:
java.net.ConnectException: Connection refused: connect
at com.ibm.ram.client.RAMSession.fetchUserFromServer(RAMSession.java:1502)
at com.ibm.ram.client.RAMSession.getUser(RAMSession.java:1398)

Any ideas as to what may be causing this?

Accepted answer


permanent link
Dave Hobbs (2622) | answered Jun 06 '12, 9:37 a.m.
Ok, figured it out. I'm running from an eclipse client. I ran the code in the debugger which breaks on the first exception. The exception detail message stated that I was running on an old client. Upgrading to the new client fixes the error, and produces clearer error messages. If I use an invalid url it now says:

Exception in thread "main" com.ibm.ram.common.data.exception.RAMRuntimeException: http://127.0.0.1:13080/ram
http://127.0.0.1:13080/ram.ws
The above connection URLs should be used to connect to this repository.
at com.ibm.ram.client.RAMSession.<init>(RAMSession.java:282)
        ...
Thanks for your patience Rich.
Rich Kulp selected this answer as the correct answer

6 other answers



permanent link
Rich Kulp (3.6k38) | answered May 30 '12, 4:27 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hi,

That usually means there is something wrong your URI and that it can't be accessed. Verify through a browser on the same system that you can use that URI.

permanent link
Dave Hobbs (2622) | answered May 31 '12, 7:02 a.m.
Hi,

That usually means there is something wrong your URI and that it can't be accessed. Verify through a browser on the same system that you can use that URI.


Thanks Rich. I may be getting closer using 'http://localhost:13080/ram.ws' which does show up the services list in the browser. However using the api I get:

Exception in thread &quot;main&quot; com.ibm.ram.common.data.exception.RAMRuntimeException: URL specified for the connection is invalid.
at com.ibm.ram.client.RAMSession.fetchUserFromServer(RAMSession.java:1502)
at com.ibm.ram.client.RAMSession.getUser(RAMSession.java:1398)

Same error if I use 127.0.0.1.

permanent link
Rich Kulp (3.6k38) | answered May 31 '12, 3:03 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hi,

The best thing to do is through the browser go to the web home page and select Help(?)-&gt;Extensions and look at the Repository Location link and use that.

Thanks,
Rich

permanent link
Dave Hobbs (2622) | answered Jun 01 '12, 5:36 a.m.
Hi,

The best thing to do is through the browser go to the web home page and select Help(?)-&gt;Extensions and look at the Repository Location link and use that.

Thanks,
Rich


That's what I did. The Extensions web services section has the repository location listed as http://localhost:13080/ram.ws . When I click on that link I get a 'Rational Asset Manager WebServices' page listing all the services. (btw I've done this before on a previous machine and version of RAM and it worked)

The only thing I can think of is that I have incorrectly configured something, but what? Are there any other log files I can look at?

permanent link
Rich Kulp (3.6k38) | answered Jun 01 '12, 9:54 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hi,

You original append said you were using:

- http://localhost:8080/ram.ws

But your last append send the actual link is:

- http://localhost:13080/ram.ws

You notice the difference here?

Thanks,
Rich

permanent link
Dave Hobbs (2622) | answered Jun 06 '12, 5:39 a.m.
Thanks Rich, I did notice the different error messages. The first url was actually used after the second. I have tested a variety of combinations of url/userid/password.

Did you notice the different error messages? 

http://localhost:13080/ram.ws - RAMRuntimeException: URL specified for the connection is invalid. 
http://localhost:8080/ram.ws - RAMRuntimeException: Unable to access server services

I had thought that the second looked more promising, but without any error logs I'm stuck. 

(In the documentation it mentions using 8080: In version 7.5 and later, you can use a web or web services URL when creating initial connections to Rational Asset Manager. This example uses a web URL)

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.