A question about (non standard) BaseX stopping
Tuesday, 30 January 2024 · 2 messages · last reply 5 Feb 2024
PJ
Pierre-Yves Jallud30 Jan 2024 11:39 #
Hi all,
after having configuring a BaseX hub (|cluster|farm|...?), I have a last problem (I hope 🤞😅). When I want to stop a BaseX instance with basexhttpstop (or basexhttp stop), I have different results, but none stop the instance.
The context:
* I'm using the following java version: *OpenJDK 64-Bit Server VM (Red_Hat-11.0.21.0.9-1.el7_9) (build 11.0.21+9-LTS, mixed mode, sharing)*
* in the .bash_profile of the basexusr1 (and for each (system LINUX) BaseX user), I precise the BASEX_JVM variable (*export
BASEX_JVM="-Dorg.basex.path=/basex-ferme/sites/basex1"*) to customize the webapp and data repository
* */basex-ferme/sites/basex1/basex* is a symbolic link to the BaseX reference (every site has this symbolic link) located here: */basex-ferme/basex* (hum... this is also a symbolic link pointing to the last version of basex: */basex-ferme/basex-10.7*)
* the ports are different for each instance and are (only) precised when I launch the BaseX process
* I launch each process with this command (adapting basex1, basexusr1 and ports for each BaseX): *su - -s /bin/bash basexusr1 -c "/basex-ferme/sites/basex1/basex/bin/basexhttp -S -h11204 -p11205 -s11206"
*
* for each command below, the code returned is ($?) 0... but the process is still running 🤔 (as the web site). I only test the access of the DBA service (logging as admin) and I've got no database(at this time).
The result of the stop commands:
1. > su - -s /bin/bash basexusr1 -c
"/basex-ferme/sites/basex1/basex/bin/basexhttpstop -h11204 -p11205 -s11206"
BaseX 10.7 [HTTP Server]
[main] INFO org.eclipse.jetty.util.log - Logging initialized @1523ms to org.eclipse.jetty.util.log.Slf4jLog
HTTP Server was stopped (port: 11204).
Server was stopped (port: 11205).
2. > su - -s /bin/bash basexusr1-c
"/basex-ferme/sites/basex1/basex/bin/basexhttp stop -h11204 -p11205 -s11206"
BaseX 10.7 [HTTP Server]
[main] INFO org.eclipse.jetty.util.log - Logging initialized @1441ms to org.eclipse.jetty.util.log.Slf4jLog
HTTP Server was stopped (port: 11204).
Server was stopped (port: 11205).
3. > su - -s /bin/bash basexusr1-c
"/basex-ferme/sites/basex1/basex/bin/basexhttp stop -s11206" BaseX 10.7 [HTTP Server]: 11205).
[main] INFO org.eclipse.jetty.util.log - Logging initialized @1819ms to org.eclipse.jetty.util.log.Slf4jLog
HTTP Server was stopped (port: 8080).
Server was stopped (port: 1984).
4. > su - -s /bin/bash basexusr1-c
"/basex-ferme/sites/basex1/basex/bin/basexhttp stop -h11204 -s11206" BaseX 10.7 [HTTP Server]
[main] INFO org.eclipse.jetty.util.log - Logging initialized @1366ms to org.eclipse.jetty.util.log.Slf4jLog
HTTP Server was stopped (port: 11204).
Server was stopped (port: 1984).
5. > su - -s /bin/bash basexusr1-c
"/basex-ferme/sites/basex1/basex/bin/basexhttp stop -p11205 -s11206" BaseX 10.7 [HTTP Server]
[main] INFO org.eclipse.jetty.util.log - Logging initialized @1006ms to org.eclipse.jetty.util.log.Slf4jLog
HTTP Server was stopped (port: 8080).
Server was stopped (port: 11205).
... and there is no track of the stop request in the log file (but there are the tracks of the admin access). The only solution I have found is to kill the process. That's my plan B, but I hope there is another cleaner solution 🤞😎
Has anyone a suggestion to resolve my problem?... and sorry for the complexity of the context 😓
Greetings
Pierre-Yves
------------------------------------------------------------------------ *Pierre-Yves Jallud*
/Pôle Humanité Numériques / Ingénieur en ingénierie logicielle/
------------------------------------------------------------------------ IHRIM - UMR 5317 <http://ihrim.ens-lyon.fr>
CNRS <https://www.cnrs.fr>
ENS de Lyon <http://www.ens-lyon.fr>
15 Parvis René Descartes - BP7000 - 69342 Lyon CEDEX 07
+33 (0)4 37 37 63 83 - pierre-yves.jallud at ens-lyon.fr
------------------------------------------------------------------------
CG
Christian Grün5 Feb 2024 13:17 #
Salut Pierre-Yves,
Sorry for not giving a helpful answer so far. Indeed it’s the sophisticated setup that makes it difficult to give quick advice. Can you successfully stop your server when you run a single basexhttp instance, or does this already fail? Is it reproducible with 2 instances?
In general, explicit stops are not that important any more today: When the system sends an ordinary stop/kill signal, the instance will be gracefully shut down as well.
Hope this helps (a little), feel free to ask more questions, Christian
Quoted text · Pierre-Yves Jallud · 97 lines
On Tue, Jan 30, 2024 at 11:39 AM Pierre-Yves Jallud < pierre-yves.jallud at ens-lyon.fr> wrote: > Hi all, > > after having configuring a BaseX hub (|cluster|farm|...?), I have a last > problem (I hope 🤞😅). When I want to stop a BaseX instance with > basexhttpstop (or basexhttp stop), I have different results, but none stop > the instance. > > The context: > > - I'm using the following java version: *OpenJDK 64-Bit Server VM > (Red_Hat-11.0.21.0.9-1.el7_9) (build 11.0.21+9-LTS, mixed mode, sharing)* > - in the .bash_profile of the basexusr1 (and for each (system LINUX) > BaseX user), I precise the BASEX_JVM variable (*export > BASEX_JVM="-Dorg.basex.path=/basex-ferme/sites/basex1"*) to customize > the webapp and data repository > - */basex-ferme/sites/basex1/basex* is a symbolic link to the BaseX > reference (every site has this symbolic link) located here: > */basex-ferme/basex* (hum... this is also a symbolic link pointing to > the last version of basex: */basex-ferme/basex-10.7*) > - the ports are different for each instance and are (only) precised > when I launch the BaseX process > - I launch each process with this command (adapting basex1, basexusr1 > and ports for each BaseX): > *su - -s /bin/bash basexusr1 -c > "/basex-ferme/sites/basex1/basex/bin/basexhttp -S -h11204 -p11205 -s11206" * > - for each command below, the code returned is ($?) 0... but the > process is still running 🤔 (as the web site). I only test the access of > the DBA service (logging as admin) and I've got no database (at this > time). > > The result of the stop commands: > > 1. > su - -s /bin/bash basexusr1 -c > "/basex-ferme/sites/basex1/basex/bin/basexhttpstop -h11204 -p11205 -s11206" > BaseX 10.7 [HTTP Server] > [main] INFO org.eclipse.jetty.util.log - Logging initialized @1523ms > to org.eclipse.jetty.util.log.Slf4jLog > HTTP Server was stopped (port: 11204). > Server was stopped (port: 11205). > > 2. > su - -s /bin/bash basexusr1 -c > "/basex-ferme/sites/basex1/basex/bin/basexhttp stop -h11204 -p11205 -s11206" > BaseX 10.7 [HTTP Server] > [main] INFO org.eclipse.jetty.util.log - Logging initialized @1441ms > to org.eclipse.jetty.util.log.Slf4jLog > HTTP Server was stopped (port: 11204). > Server was stopped (port: 11205). > > 3. > su - -s /bin/bash basexusr1 -c > "/basex-ferme/sites/basex1/basex/bin/basexhttp stop -s11206" > BaseX 10.7 [HTTP Server]: 11205). > [main] INFO org.eclipse.jetty.util.log - Logging initialized @1819ms > to org.eclipse.jetty.util.log.Slf4jLog > HTTP Server was stopped (port: 8080). > Server was stopped (port: 1984). > > 4. > su - -s /bin/bash basexusr1 -c > "/basex-ferme/sites/basex1/basex/bin/basexhttp stop -h11204 -s11206" > BaseX 10.7 [HTTP Server] > [main] INFO org.eclipse.jetty.util.log - Logging initialized @1366ms > to org.eclipse.jetty.util.log.Slf4jLog > HTTP Server was stopped (port: 11204). > Server was stopped (port: 1984). > > 5. > su - -s /bin/bash basexusr1 -c "/basex-ferme/sites/basex1/basex/bin/basexhttp > stop -p11205 -s11206" > BaseX 10.7 [HTTP Server] > [main] INFO org.eclipse.jetty.util.log - Logging initialized @1006ms > to org.eclipse.jetty.util.log.Slf4jLog > HTTP Server was stopped (port: 8080). > Server was stopped (port: 11205). > > > ... and there is no track of the stop request in the log file (but there > are the tracks of the admin access). The only solution I have found is to > kill the process. That's my plan B, but I hope there is another cleaner > solution 🤞😎 > > Has anyone a suggestion to resolve my problem?... and sorry for the > complexity of the context 😓 > > Greetings > Pierre-Yves > ------------------------------ > *Pierre-Yves Jallud* > *Pôle Humanité Numériques / Ingénieur en ingénierie logicielle* > > ------------------------------ > IHRIM - UMR 5317 <http://ihrim.ens-lyon.fr> > CNRS <https://www.cnrs.fr> > ENS de Lyon <http://www.ens-lyon.fr> > 15 Parvis René Descartes - BP7000 - 69342 Lyon CEDEX 07 > +33 (0)4 37 37 63 83 - pierre-yves.jallud at ens-lyon.fr > ------------------------------ >
Written for BaseX 10.7. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery