Thanks for that Jeff. I did not know that pty is a configurable property in
sudoers file.

On Mon, Nov 26, 2012 at 7:05 AM, Jeff Forcier <[email protected]> wrote:

> Hi Abhi,
>
> On Sun, Nov 18, 2012 at 9:24 PM, Abhi <[email protected]> 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
>



-- 
Cheers,
Abhi
_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to