Opened 11 years ago
Closed 11 years ago
#1141 closed defect (fixed)
Projects using default tomcat should enable it in their startup scripts
Reported by: | kalxas | Owned by: | kalxas |
---|---|---|---|
Priority: | normal | Milestone: | OSGeoLive7.0 |
Component: | OSGeoLive | Keywords: | web services, 7.0, tomcat |
Cc: | live-demo@… |
Description
Since #1032 was fixed, 52North (WPS,SOS and WSS), rasdaman and Mapfish (print module) are not working without "sudo service tomcat6 start". We must adapt the start up scripts to enable tomcat6 when needed.
A simple way to do that without root password is presented here: http://ubuntuforums.org/showthread.php?t=1661403
So (rasdaman, Mapfish and 52N) startup scripts should:
- detect if tomcat is running
- if not, start it up
- add a shutdown script to disable tomcat on exit so it frees up resources
Change History (9)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
A better approach:
user ALL=(root) NOPASSWD: /usr/sbin/service tomcat6 start,/usr/sbin/service tomcat6 stop,/usr/sbin/service tomcat6 status
comment:3 by , 11 years ago
while a (strictly targeted) sudoers.d approach is probably better since it doesn't rely on stable and plain test passwrds, note that you can also directly pass the passwrd to sudo on the command line in a script:
echo "$PASSWORD" | sudo -S service ${...} status
I'm pretty sure that in the past one of the web services projects was already doing something similar in the script called by their startup.desktop/shutdown.desktop menu items, although I can't remember which one off the top of my head.
Hamish
comment:7 by , 11 years ago
Rasdaman fix committed in [10201]
All applications are ported to the new tomcat6 setup. I will trigger a new nightly build to test and then we can close this ticket.
comment:8 by , 11 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Priority: | critical → normal |
All applications are working as expected in build10204. Minor naming problems and menu misplacements are fixed now in trunk. Waiting for next build to close this issue.
committed fix for 52nSOS as an example in [10186]
For live session it will work ok. For installed system we need to add the following in a file under /etc/sudoers.d
user ALL=(root) NOPASSWD: /usr/sbin/service
Perhaps we can change user to ALL on the above to work for every user?