[Bug en cours] restart obligatoire après reboot du serveur

Bonjour à tous,

je suis obligé de refaire un restart de bm-loc
25 /etc/init.d/bm-core restart
26 /etc/init.d/bm-eas restart
27 /etc/init.d/bm-hps restart
28 /etc/init.d/bm-lmtpd restart
29 /etc/init.d/bm-locator restart
après un reboot du serveur …

En soi, rien de bien grave je pense, d’autant que cela ne sera le cas qu’en cas de panne de courant …
Quelqu’un aurait il une explication ?
De mon coté, j’analyse plus profondément le prb

Crdt
Poustiquet
Version 1.0.8 - 1.0.8076 sous Debian 6

root@securemail:/var/log/bm-locator# tail -f locator.log
at org.mortbay.jetty.Server.handle(Server.java:326) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:924) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:680) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) [org.mortbay.jetty.util_6.1.23.v201012071420.jar:na]
2013-03-09 18:59:22,498 n.b.l.HostLocationServlet ERROR - Could not find bm/core for admin0@global.virt
2013-03-09 18:59:53,679 n.b.l.i.LocatorDbHelper ERROR - net/bluemind/pool/BMPoolActivator
java.lang.NoClassDefFoundError: net/bluemind/pool/BMPoolActivator
at net.bluemind.locator.impl.LocatorDbHelper.findAssignedHosts(LocatorDbHelper.java:95) ~[net.bluemind.locator_1.0.0.b8076.jar:na]
at net.bluemind.locator.HostLocationServlet.doGet(HostLocationServlet.java:77) [net.bluemind.locator_1.0.0.b8076.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [javax.servlet_2.5.0.v201103041518.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [javax.servlet_2.5.0.v201103041518.jar:na]
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180) [org.eclipse.equinox.http.registry_1.1.100.v20110502.jar:na]
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61) [org.eclipse.equinox.http.servlet_1.1.200.v20110502.jar:na]
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:126) [org.eclipse.equinox.http.servlet_1.1.200.v20110502.jar:na]
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68) [org.eclipse.equinox.http.servlet_1.1.200.v20110502.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [javax.servlet_2.5.0.v201103041518.jar:na]
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:317) [org.eclipse.equinox.http.jetty_2.0.100.v20110502.jar:na]
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.Server.handle(Server.java:326) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:924) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:680) [org.mortbay.jetty.server_6.1.23.v201012071420.jar:na]
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) [org.mortbay.jetty.util_6.1.23.v201012071420.jar:na]
2013-03-09 18:59:53,679 n.b.l.HostLocationServlet ERROR - Could not find bm/mq for admin0@global.virt

restart a la main

2013-03-09 19:04:22,865 n.b.l.LocatorService INFO - Starting BM Locator…
2013-03-09 19:04:22,872 o.m.log INFO - Logging to Logger[org.mortbay.log] via org.mortbay.log.Slf4jLog
2013-03-09 19:04:22,906 o.m.log INFO - jetty-6.1.x
2013-03-09 19:04:23,003 o.m.log INFO - Started SslSocketConnector@0.0.0.0:8084
2013-03-09 19:04:23,016 n.b.l.LocatorService INFO - Accepting SSL queries on port 8084
2013-03-09 19:05:29,872 n.b.p.BMPoolActivator INFO - Starting BM connection pool…
2013-03-09 19:05:29,874 n.b.p.BMPoolActivator INFO - dbtype from bm.ini is PGSQL
2013-03-09 19:05:29,876 n.b.u.RunnableExtensionLoader INFO - net.bluemind.jdbc.oracle.provider.OracleConnectionFactory loaded.
2013-03-09 19:05:29,876 n.b.u.RunnableExtensionLoader INFO - net.bluemind.jdbc.pgsql.provider.PgSQLConnectionFactory loaded.
2013-03-09 19:05:29,877 n.b.u.RunnableExtensionLoader INFO - Loaded 2 implementors of net.bluemind.pool.jdbcdriver
2013-03-09 19:05:29,907 n.b.p.x.PoolActivator INFO - Pool bundle started.
2013-03-09 19:05:29,958 n.b.p.x.i.DataSource INFO - Starting pool…(jdbc:postgresql://10.0.1.10/bj)
2013-03-09 19:05:29,959 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:29,982 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:29,982 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:29,985 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:29,985 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:29,987 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:29,987 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:29,989 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:29,990 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:29,991 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:29,992 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:29,994 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:29,994 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:29,996 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:29,996 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:29,998 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:29,998 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:30,000 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:30,000 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:30,002 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:30,002 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:30,003 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:30,004 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:30,006 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:30,006 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:30,008 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:30,008 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:30,010 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:30,010 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:30,012 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:30,012 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:30,015 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:30,015 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:30,017 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:30,017 n.b.p.x.i.ConnectionPool INFO - Creating Physical connection…
2013-03-09 19:05:30,020 n.b.p.x.i.ConnectionPool INFO - Physical connection established.
2013-03-09 19:05:30,020 n.b.p.x.i.ConnectionPool INFO - Pool State after start is 0 used out of 18 connections
2013-03-09 19:05:30,020 n.b.p.x.i.PingThread INFO - created with 18 JDBC connections.
2013-03-09 19:05:30,334 n.b.l.HostLocationServlet INFO - query: /location/host/bm/core/yoann.simon@prytane.fr => returned 1 IP(s) address(es) 10.0.1.10 ]

Dans quel ordre sont démarrés les services aux boot de votre machine ?

# ls -l /etc/rc2.d/*bm-*

Voila l’ordre … merci d’avance

root@securemail:/etc/init.d# ls -l /etc/rc2.d/bm-
lrwxrwxrwx 1 root root 19 7 mars 21:43 /etc/rc2.d/S20bm-tomcat → …/init.d/bm-tomcat
lrwxrwxrwx 1 root root 17 7 mars 21:43 /etc/rc2.d/S22bm-core → …/init.d/bm-core
lrwxrwxrwx 1 root root 16 7 mars 21:43 /etc/rc2.d/S22bm-eas → …/init.d/bm-eas
lrwxrwxrwx 1 root root 16 7 mars 21:44 /etc/rc2.d/S22bm-hps → …/init.d/bm-hps
lrwxrwxrwx 1 root root 18 7 mars 21:43 /etc/rc2.d/S22bm-lmtpd → …/init.d/bm-lmtpd
lrwxrwxrwx 1 root root 20 7 mars 21:43 /etc/rc2.d/S22bm-locator → …/init.d/bm-locator
lrwxrwxrwx 1 root root 15 7 mars 21:44 /etc/rc2.d/S22bm-mq → …/init.d/bm-mq
lrwxrwxrwx 1 root root 17 7 mars 21:44 /etc/rc2.d/S22bm-node → …/init.d/bm-node
root@securemail:/etc/init.d#

C’est le démarrage de locator sur votre machine qui se fait trop rapidement, du coups le core n’est pas encore démarré.

Pouvez-vous ouvrir un bug dans notre forge. Il nous faut affiner la phase de démarrage, dans certains cas tout ne se passe pas correctement.

Ok j’ouvre un bug

Pour info, c’est une VM Debian chiffrée avec DMcrypt sur un serveur Proxmox

Dans quel ordre impératif les modules doivent il démarrer ?
Au pire, je vais faire un seul script de démarrage …

Crdt
Poustiquet

L’ordre idéal est:
[list=1]
]postgres/]
]bm-mq/]
]bm-locator/]
]bm-core/]
]le reste/]
[/list]

Le script unique est une piste, mais sûrement pas suffisante, nos scripts rendent la main dès que le process java est lancé, ce qui ne signifie pas forcément qu’il est prêt à répondre.

Bug ouvert

https://forge.blue-mind.net/redmine/issues/4057

Oui , j’ai vu les process Java …

pour analyse, voici un résultat de mon script ‘brut’ …
Par d’erreur dans les logs, du moins je cherche encore … Si vous avez un log et un événement à chercher précisement, je suis preneur …

root@securemail:/etc/init.d# ./restart_bm_all.ksk
Stopping Postfix Mail Transport Agent: postfix.
Waiting for BM Tomcat shutdown…
Waiting for Bmnode Server shutdown.
Waiting for Blue Mind lmtpd server shutdown…
Waiting for Bm-Hps Server shutdown…
Waiting for Blue Mind EAS Server shutdown…
Waiting for Blue Mind core Server shutdown…
Waiting for Blue Mind locator Server shutdown…
Waiting for Bm-Mq Server shutdown…
Stopping PostgreSQL 8.4 database server: main.
sleep 60
Starting PostgreSQL 8.4 database server: main.
Bm-Mq Server started: 24519
BM Locator Server started: 24526
Blue Mind core Server started: 24532
Blue Mind EAS Server started: 24541
Bm-Hps Server started: 24557
Blue Mind lmtpd server started: 24564
Bmnode Server started: 24601
Using CATALINA_BASE: /usr/share/tomcat
Using CATALINA_HOME: /usr/share/tomcat
Using CATALINA_TMPDIR: /tmp
Using JRE_HOME: /usr/lib/jvm/java-1.6.0-openjdk
Starting Postfix Mail Transport Agent: postfix.
root@securemail:/etc/init.d#

root@securemail:/etc/init.d# cat restart_bm_all.ksk
#!/bin/ksh
#iPoustiquet (Yoann SIMON : bluemind@zozma.f )
#script brut pour analyse du bug
#11/03/2013

/etc/init.d/postfix stop
/etc/init.d/bm-tomcat stop
/etc/init.d/bm-node stop
/etc/init.d/bm-lmtpd stop
/etc/init.d/bm-hps stop
/etc/init.d/bm-eas stop
/etc/init.d/bm-core stop
/etc/init.d/bm-locator stop
/etc/init.d/bm-mq stop
/etc/init.d/postgresql stop

echo “sleep 60”
sleep 60

/etc/init.d/postgresql start
/etc/init.d/bm-mq start
/etc/init.d/bm-locator start
/etc/init.d/bm-core start
/etc/init.d/bm-eas start
/etc/init.d/bm-hps start
/etc/init.d/bm-lmtpd start
/etc/init.d/bm-node start
/etc/init.d/bm-tomcat start
/etc/init.d/postfix start
root@securemail:/etc/init.d#

S20bm-tomcat
dans /etc/rc3.d …

Est ce normal ?

Crdt
Poustiquet

root@securemail:/etc/rc3.d# ls bm-
S20bm-tomcat S22bm-core S22bm-eas S22bm-hps S22bm-lmtpd S22bm-locator S22bm-mq S22bm-node
root@securemail:/etc/rc3.d#

Pas gênant en tous cas, même si il devrait démarrer après le core.