Tomcat relicts from previous installation - ubuntu

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Tomcat relicts from previous installation - ubuntu

Christoph P.U. Kukulies
I’m resurrecting tomcat on a server (Ubuntu 18.04.4) on which I had been running tomcat7 some time ago.
At the moment, when the system has started up, I’m seeing a process:

root@kuku:~# ps ax | grep -i tomcat
 1092 ?        Sl     0:08 /usr/lib/jvm/java-1.11.0-openjdk-i386/bin/java -Djava.util.logging.config.file=/usr/share/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Xms512M -Xmx1024M -server -XX:+UseParallelGC -Dignore.endorsed.dirs= -classpath /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/share/tomcat -Dcatalina.home=/usr/share/tomcat -Djava.io.tmpdir=/usr/share/tomcat/temp org.apache.catalina.startup.Bootstrap start
 2079 pts/0    S+     0:00 grep --color=auto -i tomcat
root@kuku:~# 



Since I have no tomcat service script in /etc/init.d I have no idea at the moment, who or which script is starting this java process.

Any clues?

Christoph





smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat relicts from previous installation - ubuntu

Martin Grigorov
Hi Christoph,

On Thu, Jul 9, 2020 at 12:48 PM Christoph Kukulies <[hidden email]>
wrote:

> I’m resurrecting tomcat on a server (Ubuntu 18.04.4) on which I had been
> running tomcat7 some time ago.
> At the moment, when the system has started up, I’m seeing a process:
>
> root@kuku:~# ps ax | grep -i tomcat
>  1092 ?        Sl     0:08 /usr/lib/jvm/java-1.11.0-openjdk-i386/bin/java
> -Djava.util.logging.config.file=/usr/share/tomcat/conf/logging.properties
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> -Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom
> -Djdk.tls.ephemeralDHKeySize=2048
> -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
> -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Xms512M
> -Xmx1024M -server -XX:+UseParallelGC -Dignore.endorsed.dirs= -classpath
> /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar
> -Dcatalina.base=/usr/share/tomcat -Dcatalina.home=/usr/share/tomcat
> -Djava.io.tmpdir=/usr/share/tomcat/temp
> org.apache.catalina.startup.Bootstrap start
>  2079 pts/0    S+     0:00 grep --color=auto -i tomcat
> root@kuku:~#
>
>
>
> Since I have no tomcat service script in /etc/init.d I have no idea at the
> moment, who or which script is starting this java process.
>

Most probably it is systemd.
Try with: systemctl status tomcat

If this is the case you can stop it with: systemctl stop tomcat
and disable it so it does not start on the next reboot with: systemctl
disable tomcat


>
> Any clues?
>
> Christoph
>
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat relicts from previous installation - ubuntu

calder
In reply to this post by Christoph P.U. Kukulies
On Thu, Jul 9, 2020 at 4:48 AM Christoph Kukulies <[hidden email]> wrote:
>
> I’m resurrecting tomcat on a server (Ubuntu 18.04.4) on which I had been running tomcat7 some time ago.
> At the moment, when the system has started up, I’m seeing a process:
>
> root@kuku:~# ps ax | grep -i tomcat
>  1092 ?        Sl     0:08 /usr/lib/jvm/java-1.11.0-openjdk-i386/bin/java -Djava.util.logging.config.file=/usr/share/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Xms512M -Xmx1024M -server -XX:+UseParallelGC -Dignore.endorsed.dirs= -classpath /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/share/tomcat -Dcatalina.home=/usr/share/tomcat -Djava.io.tmpdir=/usr/share/tomcat/temp org.apache.catalina.startup.Bootstrap start
>  2079 pts/0    S+     0:00 grep --color=auto -i tomcat

> root@kuku:~#

It's never a good idea to run as root.

> Since I have no tomcat service script in /etc/init.d I have no idea at the moment, who or which script is starting this java process.

might try:
user@machine:~ /> ps systemctl status <PID of JAVA>
so in your example
user@machine:~ /> ps systemctl status 1092

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Tomcat relicts from previous installation - ubuntu

Christoph P.U. Kukulies
In reply to this post by Martin Grigorov

> Am 09.07.2020 um 13:28 schrieb Martin Grigorov <[hidden email]>:
>
> Hi Christoph,
>
> On Thu, Jul 9, 2020 at 12:48 PM Christoph Kukulies <[hidden email]>
> wrote:
>
>> I’m resurrecting tomcat on a server (Ubuntu 18.04.4) on which I had been
>> running tomcat7 some time ago.
>> At the moment, when the system has started up, I’m seeing a process:
>>
>> root@kuku:~# ps ax | grep -i tomcat
>> 1092 ?        Sl     0:08 /usr/lib/jvm/java-1.11.0-openjdk-i386/bin/java
>> -Djava.util.logging.config.file=/usr/share/tomcat/conf/logging.properties
>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>> -Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom
>> -Djdk.tls.ephemeralDHKeySize=2048
>> -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
>> -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Xms512M
>> -Xmx1024M -server -XX:+UseParallelGC -Dignore.endorsed.dirs= -classpath
>> /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar
>> -Dcatalina.base=/usr/share/tomcat -Dcatalina.home=/usr/share/tomcat
>> -Djava.io.tmpdir=/usr/share/tomcat/temp
>> org.apache.catalina.startup.Bootstrap start
>> 2079 pts/0    S+     0:00 grep --color=auto -i tomcat
>> root@kuku:~#
>>
>>
>>
>> Since I have no tomcat service script in /etc/init.d I have no idea at the
>> moment, who or which script is starting this java process.
>>
>
> Most probably it is systemd.
> Try with: systemctl status tomcat
>
> If this is the case you can stop it with: systemctl stop tomcat
> and disable it so it does not start on the next reboot with: systemctl
> disable tomcat
>
Thanks, that helped.


>
>>
>> Any clues?


>> Christoph


smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat relicts from previous installation - ubuntu

Christoph P.U. Kukulies
In reply to this post by calder

> Am 09.07.2020 um 13:34 schrieb calder <[hidden email]>:
>
> On Thu, Jul 9, 2020 at 4:48 AM Christoph Kukulies <[hidden email]> wrote:
>>
>> I’m resurrecting tomcat on a server (Ubuntu 18.04.4) on which I had been running tomcat7 some time ago.
>> At the moment, when the system has started up, I’m seeing a process:
>>
>> root@kuku:~# ps ax | grep -i tomcat
>> 1092 ?        Sl     0:08 /usr/lib/jvm/java-1.11.0-openjdk-i386/bin/java -Djava.util.logging.config.file=/usr/share/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Xms512M -Xmx1024M -server -XX:+UseParallelGC -Dignore.endorsed.dirs= -classpath /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/share/tomcat -Dcatalina.home=/usr/share/tomcat -Djava.io.tmpdir=/usr/share/tomcat/temp org.apache.catalina.startup.Bootstrap start
>> 2079 pts/0    S+     0:00 grep --color=auto -i tomcat
>
>> root@kuku:~#
>
> It's never a good idea to run as root.
>
>> Since I have no tomcat service script in /etc/init.d I have no idea at the moment, who or which script is starting this java process.
>
> might try:
> user@machine:~ /> ps systemctl status <PID of JAVA>
> so in your example
> user@machine:~ /> ps systemctl status 1092

systemctl status 1092

worked (without the „ps“) :)


smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat relicts from previous installation - ubuntu

calder
On Thu, Jul 9, 2020, 06:59 Christoph Kukulies <[hidden email]> wrote:.

> >
> > might try:
> > user@machine:~ /> ps systemctl status <PID of JAVA>
> > so in your example
> > user@machine:~ /> ps systemctl status 1092
>
> systemctl status 1092
>


worked (without the „ps“) :)


sorry about that ... somehow fat-fingered that in : /
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat relicts from previous installation - ubuntu

Christoph P.U. Kukulies
Is it an Ubuntu peculiarity that a tomcat.service gets installed? I assume, I’m getting this automatically when doing an
apt-get install tomcat8, right?

Christoph

Am 09.07.2020 um 15:19 schrieb calder <[hidden email]>:

On Thu, Jul 9, 2020, 06:59 Christoph Kukulies <[hidden email]> wrote:.


might try:
user@machine:~ /> ps systemctl status <PID of JAVA>
so in your example
user@machine:~ /> ps systemctl status 1092

systemctl status 1092



worked (without the „ps“) :)


sorry about that ... somehow fat-fingered that in : /


smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat relicts from previous installation - ubuntu

Martin Grigorov
On Thu, Jul 9, 2020, 19:13 Christoph Kukulies <[hidden email]> wrote:

> Is it an Ubuntu peculiarity that a tomcat.service gets installed? I
> assume, I’m getting this automatically when doing an
> apt-get install tomcat8, right?
>

Yes. All distros do that.
You can download the tar.gz file from https://tomcat.apache.org if you
prefer to manage it yourself.


> —
> Christoph
>
> Am 09.07.2020 um 15:19 schrieb calder <[hidden email]>:
>
> On Thu, Jul 9, 2020, 06:59 Christoph Kukulies <[hidden email]> wrote:.
>
>
> might try:
> user@machine:~ /> ps systemctl status <PID of JAVA>
> so in your example
> user@machine:~ /> ps systemctl status 1092
>
>
> systemctl status 1092
>
>
>
> worked (without the „ps“) :)
>
>
> sorry about that ... somehow fat-fingered that in : /
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat relicts from previous installation - ubuntu

calder
In reply to this post by Christoph P.U. Kukulies
>
> Am 09.07.2020 um 15:19 schrieb calder <[hidden email]>:
>
> On Thu, Jul 9, 2020, 06:59 Christoph Kukulies <[hidden email]> wrote:.
>
> might try:
> user@machine:~ /> ps systemctl status <PID of JAVA>
> so in your example
> user@machine:~ /> ps systemctl status 1092
>
>
> systemctl status 1092
>
> worked (without the „ps“) :)
>
> sorry about that ... somehow fat-fingered that in : /
>
> On Thu, Jul 9, 2020, 11:13 Christoph Kukulies <[hidden email]> wrote:

Is it an Ubuntu peculiarity that a tomcat.service gets installed? I assume,
I’m getting this automatically when doing an
apt-get install tomcat8, right?



For a distro-specific Tomcat install - meaning the Ubuntu team customized
the packaging and created the expected / related services...
... yes, a service would be automagically configured to start up Tomcat.

Most all distros do that ... if you elect to install the software, but DO
NOT want the service to be automagically started, you'd need to explicitly
stop and / or disable it.