5

Ubuntu 16.04 LTS で OrientDB をデーモン (起動時に有効) として実行しようとしています。問題は、systemd が開始を指示した直後に停止を呼び出しているように見えることです。このsystemdサービスファイルは、OrientDBのドキュメントで推奨されているとおりです。

[Unit]
Description=OrientDB Server
After=network.target
After=syslog.target

[Install]
WantedBy=multi-user.target

[Service]
Type=forking
ExecStart=$ORIENTDB_HOME/bin/orientdb.sh start
ExecStop=$ORIENTDB_HOME/bin/orientdb.sh stop
ExecStatus=$ORIENTDB_HOME/bin/orientdb.sh status

orientdb.log:

           .                                          
          .`        `                                 
          ,      `:.                                  
         `,`    ,:`                                   
         .,.   :,,                                    
         .,,  ,,,                                     
    .    .,.:::::  ````                                 :::::::::     :::::::::   
    ,`   .::,,,,::.,,,,,,`;;                      .:    ::::::::::    :::    :::  
    `,.  ::,,,,,,,:.,,.`  `                       .:    :::      :::  :::     ::: 
     ,,:,:,,,,,,,,::.   `        `         ``     .:    :::      :::  :::     ::: 
      ,,:.,,,,,,,,,: `::, ,,   ::,::`   : :,::`  ::::   :::      :::  :::    :::  
       ,:,,,,,,,,,,::,:   ,,  :.    :   ::    :   .:    :::      :::  :::::::     
        :,,,,,,,,,,:,::   ,,  :      :  :     :   .:    :::      :::  :::::::::   
  `     :,,,,,,,,,,:,::,  ,, .::::::::  :     :   .:    :::      :::  :::     ::: 
  `,...,,:,,,,,,,,,: .:,. ,, ,,         :     :   .:    :::      :::  :::     ::: 
    .,,,,::,,,,,,,:  `: , ,,  :     `   :     :   .:    :::      :::  :::     ::: 
      ...,::,,,,::.. `:  .,,  :,    :   :     :   .:    :::::::::::   :::     ::: 
           ,::::,,,. `:   ,,   :::::    :     :   .:    :::::::::     ::::::::::  
           ,,:` `,,.                                  
          ,,,    .,`                                  
         ,,.     `,                                          GRAPH DATABASE  
       ``        `.                                                          
                 ``                                          orientdb.com
                 `                                    
pid file detected, killing process

シスログ:

Jul 28 18:56:34 ubuntu systemd[1]: Starting OrientDB Server...
Jul 28 18:56:34 ubuntu orientdb.sh[17487]: Starting OrientDB server daemon...
Jul 28 18:56:34 ubuntu systemd[1]: Created slice User Slice of orientdb.
Jul 28 18:56:34 ubuntu systemd[1]: Starting User Manager for UID 999...
Jul 28 18:56:34 ubuntu systemd[1]: Started Session c5 of user orientdb.
Jul 28 18:56:34 ubuntu systemd[17497]: Reached target Timers.
Jul 28 18:56:34 ubuntu systemd[17497]: Reached target Paths.
Jul 28 18:56:34 ubuntu systemd[17497]: Reached target Sockets.
Jul 28 18:56:34 ubuntu systemd[17497]: Reached target Basic System.
Jul 28 18:56:34 ubuntu systemd[17497]: Reached target Default.
Jul 28 18:56:34 ubuntu systemd[17497]: Startup finished in 23ms.
Jul 28 18:56:34 ubuntu systemd[1]: Started User Manager for UID 999.
Jul 28 18:56:34 ubuntu orientdb.sh[17508]: Stopping OrientDB server daemon...
Jul 28 18:56:34 ubuntu systemd[1]: Started Session c6 of user orientdb.
Jul 28 18:56:34 ubuntu systemd[1]: Started OrientDB Server.
Jul 28 18:56:34 ubuntu systemd[1]: Stopping User Manager for UID 999...
Jul 28 18:56:34 ubuntu systemd[17497]: Reached target Shutdown.
Jul 28 18:56:34 ubuntu systemd[17497]: Starting Exit the Session...
Jul 28 18:56:34 ubuntu systemd[17497]: Stopped target Default.
Jul 28 18:56:34 ubuntu systemd[17497]: Stopped target Basic System.
Jul 28 18:56:34 ubuntu systemd[17497]: Stopped target Timers.
Jul 28 18:56:34 ubuntu systemd[17497]: Stopped target Paths.
Jul 28 18:56:34 ubuntu systemd[17497]: Stopped target Sockets.
Jul 28 18:56:34 ubuntu systemd[17497]: Received SIGRTMIN+24 from PID 17536 (kill).
Jul 28 18:56:34 ubuntu systemd[1]: Stopped User Manager for UID 999.
Jul 28 18:56:34 ubuntu systemd[1]: Removed slice User Slice of orientdb.

何か案は?

4

4 に答える 4

0

カスタムの init スクリプト ( orientdb.sh server.shshutdown.sh ) を systemd サービス ユニットにラップしている限り、奇妙でデバッグが困難な問題が発生します。

代わりに、これらのスクリプトを読み、OrientDB を起動する方法を理解し、サービス ユニットで必要なものだけを再現する必要があります。

于 2016-08-08T00:05:52.570 に答える
0

OpenSuse Leap 42.1 と OrientDB 2.2.7 でも同じ問題がありました。ロベルトの答えはそれを解決しました。GitHub の問題を参照してください。

于 2016-08-18T17:10:06.430 に答える
0

サーバーを実行してウィンドウを閉じると、サーバーが閉じられます。NOHUP (server.sh) で使用し、ウィンドウを閉じても引き続き実行されます。

私は同じ問題を抱えていました、頑張ってください

于 2016-08-16T08:55:53.750 に答える