Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 34678 invoked from network); 13 Jan 2011 19:02:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Jan 2011 19:02:05 -0000 Received: (qmail 96048 invoked by uid 500); 13 Jan 2011 19:02:01 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 95838 invoked by uid 500); 13 Jan 2011 19:02:00 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 95829 invoked by uid 99); 13 Jan 2011 19:02:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jan 2011 19:02:00 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of georges@mhsoftware.com designates 209.169.14.178 as permitted sender) Received: from [209.169.14.178] (HELO mail.mhsoftware.com) (209.169.14.178) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jan 2011 19:01:53 +0000 Received: from EMP00A (c-67-190-16-78.hsd1.co.comcast.net [67.190.16.78]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mhsoftware.com (Postfix) with ESMTPSA id 0ADE22DD37 for ; Thu, 13 Jan 2011 12:01:30 -0700 (MST) From: "George Sexton" To: "'Tomcat Users List'" References: <74787334$25a1ebdd$7f8425fc$@com> In-Reply-To: <74787334$25a1ebdd$7f8425fc$@com> Subject: RE: tomcat won't start via remote ssh command Date: Thu, 13 Jan 2011 12:01:30 -0700 Organization: MH Software, Inc. Message-ID: <003001cbb354$4a325b30$de971190$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acuyy4ws8Qrtk4DITN6LHs8j5SVH3wAiJQ/g Content-Language: en-us X-Virus-Checked: Checked by ClamAV on apache.org You can troubleshoot scripts by adding -x to the first line. For example, the first line in unix shell scripts is usually: #/bin/sh Change that to #/bin/sh -x That turns on echo so you can see each statement executed. You may have to edit multiple scripts if one calls another. George Sexton MH Software, Inc. 303 438-9585 www.mhsoftware.com > -----Original Message----- > From: james [mailto:james@wintercastle.net] > Sent: Wednesday, January 12, 2011 7:35 PM > To: users@tomcat.apache.org > Subject: tomcat won't start via remote ssh command > > Hi Guys, > > I created a simple (i thought) script to restart a tomcat server when > our > alerting system sees the site as down (almost always a memory issue > that a > reboot of the tomcat server fixes). > > The script runs and works fine when executed as the user on the local > server. When run via ssh, it will shut down the tomcat server, and > appear > to start it -- but does not. I'm not a tomcat expert at all and I > haven't > been able to figure out how to get more information. I'm guessing that > there is some environment information that is missing over the ssh > terminal > that is causing it not to start, but I don't have any hints and the > output > is the same as when it works. > > The SSH command I run that doesn't work is below. Since even this > command > does not work, I won't bother complicating the issue with the details > of my > script: > > $ ssh -t -p 222 user@tomcatserver.domain.com > '/usr/local/sites/domain.com/domain-tomcat1- > production/tomcat/bin/startup.sh > ' > Using CATALINA_BASE: > /usr/local/sites/domain.com/domain-tomcat1-production/tomcat > Using CATALINA_HOME: > /usr/local/sites/domain.com/domain-tomcat1-production/tomcat > Using CATALINA_TMPDIR: > /usr/local/sites/domain.com/domain-tomcat1-production/tomcat/temp > Using JRE_HOME: /usr > Connection to tomcatserver.domain.com closed. > > Any help would be very much appreciated if you have experience with > this. > James > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org