Run startup with pty=False.  I would not recommend running tomcat as root.
I usually run it as tomcat(1Šx).

def start_tomcat():
    with settings(hide('warnings'), warn_only=True):
        run('./bin/startup.sh', pty=False)

def stop_tomcat():
    with settings(hide('warnings'), warn_only=True):
        run('./bin/shutdown.sh', pty=False)

-- 
Stan Chan
Director of Site Operations
KreditFly Inc
[email protected]

From:  Charlie White <[email protected]>
Date:  Tue, 22 Mar 2011 11:37:42 -0400
To:  <[email protected]>
Subject:  [Fab-user] Cant start tomcat with Fabric

Hello All,

   I'm looking for help with starting tomcat from Fabric. I've tried on a
couple of different machines and none work. Oddly, stopping Tomcat works
fine.

Here are my fabric functions:

def start_tomcat():
sudo("/etc/init.d/tomcat-8080 start")
def stop_tomcat():
sudo("/etc/init.d/tomcat-8080 stop")

On both shutdown and startup, I see the correct output. So from all
appearances the start command was run on the remote server, and the expected
output was seen, below:

[blueman.cashstar.lan] Executing task 'start_tomcat'
[blueman.cashstar.lan] sudo: /etc/init.d/tomcat-8080 start
[blueman.cashstar.lan] Login password:
[blueman.cashstar.lan] out: Starting Tomcat 8080.
[blueman.cashstar.lan] out: Using CATALINA_BASE:   /usr/local/tomcat-8080
[blueman.cashstar.lan] out: Using CATALINA_HOME:   /usr/local/tomcat-8080
[blueman.cashstar.lan] out: Using CATALINA_TMPDIR:
/usr/local/tomcat-8080/temp
[blueman.cashstar.lan] out: Using JRE_HOME:        /usr
[blueman.cashstar.lan] out: Using CLASSPATH:
/usr/local/tomcat-8080/bin/bootstrap.jar
[blueman.cashstar.lan] out:


However, Tomcat is not starting, and Catalina.out shows no record of an
attempted startup. I've also tried using other startup scripts like
"catalina.sh start" and startup.sh, both of which have not worked.

Anyone have any ideas?

thanks a lot,
  Charlie White
_______________________________________________ Fab-user mailing list
[email protected] http://lists.nongnu.org/mailman/listinfo/fab-user

_______________________________________________
Fab-user mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to