It's all about the answers!

Ask a question

Ant task to log off


Chris Graham (367814) | asked Nov 13 '11, 7:55 p.m.
Can we please have one?

In an automated sense, we can quite easily run out of the number of sessions (and sometimes licences) that we have on the server.

A log off task, one used to destrory the server side session, would allow us to clean up after ourselves.

-Chris

10 answers



permanent link
Gili Mendel (1.8k56) | answered Nov 14 '11, 9:09 a.m.
JAZZ DEVELOPER
RAM guards against automated processes that access RAM programmatically without reusing sessions. It is a common problem where scripts access the RAM server without sending back the session cookie. This creates a new session per request which holds resources for ~30minutes.
A limit for the number of sessions that can be created for a single uid is on the Administration->Configuration page (I think that the default is 100).


If you are using an Ant Script, make sure to use the same session e.g.,


<ram:server id="ramServer" url="${ram.url}" username="${ram.uid}" password="${ram.password}" />


The session above has the id="ramServer" ... you can use that session throughout your script. e.g.,


<ram:modify server="ramServer">

permanent link
Rich Kulp (3.6k38) | answered Nov 14 '11, 9:38 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hi,

You are right, there isn't any. Please open an enhancement for this.

Thanks,
--
Rich Kulp
Rational Asset Manager developer

permanent link
Eric Bordeau (27632) | answered Nov 14 '11, 10:10 a.m.
JAZZ DEVELOPER
The session will be released once the Ant build has finished. In your logs, you should see something like:

Releasing session for user admin on server http://localhost:8080/ram

permanent link
Chris Graham (367814) | answered Nov 14 '11, 10:48 p.m.
RAM guards against automated processes that access RAM programmatically without reusing sessions. It is a common problem where scripts access the RAM server without sending back the session cookie. This creates a new session per request which holds resources for ~30minutes.
A limit for the number of sessions that can be created for a single uid is on the Administration->Configuration page (I think that the default is 100).


If you are using an Ant Script, make sure to use the same session e.g.,


<ram>


The session above has the id="ramServer" ... you can use that session throughout your script. e.g.,


<ram>

Yes, we're doing all of that.
The problem is when we run lots of different scripts to do different things.
For example, we run one set of scripts to do the RAM Upload. That is tried to the release processes of our software.

Then, we have an entirely different set of scripts that are run at separate times to create the (affore mentioned) Deployment Requests.

The value of the RAM Server can not be preserved across these separe calls to Ant (via Maven, in our case). So there are lots of separate interactions with RAM, not one large one, that can preserve the RAM Server/SessionId.

Yes, the session is released, eventually around 30 minutes later, which is not a good thing.

Hence, i run into the issue. :D

-Chris

permanent link
Chris Graham (367814) | answered Nov 14 '11, 10:49 p.m.
Hi,

You are right, there isn't any. Please open an enhancement for this.

Thanks,
--
Rich Kulp
Rational Asset Manager developer

Hi Rich.
Sorry, whom are you asking to open the Enhancement Request?
-Chris

permanent link
Rich Kulp (3.6k38) | answered Nov 15 '11, 10:08 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
p
Rational Asset Manager developer
Hi Rich.
Sorry, whom are you asking to open the Enhancement Request?
-Chris

I was asking you, but now talking to our developer (Eric, who has

responded) this shouldn't be necessary. The code should be logging off
when the ANT build is finished. We have a build listener attached, so
any short script should connect, do its thing, then log off when the ANT
ends.


--
Rich Kulp
Rational Asset Manager developer

permanent link
Rich Kulp (3.6k38) | answered Nov 15 '11, 11:23 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
What version of the RAM client are you using? There may be some fixed
bugs in this area if you are using an older one.

Also what version of RAM Server are you talking to? Same thing as above
about bugs.
--
Rich Kulp
Rational Asset Manager developer

permanent link
Chris Graham (367814) | answered Nov 15 '11, 10:00 p.m.
7.5.0.2 for both. The jars were obtained from the ramclient.zip from the 7.5.0.2 server.

And, no, it does not automatically close the session (by definition of this problem, otherwise I'd never see it...)

-Chris

What version of the RAM client are you using? There may be some fixed
bugs in this area if you are using an older one.

Also what version of RAM Server are you talking to? Same thing as above
about bugs.
--
Rich Kulp
Rational Asset Manager developer

permanent link
Eric Bordeau (27632) | answered Nov 16 '11, 9:32 a.m.
JAZZ DEVELOPER
And, no, it does not automatically close the session (by definition of this problem, otherwise I'd never see it...)


Do you see anything in the Ant log (using -v) about releasing the session (e.g. Releasing session for user admin on server http://localhost:8080/ram)? If so, we're trying to release the session and for some reason it's not working. If not, we're not even getting to the point where we try to release the session.

permanent link
Chris Graham (367814) | answered Nov 16 '11, 7:31 p.m.
Actually, we're running it under Maven, using the antrun plugin (so I needed a -X :-) )

Anyway, yes I did see the releasing line.

I tried kicking the server a bit, but I could now, not fault it.

(There is much work being performed on the RAM server itself, perhaps it has been resolved?)

It's been a week or so since I've seen this issue. I'll continue to monitor it.

Thanks for the help!

-Chris

And, no, it does not automatically close the session (by definition of this problem, otherwise I'd never see it...)


Do you see anything in the Ant log (using -v) about releasing the session (e.g. Releasing session for user admin on server http://localhost:8080/ram)? If so, we're trying to release the session and for some reason it's not working. If not, we're not even getting to the point where we try to release the session.

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.