[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fab-user] service and pty=False
From: |
Jeff Forcier |
Subject: |
Re: [Fab-user] service and pty=False |
Date: |
Sun, 25 Nov 2012 17:35:15 -0800 |
Hi Abhi,
On Sun, Nov 18, 2012 at 9:24 PM, Abhi <address@hidden> wrote:
> I am using fabric to restart tomcat(using service or init.d) and even though
> it says tomcat restarted successfully it does not. So, as per the FAQ, I set
> pty=False and tried again. But, now, I get this error:
>
> sudo: /etc/init.d/tomcat restart
>
> out: sudo: sorry, you must have a tty to run sudo
That's tough -- having pty off is the only quick solution we've found
to the problem where init scripts misbehave, and if you cannot change
your sudo configuration to allow tty-less runs (the easiest solution
by far), that's lose-lose.
Depending on what access you have, you may want to see if a
non-init-script method of running Tomcat will work better under a pty.
'service' still runs init scripts under the hood which is why it isn't
helping -- I'd look into supervisord, upstart or runit/daemontools.
These tools run your program under their own process and may behave
better with ptys.
Best of luck,
Jeff
--
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org