Linux startup script
![]()
D B (21●1●1)
| asked Aug 18 '11, 5:18 p.m.
edited Nov 06 '12, 11:48 a.m. by Ralph Schoon (62.3k●3●36●43)
I am trying to setup CLM/RTC to startup when linux boots.
I haven't found any good documentation for it. The only link I've found is: https://www-304.ibm.com/support/docview.wss?uid=swg21425943 Which relates to RRC I tried simplifying and modifying it to how it relates to my environment: #!/bin/bash then I installed it with "chkconfig jazz on" I think by default the run levels were: 0:off 1:off 2:on 3:on 4:on 5:on 6:off in this configuration, when accessing the website after a boot, the qm and rm applications failed to load, as if they were broken. running server.shutdown and server.startup fixed them again Thinking that maybe it ran too soon after boot I disabled runlevel 2 0:off 1:off 2:off 3:on 4:on 5:on 6:off but this produces the same result Disabling runlevel 3 0:off 1:off 2:off 3:off 4:on 5:on 6:off The application/jazz server doesnt start at all. Anyone have any ideas? or a better script? Thanks |
5 answers
![]()
Hello,
I use the following approach: 1. I do not run the whole JTS Tomcat as root user 2. After JTS installation/initial configuration as root I created an normal user rtcuser and chown for that user the whole /opt/.......JazzTeamServer directory 3. then I use the following startup script (works on Fedora & CentOS should work on RH, needs modification for Ubuntu, SLES)
|
![]()
Ralph Schoon (62.3k●3●36●43)
| answered Aug 19 '11, 5:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I have done it once at zLinux at a customer site.
Some important things: * There are relative paths for several components (index etc) in the teamserver.properties you need to make absolute. Since you run the startup script that should be it. If you look at the application logs you would nothce some warnings if you have relative paths still. * I would test if starting the server with: /opt/IBM/JazzTeamServer/server/server.startup works. This is the situation in the init script and it is different from going to the /opt/IBM/JazzTeamServer/server/ folder and starting the script there. * There might be other settings you'd need in your script. Please see: https://www-304.ibm.com/support/docview.wss?uid=swg21421929 this is for Windows, but it provides a clue what to look at. * make sure the database is started before you start |
![]()
I should probably have said that after the server loads (without autostarting jazz),
I can use /etc/init.d/jazz start and the jazzserver runs just fine. So I don't think it would be an issues with relative/absolute paths in the teamserver.properties files when using the startup script. Also, when I try to autostart it on boot. The server loads, Jazz starts, but website isn't fully accessible. I run /etc/init.d/jazz restart, and then it works just fine... that's what makes me think its more a matter of timing on startup or something along those lines. I should note that I am testing this on a development server, and the database being used is derby. So it should get started when the jazzserver starts. However, I just now tried to modify the teamserver.properties files for ccm,jts,qm. I changed com.ibm.team.repository.db.jdbc.location com.ibm.team.fulltext.indexLocation com.ibm.team.datawarehouse.db.jdbc.location to the absolute path The results seem to be the same as before. When I changed com.ibm.team.jfs.index.root.directory it seemed to prevent the server from loading. Also, I'm not sure if this is related, but when I run the autostart script and I watch the catalina.out log, I see no error immediately after boot. But once I visit the website and I check the log I see: java.util.zip.ZipException: Too many open files My /etc/security/limits.conf file is already changed to: * hard nofile 65536 * soft nofile 65536 and running ulimit -n results in 65536 If I run /etc/init.d/jazz restart at this point, and revisit the website. The website works, and I don't see any errors in the log file. |
![]()
I have tried again, using your recommendation Ralph and documentation for "Running in Apache Tomcat as a Windows service":
"If you are using Derby as the database for your Jazz Repository, edit the teamserver.properties file each application to make the DB location an absolute path. Substitute the app name variable with the appropriate application directory name, for example, jts, ccm, qm, rm: Open the <JazzInstallDir>\server\conf\<app>\teamserver.properties file. Change the com.ibm.team.repository.db.jdbc.location=conf/<app>/derby/repositoryDB entry to com.ibm.team.repository.db.jdbc.location=C:/PROGRA~1/IBM/JazzTeamServer/server/conf/<app>/derby/repositoryDB. Note the forward slash (/) in the path. In addition to editing the teamserver.properties file, you must edit the log4j.properties file to make the log file path name absolute. Substitute the app name variable with the application directory names, for example, jts, ccm, qm, rm, admin and the app name.log variable with each application log file, for example, jts.log, ccm.log, qm.log, rm.log, admin.log: Open the <JazzInstallDir>\server\conf\<app>\log4j.properties file. Change the log4j.appender.file.File=logs/<app> entry to log4j.appender.file.File=C:/PROGRA~1/IBM/JazzTeamServer/server/logs/<app>. Note the forward slash (/) in the path. " Replacing paths with linux absolute paths. I modified these files: server/conf/qm/teamserver.properties server/conf/ccm/teamserver.properties server/conf/jts/teamserver.properties server/conf/admin/log4j.properties server/conf/rm/log4j.properties server/conf/qm/log4j.properties server/conf/ccm/log4j.properties server/conf/jts/log4j.properties I then used the same script in the first post, and enabled it with chkconfig jazz on. I am seeing the server boot up and jazz starting. When I visit the website I see the login prompt, which is usual. Once logging in I either get "Loading..." and the website just hangs there or I see a webpage with random errors. Refreshing the page doesn't do anything, or I see different errors..." For example, 500 errors, dashboards are broken, etc. This is the same with jts/admin, qm/admin, and ccm/admin. Does anyone have any other recommendation on how to get a Linux startup script working? |
![]()
Hello Jazzmen,
I recently successfully used this setup with CLM 4.0.0.1 (Tomcat server, Derby DB) on Redhat 5.5 64bits:
|