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:

  1. detect if tomcat is running
  2. if not, start it up
  3. add a shutdown script to disable tomcat on exit so it frees up resources

Change History (9)

comment:1 by kalxas, 11 years ago

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?

comment:2 by kalxas, 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 hamish, 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:4 by kalxas, 11 years ago

52nWPS fix committed in [10190]

comment:5 by kalxas, 11 years ago

52nWSS fix committed in [10191]

comment:6 by kalxas, 11 years ago

MapFish fix committed in [10198]

comment:7 by kalxas, 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 kalxas, 11 years ago

Cc: live-demo@… added
Owner: changed from live-demo@… to kalxas
Priority: criticalnormal

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.

comment:9 by kalxas, 11 years ago

Resolution: fixed
Status: newclosed

confirmed on build 10210.

Note: See TracTickets for help on using tickets.