THIS KNOWLEDGE BASE HAS BEEN ARCHIVED AND IS NO LONGER BEING UPDATED
Please visit library.nagios.com/docs for the latest and most up-to-date documentation.
Home » Categories » Products » Nagios Log Server » Troubleshooting » Common Problems

Waiting for Database Startup

Description


Nagios Log Server is a useful way to search and store large amounts of data however the start up process is resource intensive and may take some time to complete.  If your instance of Log Server presents the message "Waiting for Database Startup" for more than a few minutes you may want to investigate the problem further.


First Verify The Process Is Running

First you will want to confirm the elasticsearch (2024R1) or opensearch (2024R2+) process is running as expected.  Login to your Nagios Log Server instance via the console or SSH and run the following command as root:

 

Log Server 2024R1

systemctl status elasticsearch

You should see output similar to the block below:



● elasticsearch.service - LSB: This service manages the elasticsearch daemon
     Loaded: loaded (/etc/rc.d/init.d/elasticsearch; generated)
     Active: active (running) since Tue 2025-01-28 14:28:34 CST; 20h ago
       Docs: man:systemd-sysv-generator(8)
    Process: 967 ExecStart=/etc/rc.d/init.d/elasticsearch start (code=exited, status=0/SUCCESS)
      Tasks: 59 (limit: 10883)
     Memory: 1.1G
        CPU: 26min 7.966s
     CGroup: /system.slice/elasticsearch.service
             └─1180 /bin/java -Xms870m -Xmx870m -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -


Log Server 2024R2+

systemctl status opensearch

You should see output similar to the block below: 



● opensearch.service - OpenSearch
     Loaded: loaded (/usr/lib/systemd/system/opensearch.service; enabled; preset: disabled)
     Active: active (running) since Fri 2025-08-22 17:12:48 CDT; 4 days ago
       Docs: https://www.elastic.co
    Process: 1981 ExecStartPost=php /var/www/html/nagioslogserver/www/index.php cli CLI_SynchronizeOpensearchConfiguration run>
   Main PID: 1023 (java)
      Tasks: 126 (limit: 48676)
     Memory: 4.2G (peak: 5.3G)
        CPU: 3h 46min 30.692s
     CGroup: /system.slice/opensearch.service
             └─1023 /usr/local/nagioslogserver/opensearch/jdk/bin/java -Xshare:auto -Dopensearch.networkaddress.cache.ttl=60 ->



The "Active:" line in the output should read "active (running)" as in the example above.  If it does not read active try restarting the process by running the following command as root on the command line of your server:   

Log Server 2024R1

 systemctl restart elasticsearch

Log Server 2024R2+

 systemctl restart opensearch 

Then after a few minutes check again to see if the process is in a running state.  If it is not you will want to contact the Nagios Support team to help investigate the problem.

Nagios Support Resources

If The Process Is Running:

If the process is in a running state and the "Waiting for Database Startup" is still present it may indicate that you have a system that is under resourced.  You will want to use the tools and documentation for your operating system to make a determination as to where the restriction maybe however you may want to try the following if possible:

1) Increase the amount of RAM available to the system up to 64Gb  
2) Increase the number of processors available to the system ( Minimum 4 )
3) Ensure that your your iowait times are low ( below 5% ).

If you are using a virtual system you will also want to make sure your hypervisor isn't over provisioned and has enough resources for all virtual systems at peak times.

Finally if you are at your resource limits for your current host or cluster you might want to consider adding another node to your Log Server cluster.

Adding Additional Instances To A Nagios Log Server Cluster - 2024R1

Adding Additional Instances To A Nagios Log Server Cluster - 2024R2+

Final Thoughts

Additional considerations and/or tuning recommendations may be available on our community forums.  We encourage and value community contributions/feedback that help us to make our products better.   

https://support.nagios.com/forum/



Special Offer For Knowledgebase Visitors! Get a huge discount on Nagios Log Server by clicking below.

Get 60% Off Nagios Log Server!

Did you know? Nagios provides complete monitoring of: Windows, Linux, UNIX, Servers, Websites, SNMP, DHCP, DNS, Email, Storage, Files, Apache, IIS, EC2, and more!

1 (1)
Article Rating (1 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Nagios Log Server - Newline Character Added When Adding A Filter To A Search
Viewed 6181 times since Wed, Apr 27, 2016
Nagios Log Server - Logs Not Searchable or Not Coming In
Viewed 15483 times since Tue, Jan 27, 2015
Nagios Log Server - Waiting For Database Startup
Viewed 8480 times since Wed, Oct 12, 2016
Nagios Log Server - Logstash process dying
Viewed 7079 times since Mon, Apr 10, 2017
Nagios Log Server - Understanding and Troubleshooting Yellow Cluster Health
Viewed 14691 times since Mon, Feb 15, 2016
Nagios Log Server - Understanding and Troubleshooting Red Cluster Health
Viewed 10920 times since Mon, Apr 6, 2015
Nagios Log Server - Administration Page Fails To Display
Viewed 8411 times since Thu, Jan 21, 2016
Nagios Log Server - Troubleshooting Backups
Viewed 7111 times since Fri, Apr 15, 2016
Nagios Log Server - rsyslog and JSON Formatted Log Files
Viewed 5955 times since Thu, Mar 2, 2017
Web Browser Reports 330 Error Content Encoding
Viewed 9396 times since Tue, Mar 7, 2017