Okay. I found the line with port 8005 in server.xml:
./conf/server.xml:<Server port="8005" shutdown="SHUTDOWN">
... and changed it to 8080. However, altho $CTALINA_HOME/bin/shutdown.sh now runs, it
doesn't seem to shut it down. Furthermore there are two of them running. PIDs 1597
and 1598. Is that correct? TIA.
/var/run/jsvc.pid shows only 1598.
root 1597 0.0 0.0 8560 336 ? Ss 17:30 0:00 jsvc.exec -classpath
/opt/apache-tomcat-9.0.0.M15/bin/bootstrap.jar:/opt/apache-tomcat-9.0.0.M15/bin/tomcat-juli.jar
-outfile /opt/apache-tomcat-9.0.0.M15/logs/catalina.out -errfile
/opt/apache-tomcat-9.0.0.M15/logs/catalina.err
-Dcatalina.home=/opt/apache-tomcat-9.0.0.M15 -Dcatalina.base=/opt/apache-tomcat-9.0.0.M15
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=/opt/apache-tomcat-9.0.0.M15/conf/logging.properties
org.apache.catalina.startup.Bootstrap
root 1598 71.2 2.0 2986964 80708 ? Sl 17:30 0:02 jsvc.exec -classpath
/opt/apache-tomcat-9.0.0.M15/bin/bootstrap.jar:/opt/apache-tomcat-9.0.0.M15/bin/tomcat-juli.jar
-outfile /opt/apache-tomcat-9.0.0.M15/logs/catalina.out -errfile
/opt/apache-tomcat-9.0.0.M15/logs/catalina.err
-Dcatalina.home=/opt/apache-tomcat-9.0.0.M15 -Dcatalina.base=/opt/apache-tomcat-9.0.0.M15
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=/opt/apache-tomcat-9.0.0.M15/conf/logging.properties
org.apache.catalina.startup.Bootstrap
root 1613 0.0 0.0 161352 1884 pts/0 R+ 17:31 0:00 ps -auxww
[root@pwswiki10 opt]# more catalina_start
CATALINA_BASE=$CATALINA_HOME
CATALINA_OPTS="-Xmx1024m -XX:MaxPermSize=192m"
export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true"
cd $CATALINA_HOME
./bin/jsvc \
-classpath $CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/tomcat-juli.j
ar \
-outfile $CATALINA_BASE/logs/catalina.out \
-errfile $CATALINA_BASE/logs/catalina.err \
-Dcatalina.home=$CATALINA_HOME \
-Dcatalina.base=$CATALINA_BASE \
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties \
org.apache.catalina.startup.Bootstrap
export PERL_MB_OPT="--install_base /root/perl5";
export PERL_MM_OPT="INSTALL_BASE=/root/perl5";
[root@pwswiki10 opt]#
----------------------------
-----Original Message-----
From: users [mailto:users-bounces@xwiki.org] On Behalf Of Douglas Landau
Sent: Wednesday, March 01, 2017 5:14 PM
To: XWiki Users
Subject: [xwiki-users] Stopping Xwiki-8.4.3/Tomcat-9.0 and integrating with systemctl
Hi All,
Sorry for the dumb question. I've installed CentOS-7.2, Java-1.8, MySQL 5.7, Tomcat
9.0.0, XWiki 8.4.3. I've built jsvc and have created a startup script,
catalina_start. But now I want a stop script, and to integrate with systemctl/systemd on
CentOS-7. I see the page at
https://www.weblab360.com/User:xltran/App/xWiki/Installation/CentOS_7 which shows the form
of the systemd script /etc/systemd/system.xwiki.service:
-------------------------------------------------------
[Unit]
Description=xWiki Service
After=network.target
[Service]
Type=simple
User=root
ExecStart=/bin/bash /usr/local/xwiki/start_xwiki.sh -p 80 ExecStop=/bin/bash
/usr/local/xwiki/stop_xwiki.sh -p 80 Restart=on-abort
[Install]
WantedBy=multi-user.target
-----------------------------------------------
But, I have no /usr/local/xwiki and thus no start-xwiki.sh and stop_xwiki.sh. I installed
from .war and don't see those scripts in /opt/apache-tomcat-9.0.0.M15/webapps/xwiki/.
Okay, well, I have a catalina_start that works, so I can use that. But for the stop?
When I say "$CATALINA_HOME/bin/catalina.sh stop" or
"$CATALINA_HOME/bin/shutdown.sh", I get the following:
[root@pwswiki10 opt]# $CATALINA_HOME/bin/shutdown.sh
Using CATALINA_BASE: /opt/apache-tomcat-9.0.0.M15
Using CATALINA_HOME: /opt/apache-tomcat-9.0.0.M15
Using CATALINA_TMPDIR: /opt/apache-tomcat-9.0.0.M15/temp
Using JRE_HOME: /usr/java/jdk1.8.0_25
Using CLASSPATH:
/opt/apache-tomcat-9.0.0.M15/bin/bootstrap.jar:/opt/apache-tomcat-9.0.0.M15/bin/tomcat-juli.jar
Mar 01, 2017 5:12:16 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Could not contact localhost:8005. Tomcat may not be running.
Mar 01, 2017 5:12:16 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:476)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:408)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:497)
What have I neglected to do?
Thanks in advance
Doug
The information contained in this transmission may contain West Marine proprietary,
confidential and/or privileged information. It is intended only for the use of the
person(s) named above. If you are not the intended recipient, you are hereby notified that
any review, dissemination, distribution or duplication of this communication is strictly
prohibited. If you are not the intended recipient, please contact the sender by reply
email and destroy all copies of the original message. To reply to our email administrator
directly, please send an email to netadmin(a)westmarine.com.
The information contained in this transmission may contain West Marine proprietary,
confidential and/or privileged
information. It is intended only for the use of the person(s) named above. If you are not
the intended recipient, you are
hereby notified that any review, dissemination, distribution or duplication of this
communication is strictly prohibited.
If you are not the intended recipient, please contact the sender by reply email and
destroy all copies of the original
message. To reply to our email administrator directly, please send an email to
netadmin(a)westmarine.com.