It's all about the answers!

Ask a question

Tomcat-user.xml is not getting updated when new users are added via RTC


0
1
kuo hao tah (1142830) | asked Sep 20 '12, 7:56 p.m.

Hi there,

I've an issue whereby the Tomcat-user.xml file is not getting updated when new users are added via RTC. This poses an issue because, the repository permissions that are granted to the users, are only valid so long as the server is not restarted. Once the Jazz Team Server is restarted, all the repository permissions that have been earlier assigned, will dissapear. However the users still exist.

Has someone else has faced a similar issue and fixed it before.

Thanks,

KH

Accepted answer


permanent link
Drake Brown (3634) | answered Oct 12 '12, 7:15 p.m.

THIS SOLVED THE PROBLEM FOR ME. 

Edit the server.xml file. 

  <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase" readonly="false" />

Add the attribute in this connector readonly="false".

The default is readonly="true" which of course if not explicitly changed using the above command will keep the tomcat-users.xml in a read only mode.

Then restart tomcat.  Now any changes you make to your Active Users in RTC will update the tomcat-users.xml file.

Ralph Schoon selected this answer as the correct answer

Comments
1
Karl Weinert commented Oct 15 '12, 6:53 a.m. | edited Oct 15 '12, 7:15 a.m.
JAZZ DEVELOPER

Just to add a little more information, this can happen after an upgrade from 3.x to 4. On Tomcat v5.5 the value is not set and defaults to readonly=false but on Tomcat v7.0 the default is readonly=true. When upgrading, the original server.xml is copied over without the readonly value set and therefore defaults to true after the upgrade. A fresh install of 4 has the readonly set to true.  This may also cause CRJAZ1231errors when a user attempts to change their password.


Ralph Schoon commented Oct 15 '12, 7:12 a.m. | edited Oct 15 '12, 10:33 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Please see Karl's answer above for details why this happens. I think this should be checked in each upgrade.

Thanks Karl for this hint. 


Bo Chulindra commented Oct 15 '12, 10:19 a.m. | edited Oct 15 '12, 10:25 a.m.
JAZZ DEVELOPER

@rschoon: that link doesn't work for me. It takes me to a "The page you requested cannot be found"

Hmm, it seems like the link is an attempt to link to Karl's comment?


Ralph Schoon commented Oct 15 '12, 10:34 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

It is Karl's comment above. Sorry for the wrong link.


Karl Weinert commented Oct 15 '12, 11:07 a.m.
JAZZ DEVELOPER

While we are correcting mistakes I wrote "A fresh install of 4 has the readonly set to true" it should say " A fresh install of 4 has the readonly set to false" (I got an error that said I didn't have enough points to edit a comment)

2 other answers



permanent link
Ralph Schoon (63.1k33646) | answered Sep 25 '12, 4:32 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi,

I have never seen anything like this. I would suggest to check the Tomcat logs for issues. I would also make sure that the server has permissions to save the file. E.g. in Windows don't install into Program Files for issues having to launch as an administrator.

permanent link
Drake Brown (3634) | answered Oct 09 '12, 4:54 p.m.
I am experiencing the exact same issue!  It worked fine under version 3.0.1.3.  Now I have 2 separate RTC installations using RTC 4.0 in which tomcat-users.xml is not getting updated.  RTC reads tomcat-users.xml and authenticates properly but it does not write changes to tomcat-users.xml.

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.