Re: Starting Tomcat 10 at bootup

2022-11-27 Thread Rob Sargent




On 11/27/22 10:05, Amn Ojee Uw wrote:
Thank you folks for the help, but as you might've guess, I am not well 
verse in Tomcat, I am just a student of it, let alone trouble shooting 
it. So, in '/opt/tomecat/opt' I found these files, which just might be 
able to shed some light in the eyes of a experienced Tomecat user.



== currurnt.out ==

/opt/tomcat/bin/catalina.sh: 1: eval: 
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java: not found
/opt/tomcat/bin/catalina.sh: 1: eval: 
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java: not found
/opt/tomcat/bin/catalina.sh: 1: eval: 
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java: not found
/opt/tomcat/bin/catalina.sh: 1: eval: 
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java: not found
/opt/tomcat/bin/catalina.sh: 1: eval: 
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java: not found
/opt/tomcat/bin/catalina.sh: 1: eval: 
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java: not found




What is the date of "currurnt.out" (ls -l currurnt.out)?  Please don't 
show a screen shot, just the text.  Is '/opt/tomecate/opt' the actual 
location?
Do you have JAVA_HOME or JAVAHOME set in your environment?  echo 
$JAVA_HOME; echo $JAVAHOME



== localhost.2022-11-27.log ==

27-Nov-2022 11:52:28.422 INFO [main] 
org.apache.catalina.core.ApplicationContext.log ContextListener: 
contextInitialized()
27-Nov-2022 11:52:28.422 INFO [main] 
org.apache.catalina.core.ApplicationContext.log SessionListener: 
contextInitialized()
27-Nov-2022 11:52:28.435 INFO [main] 
org.apache.catalina.core.ApplicationContext.log ContextListener: 
attributeAdded('StockTicker', 'async.Stockticker@186978a6')
27-Nov-2022 11:53:07.817 INFO [Thread-1] 
org.apache.catalina.core.ApplicationContext.log SessionListener: 
contextDestroyed()
27-Nov-2022 11:53:07.817 INFO [Thread-1] 
org.apache.catalina.core.ApplicationContext.log ContextListener: 
contextDestroyed()




Where is this log found and is this log from manually starting tomcat 
(using catalina.sh) or from systemctl start tomcat.  We see here that 
java has in fact been found, tomcat has started and found a web-app 
(Stockticker) I believe.  Then stopped.  I assume there are more lines 
in the log file?



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Starting Tomcat 10 at bootup

2022-11-27 Thread Amn Ojee Uw
Thank you folks for the help, but as you might've guess, I am not well 
verse in Tomcat, I am just a student of it, let alone trouble shooting 
it. So, in '/opt/tomecat/opt' I found these files, which just might be 
able to shed some light in the eyes of a experienced Tomecat user.



== currurnt.out ==

/opt/tomcat/bin/catalina.sh: 1: eval: 
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java: not found
/opt/tomcat/bin/catalina.sh: 1: eval: 
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java: not found
/opt/tomcat/bin/catalina.sh: 1: eval: 
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java: not found
/opt/tomcat/bin/catalina.sh: 1: eval: 
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java: not found
/opt/tomcat/bin/catalina.sh: 1: eval: 
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java: not found
/opt/tomcat/bin/catalina.sh: 1: eval: 
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java: not found


== localhost.2022-11-27.log ==

27-Nov-2022 11:52:28.422 INFO [main] 
org.apache.catalina.core.ApplicationContext.log ContextListener: 
contextInitialized()
27-Nov-2022 11:52:28.422 INFO [main] 
org.apache.catalina.core.ApplicationContext.log SessionListener: 
contextInitialized()
27-Nov-2022 11:52:28.435 INFO [main] 
org.apache.catalina.core.ApplicationContext.log ContextListener: 
attributeAdded('StockTicker', 'async.Stockticker@186978a6')
27-Nov-2022 11:53:07.817 INFO [Thread-1] 
org.apache.catalina.core.ApplicationContext.log SessionListener: 
contextDestroyed()
27-Nov-2022 11:53:07.817 INFO [Thread-1] 
org.apache.catalina.core.ApplicationContext.log ContextListener: 
contextDestroyed()



Again, thanks so much for the help.

On 2022-11-26 9:48 a.m., Rob Sargent wrote:



On Nov 26, 2022, at 4:54 AM, Amn Ojee Uw  wrote:

Please excuse my ignorance, buy what log would that be and how can I get to it?

On 2022-11-26 2:23 a.m., Thomas Hoffmann (Speed4Trade GmbH) wrote:

-Ursprüngliche Nachricht-
Von: Rob Sargent 
Gesendet: Samstag, 26. November 2022 06:32
An: Tomcat Users List 
Betreff: Re: Starting Tomcat 10 at bootup



On Nov 25, 2022, at 4:28 PM, Amn Ojee Uw 

wrote:

Hey folks!

The issue :
~~~

I just installed 'apache-tomcat-10.0.27.tar.gz' in my Debian 11 (stable) box,

running OpenjDK 17.0.4, this was done following the recommendation on 'How
to Install Apache Tomcat on Debian 11 (Step by Step)
<https://www.linuxtechi.com/how-to-install-apache-tomcat-on-debian/> '.
With the exception of the java installation, I followed the steps up to section 
8
where I get this error :

*/sudo systemctl restart tomcat/**/
/**/Job for tomcat.service failed because the control process exited
with error code./**/ /**/See "systemctl status tomcat.service" and
"journalctl -xe" for details./*

I followed the recommendation of the error message and I get this :

systemctl status tomcat.service
● tomcat.service - Tomcat webs servlet container
  Loaded: loaded (/etc/systemd/system/tomcat.service; *enabled*; vendor

preset>

  Active: activating (auto-restart) (Result: exit-code) since Fri 
2022-11-25>
 Process: 86949 ExecStart=/opt/tomcat/bin/startup.sh (code=exited,

status=0/>

 Process: 86960 ExecStop=/opt/tomcat/bin/shutdown.sh (code=exited,

status=1/>

 CPU: 38ms

My Imperfect Solution
~~~

If from the command prompt or a shell script, I run this code sudo

'/opt/tomcat/bin/catalina.sh run', Tomcat runs nicely, but it grabs the 
Terminal,
if I close the Terminal, Tomcat just stops working. Obviously not a perfect
solution.

I am a newcomer to the Linux world, but in Windows I had the same issue, so I

wonder if this is a potential bug.

Please help me resolve this issue or let me know how to report this bug. (This

would be my first contribution to the team, so I am rightfully exited).

Thanks in advance.

What do the logs have to say?


Syslog and Tomcat-Logs should provide more information.
Systemctl usually doesn’t help much even if it tells you to look at it 

Btw: You can also run the sh-file with ampersand at the end to get back to your 
console.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


The startup.sh file in your first post will likely name the log file. Or look 
in /var/log or in /opt/tomcat. Likely named catalina.out but that’s a guess
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
Fo

Re: Starting Tomcat 10 at bootup

2022-11-26 Thread Rob Sargent



> On Nov 26, 2022, at 4:54 AM, Amn Ojee Uw  wrote:
> 
> Please excuse my ignorance, buy what log would that be and how can I get to 
> it?
> 
> On 2022-11-26 2:23 a.m., Thomas Hoffmann (Speed4Trade GmbH) wrote:
>>> -Ursprüngliche Nachricht-
>>> Von: Rob Sargent 
>>> Gesendet: Samstag, 26. November 2022 06:32
>>> An: Tomcat Users List 
>>> Betreff: Re: Starting Tomcat 10 at bootup
>>> 
>>> 
>>>> On Nov 25, 2022, at 4:28 PM, Amn Ojee Uw 
>>> wrote:
>>>> Hey folks!
>>>> 
>>>> The issue :
>>>> ~~~
>>>> 
>>>> I just installed 'apache-tomcat-10.0.27.tar.gz' in my Debian 11 (stable) 
>>>> box,
>>> running OpenjDK 17.0.4, this was done following the recommendation on 'How
>>> to Install Apache Tomcat on Debian 11 (Step by Step)
>>> <https://www.linuxtechi.com/how-to-install-apache-tomcat-on-debian/> '.
>>> With the exception of the java installation, I followed the steps up to 
>>> section 8
>>> where I get this error :
>>>> */sudo systemctl restart tomcat/**/
>>>> /**/Job for tomcat.service failed because the control process exited
>>>> with error code./**/ /**/See "systemctl status tomcat.service" and
>>>> "journalctl -xe" for details./*
>>>> 
>>>> I followed the recommendation of the error message and I get this :
>>>> 
>>>> systemctl status tomcat.service
>>>> ● tomcat.service - Tomcat webs servlet container
>>>>  Loaded: loaded (/etc/systemd/system/tomcat.service; *enabled*; vendor
>>> preset>
>>>>  Active: activating (auto-restart) (Result: exit-code) since Fri 
>>>> 2022-11-25>
>>>> Process: 86949 ExecStart=/opt/tomcat/bin/startup.sh (code=exited,
>>> status=0/>
>>>> Process: 86960 ExecStop=/opt/tomcat/bin/shutdown.sh (code=exited,
>>> status=1/>
>>>> CPU: 38ms
>>>> 
>>>> My Imperfect Solution
>>>> ~~~
>>>> 
>>>> If from the command prompt or a shell script, I run this code sudo
>>> '/opt/tomcat/bin/catalina.sh run', Tomcat runs nicely, but it grabs the 
>>> Terminal,
>>> if I close the Terminal, Tomcat just stops working. Obviously not a perfect
>>> solution.
>>>> I am a newcomer to the Linux world, but in Windows I had the same issue, 
>>>> so I
>>> wonder if this is a potential bug.
>>>> Please help me resolve this issue or let me know how to report this bug. 
>>>> (This
>>> would be my first contribution to the team, so I am rightfully exited).
>>>> Thanks in advance.
>>> What do the logs have to say?
>>> 
>> Syslog and Tomcat-Logs should provide more information.
>> Systemctl usually doesn’t help much even if it tells you to look at it 
>> 
>> Btw: You can also run the sh-file with ampersand at the end to get back to 
>> your console.
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
The startup.sh file in your first post will likely name the log file. Or look 
in /var/log or in /opt/tomcat. Likely named catalina.out but that’s a guess
-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Starting Tomcat 10 at bootup

2022-11-25 Thread Rob Sargent


> On Nov 25, 2022, at 4:28 PM, Amn Ojee Uw  wrote:
> 
> Hey folks!
> 
> The issue :
> ~~~
> 
> I just installed 'apache-tomcat-10.0.27.tar.gz' in my Debian 11 (stable) box, 
> running OpenjDK 17.0.4, this was done following the recommendation on 'How to 
> Install Apache Tomcat on Debian 11 (Step by Step) 
>  '. With 
> the exception of the java installation, I followed the steps up to section 8 
> where I get this error :
> 
> */sudo systemctl restart tomcat/**/
> /**/Job for tomcat.service failed because the control process exited with 
> error code./**/
> /**/See "systemctl status tomcat.service" and "journalctl -xe" for details./*
> 
> I followed the recommendation of the error message and I get this :
> 
> systemctl status tomcat.service
> ● tomcat.service - Tomcat webs servlet container
>  Loaded: loaded (/etc/systemd/system/tomcat.service; *enabled*; vendor 
> preset>
>  Active: activating (auto-restart) (Result: exit-code) since Fri 
> 2022-11-25>
> Process: 86949 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, 
> status=0/>
> Process: 86960 ExecStop=/opt/tomcat/bin/shutdown.sh (code=exited, 
> status=1/>
> CPU: 38ms
> 
> My Imperfect Solution
> ~~~
> 
> If from the command prompt or a shell script, I run this code sudo 
> '/opt/tomcat/bin/catalina.sh run', Tomcat runs nicely, but it grabs the 
> Terminal, if I close the Terminal, Tomcat just stops working. Obviously not a 
> perfect solution.
> 
> I am a newcomer to the Linux world, but in Windows I had the same issue, so I 
> wonder if this is a potential bug.
> 
> Please help me resolve this issue or let me know how to report this bug. 
> (This would be my first contribution to the team, so I am rightfully exited).
> 
> Thanks in advance.

What do the logs have to say?  



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org