Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RAMSession connection refused

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?

0 votes


Accepted answer

Permanent link
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

0 votes


6 other answers

Permanent link
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.

0 votes


Permanent link
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.

0 votes


Permanent link
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

0 votes


Permanent link
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?

0 votes


Permanent link
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

0 votes


Permanent link
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)

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: May 30 '12, 2:19 p.m.

Question was seen: 5,376 times

Last updated: Jun 06 '12, 9:37 a.m.

Confirmation Cancel Confirm