Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. FATAL: the database system is starting up

FATAL: the database system is starting up

Scheduled Pinned Locked Moved Support
4 Posts 2 Posters 17.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K
    K
    kiki
    wrote on last edited by
    #1
    14-Mar-2017 21:04:11.465] Log file opened
    [14-Mar-2017 21:04:11.884] [INFO ] Platform subagent "/usr/lib/x86_64-linux-gnu/netxms/linux.nsm" successfully loaded
    [14-Mar-2017 21:04:12.362] [INFO ] Database driver "pgsql.ddr" loaded and initialized successfully
    [14-Mar-2017 21:04:37.534] [ERROR] Unable to establish connection with database (FATAL:  the database system is starting up
    FATAL:  the database system is starting up)
    

    Whenever the computer restarts uncleanly I keep getting the above error and netxms doesn't run. Have to start netxsms manually through sudo netxmsd -d

    1 Reply Last reply
    0
    • T
      T
      twenrich
      wrote on last edited by
      #2

      kiki,

      obviously the DB startup lasts a little longer than usual when recovering from the unclean shutdown.

      I would try to sleep() for a minute or two in the netxmsd startup file (maybe in /etc/init.d/netxmsd).

      Kind regards,
      Thomas

      1 Reply Last reply
      0
      • K
        K
        kiki
        wrote on last edited by
        #3

        Yes. That must be the problem. This is what I have in the start up script.

        # Description:
        ### END INIT INFO
        #######################################
        #
        # NetXMS server startup script
        # For Ubuntu Linux
        #
        # Written by Dmitry Chernyshov
        # [email protected]
        #
        #######################################
        
        NETXMS_BINDIR="~BINDIR~"
        NETXMS_LIBDIR="~LIBDIR~"
        
        NAME=netxmsd
        DAEMON=$NETXMS_BINDIR/netxmsd
        PIDFILE=/var/run/netxmsd.pid
        
        test -x $DAEMON || exit 5
        
        
        . /lib/lsb/init-functions
        case "$1" in
         start)
                # start daemon
                log_daemon_msg "Starting NetXMS server" "netxmsd"
                start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- -p $PIDFILE -d
                log_end_msg $?
                ;;
         stop)
                log_daemon_msg "Stopping NetXMS server" "netxmsd"
                start-stop-daemon --stop --quiet --pidfile $PIDFILE
                log_end_msg $?
                ;;
         restart)
                $0 stop && sleep 2 && $0 start
                ;;
        esac
        

        What line should I modify to make the netxms launch after 5 minutes?

        1 Reply Last reply
        0
        • T
          T
          twenrich
          wrote on last edited by
          #4

          insert a line below the "# start daemon" comment:

              sleep 300 # wait 5 minutes
          

          You might want to read a little about shell programming ....

          Kind regards,
          Thomas

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          Powered by NodeBB Contributors
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups