Zabbix cannot connect to the database unable to select configuration

Last UpdatedMarch 5, 2024

by

Anthony Gallo Image

Oct 5, 2017 · Send zabbix_server configuration file for this setup. Type docker exec −it container ID zabbix_server −R config_cache_reload. Thanks in Advance. You have not permissions on zabbix user to database, please go to database and do this: GRANT ALL PRIVILEGES ON nameofdatabase. Import the initial schema and data (assuming you are in the root directory of Zabbix sources). 4 server is working correctly (MSSQL). 2, but after I start the Zabbix Server service the database upgrade process starts and it fails at 48% every time. Oct 1, 2013 · I installed zabbix 4. We can see now that the command was sent successfully. Unfortunalety it is not documented as well as OracleSQL. I’m using zabbix server version 4. You need to create a new MySQL database and populate it with some basic information in order to make it suitable for Zabbix. * to zabbix@localhost; This next step is now required since August 2022. From "Zabbix Server/MySQL Router" I can connect to the dababase from the shell using mysql client both directly or using the Router "127. 1 But zabbix refuses to connect printing out (192. 012 cannot use database "zabbix": its "users" table is empty (is this the Mar 20, 2023 · I have got with this: Unable to determine current Zabbix database version: the table &quot;dbversion&quot; was not found. The following shell command will create the database zabbix (last parameter) with the previously created user as the owner ( -O zabbix ). The zabbix-server agent isn't start yet (the file log says that the database "users" is empty so I guess I have to finish the installation before the service start). conf has been changed after updating of zabbix. Click on the parameter to see the full details. But log file says that it can not connect to DB. 1 and before. 02-12-2008, 03:12. DBUser=zabbix ### Option: DBPassword # Database password. service failed because the service did not take the steps required by its unit configuration. Set DBTLSCAFile - specify TLS certificate authority file. x]:10051]: [4] Interrupted system call] I have opened the connect from the server to allow ALL traffic from the proxy so I get a reply from the Server when I ping now, something else is up will dig deeper Mar 9, 2016 · For a reason Zabbix cannot communicate with MySQL Usually something like this happend when you still have some zabbix server processes running and listening on 10051/tcp. before or while processing the request. Unable to determine current Zabbix database Nov 23, 2022 · zabbix_server. To start viewing messages, select the forum that you want to visit from the selection below. I'm facing some errors. Jan 9, 2022 · Greetings Zabbix community, I am new here, as well as somewhat new to Linux. grant all privileges on zabbix. Mar 16, 2023 · Hello Guys, I've set Zabbix HA with 2 nodes and MySQL InnoDB Cluster with the Router in the same servers with Zabbix-Server. 8. 0 and the database is using postgres 9. 624 database is down: reconnecting in 10 seconds 706:20230618:061415. Installation is performed according to the instructions from the official website. 7 Web interface installation. " instead of login form #985. 0 and in mysql created the zabbix database as well. The apache2 and zabbix-agent services are started. conf)の内容と見比べてみたところ、現在の認証設定でIdent認証となっているのはIPv6だけなので、zabbix初回セットアップのlocalhostはIPv6で接続しているという被疑が浮上しました。 Unable to select configuration. Incorrect DNS server configuration. Description. 065 \[Z3001\] connection to database ‘zabbix’ failed: \[2002\] Can’t connect to local MySQL server th Dec 2, 2017 · 2. Fix the character set and collation on database level: alter database <your DB name> character set utf8mb4 collate utf8mb4_bin; Fixed values: Feb 5, 2015 · I am able to run the following and successfully connect to my database: export PGPASSWORD=zabbix; psql -U zabbix-user -d zabbix-dbname -h db-hostname export PGPASSWORD=zabbix; psql -U zabbix-user -d zabbix-dbname -h 192. Nov 24, 2021 · I have installed Zabbix Server 5. This probably means the server terminated abnormally. # # Mandatory: no # Default: # DBPassword I wrote the password and it works. set global log_bin_trust_function_creators = 1; Quit as usual. Zabbix 5. php"; • 2. I tried to telnet to DB machine and I was OK! telnet 10. Jul 3, 2023 · when installing zabbix on ubuntu server + nginx+ mysql an error occurs when installing the configure db connection step on the web interface. 774 [Z3001] connection to database 'zabbix' failed: [0] server closed the connection unexpectedly. 189. Option, maybe but just maybe you'll be able to compile zabbix from sources, but you also need apache server and mysql database to get it running on openwrt (zabbix doesnt provide packages for it) than you can monitor maybe your router via snmp or possibly zabbix agent from sources installed on it ( in general very low chance to succeed) Feb 23, 2023 · 2613:20230204:181622. If not, you'd have to fix that. DBPassword=yourpassword Then under DB configuration I get Cannot connect to the database. I see at log that zabbix-proxy-mysql_1 and zabbix-proxy-sqlite3_1 are unable to connect to server zabbix-server. Richlv. Jun 12, 2022 · I use: CentOS Stream 8 Apache 2. Upgrading Zabbix may fail if database tables were created with MariaDB 10. Feb 29, 2024 · 29-02-2024, 16:15. noarch. conf: DBName, DBUser, DBPasswords are set. Step 2 — Configuring the MySQL Database for Zabbix. 1. The log file shows: 1265:20140317:053235. Mar 15, 2023 · I also have a problem of access to the MySQL database via terminal, I think of a problem of password but it is impossible to reset it via mysqld_safe --skip-grant-tables If you have any ideas I'm interested. 3921:20230618:061309. Jun 28, 2023 · Further, with US and GB, but now getting Cannot connect to the database. sudo -u postgres createdb -O zabbix -E Unicode -T template0 zabbix. Nov 25, 2008 · Posts: 33. conf) are listed in this section. Jan 11, 2021 · select host from user #查看你使用的用户 如果host列为localhost 则只能本地使用,不能远程登录。. Set DBTLSConnect=verify_full. I can connect to remote server Mar 22, 2022 · A direct connection from sqlplus and the Zabbix server itself is able to connect to the DB with no issues so I imagine it is some issue with the Apache/PHP setup. If it is absent, the Zabbix database upgrade will fail (see also ZBX-19435). I completed the Zabbix setup. Welcome to the MySQL monitor. Sep 8, 2020 · Prepare VMs. I'll revert back to earlier snapshots and make sure I'm not missing steps from the VM's perception of history. sql # stop here if you are creating database for Zabbix proxy sqlplus> @images. 这是由于导入的zabbix的数据有问题 Mar 25, 2019 · Hi, After I successfuly installed OracleSQL driver and monitor some databases it is time to monitor MSSQL database. conf to write the log file here, by the way, assuming zabbix server has been compiled with mysql support, you need to create a mysql user for zabbix and grant him the needed privileges on the Zabbix database. X and my Zabbix Proxy (with an Agent to monitor the status and such) in another machine with the IP 192. * to zabbix@localhost identified by '<password>'; quit; Jun 24, 2020 · zabbix is not connecting to database. example When you successfully click through the Zabbix setup in the web interface, that is the file that gets generated at the end. 1をインストール。. Incorrect database permissions: The user specified in the Zabbix configuration file must have the necessary permissions to access the Zabbix database. Jun 17, 2021 · I am installing Zabbix 5. 114 cannot use database "zabbix": Dec 7, 2018 · If this is your first visit, be sure to check out the FAQ by clicking the link above. # Comment this line if no password is used. Any instruction are apreciated. Oct 18, 2023 · The "Configure DB connection" sounds like the part where you tell the Zabbix front end how to communicate with the database. If this is your first visit, be sure to check out the FAQ by clicking the link above. conf correctly. Apr 20, 2022 · Zabbix installation failed "Unable to select configuration". #vi /etc/hosts. isql -v wms01 <uid> <pwd> This command in linux cmd of Zabbix 4. Greetings. Mar 12, 2024 · The DSN, username and password is set in the macros. 6 and MySql. 26-04-2010, 08:19. You may have to REGISTER before you can post. You then save it to your local machine and FTP it up to your Zabbix server and put it in the proper location. 022 active check configuration update from [118. Here is the snippets from the log files. Check that the user has the correct privileges (such as SELECT, INSERT, UPDATE, DELETE). TO 'zabbix'@'localhost' IDENTIFIED BY'passowrd'; and then: FLUSH PRIVILEGES; May 30, 2023 · [root@srv1 zabbix]# systemctl restart zabbix-server. service Job for zabbix-server. Oct 16, 2019 · Still unable to connect: Unable to connect to the server [x. 2. 017 database is down: reconnecting in 10 zabbix20-web-2. Mar 28, 2022 · Delete the offending rules on the HOST of the Zabbix server container which is NATing its' traffic to the Agents: sudo iptables -t nat -D POSTROUTING 2. Jan 12, 2022 · localhostのIPv6解決を無効化. I installed zabbix 2. Please help me to solve this. I have attached the Screenshots for reference. Nov 23, 2015 · Unable to select "Configure DB Connection" option. Ok, after a deeper investigation I think I found the reason for "Unable to Select Configuration" error, it was because zabbix-server on Node 4 when I restarted it, could not bind to port 10051 according to the logs. The front end can be installed separately from the Zabbix server, so they each have their own separate configuration for talking to the database. You can turn off this feature to get a quicker startup with -A. Try stop zabbix server abd after this "netstat -tapln | grep 10051" and if you will see any zabbix_server or other processes listening on 10051 just kill the. Details Cannot connect to the database. Feb 1, 2020 · 1. Still unable to connect For a while I couldn't figure it out, because everything seemed to be configured correctly: from DNS to routing, firewall rules and zabbix Sep 5, 2016 · 103548:20160902:065121. sql. db is up and able to connect to db/ schema, but after starting zabbix-server in logs could see it is not able to connect to the database. Upgrade with MariaDB 10. ※mariadbを使用してインストールする際は CentOS7にZabbix2. Sep 13, 2016 · +1 to the answer about zabbix-postgresql above In my case zabbix-server-pgsql was installed along with zabbix-server-mysql. but the database connection details mentioned in zabbix_server. Everything works fine now. I am using Zabbix 6. インストール後 Apr 26, 2016 · Acredito que o problema seja o seguinte, como está usando o SQLite3 você deve colocar o path completo para o "banco" no arquivo de configuração do proxy (zabbix_proxy. AlertScriptsPath. Cheers!! or Kindly Guide me, how to fix this. ”. Incorrect server IP / DNS in "zabbix. Create Zabbix database and user on MySQL by the following commands, where <root_password> shall be replaced with the actual root password (e. AllowRoot. 114]:10051]: [113] No route to host) I suspect the problem is that my Zabbix server is a local VM which only has a private IP address. This is using zabbix_proxy 2. Press “Next step” button when done. 04. 13. Server/proxy make a TLS connection to the database after verifying the database certificate and the database host identity. 4, I've tried also with odbc version 18, and also Aug 1, 2020 · EDIT - Just noticed the Apache log files have the same 640 octal as the Zabbix logs, but I can open the Apache logs, go figure. Aug 29, 2021 · ここで、postgresql認証ファイル(pg_hba. 017 cannot set MySQL character set to "utf8". Anyone else experiencing the same issues or know why the upgrade is As we see, the character set here is not 'utf8mb4' and collation is not 'utf8mb4_bin', so we need to fix them. php: Configure DB connection ==> Cannot connect to the database. 0-latest. Improve this answer. #vi /etc/hostname. Overview. Reload to refresh your session. user where user='zabbix'; Check privileges granted to a 'zabbix; user account from a localhost: Code: SHOW GRANTS FOR 'zabbix'@'localhost'; You can attach part of zabbix_server. I zcat the database I create using the schema in the Zabbix-Proxy-Server folder. service: Active. I can connect to the Postgres server from the Zabbix server host just fine using psql: psql -h 192. [/LIST] Tags: database , postgresql , zabbix dimir Sep 11, 2017 · Code: yum install mariadb-server. The parameters are listed without additional information. *. conf file and been able to connect via cli to the dB. in my case it was Zabbix server. Copy the container ID. So at this point I dont understand where's the problem, looks like the connection is fine but Zabbix somehow cant connect. Mar 27, 2021 · You signed in with another tab or window. The parameters supported by the Zabbix server configuration file (zabbix_server. 569 cannot initialize database: cannot open database. zabbix-agent has an environment variable named ZBX_HOSTNAME which should be the name of the hostname in the zabbix web hosts tab. Zabbix検証機を立てる為、CentOS7. Dec 21, 2019 · In short, ‘Zabbix cannot connect to the database’ error may occur due to some reasons like wrong database details or when there is any mismatch in configuration file values, etc. I have tried many time, however, I could not fix this. Hi guys, we are migrating a zabbix server. I pass prerequisites. 1 being the correctly resolved IP Address) : As the title says I'm having some issues with the communication between my Zabbix Server and Zabbix Proxy. Y. 016 [Z3001] connection to database 'zabbixdb' failed: [1045] Access denied for user 'zabbixusr'@'localhost' (using password: YES) 7219:20161114:072713. • Connection refused Apr 30, 2015 · ことの始め. Apr 30, 2013 · -rwxr-xr-x. Check if the user exists: Code: SELECT User, Host FROM mysql. After uninstalling zabbix-server-pgsql zabbix-server could be sucessfully started and connecting to MySQL DB. 29 and my linux version is Ubuntu 20. I followed the instructions on the Zabbix website. Thanks. 11 Ports: 443/tcp 3306/tcp 10050/tcp 10051/tcp 80/tcp MariaDB database character/collation: Since the database is called Jun 30, 2020 · Before you can use Zabbix, you have to set up a database to hold the data that the Zabbix server will collect from its agents. cannot use database "zabbix": its "users" table is empty. 5 (revision Now prepare the database: shell> cd database/oracle shell> sqlplus zabbix/password@host/ORCL sqlplus> @schema. Update the host files on both VMs. 0. php ' to ' www-data ' in ' /etc/zabbix ' and it ends the Setup process. #3. You signed out in another tab or window. 4. Sep 15, 2017 · Database Error: Unable to select configuration. i'm using postgres. update user set host = ‘%’ where user = ‘zabbix’;. Create a database. 基本的に「localhost」という名称で名前解決を行うとIPv6、IPv4の順で名前解決します。そのためIPv6が使えないとDBに接続できなくなるわけです。 Aug 10, 2023 · I am trying to use Zabbix to monitor my server, but I get this log error: 20472:20230810:072630. Zabbix version is 6. If you have installed it, it must be enabled for autostart and started and. Code: systemctl enable mariadb. Oct 15, 2020 · Is there any solutions, why the graph on my zabbix always delayed (about 1-2 hours) and this always happens at night. Sep 29, 2021 · 4. 168. 4 ? it has many great new features and improvements over 3. Hello together, i still upgraded my Zabbix from 4. Please set the initialization parameter CURSOR_SHARING=FORCE for best performance. In /zabbix_server. 0 with an Oracle database and a full Oracle client installed on the server using the tnsnames file. I open web page. Aug 22, 2021 · Cannot connect to the database. In large installations, the web front end may be installed on a completely separate server from the zabbix-server package(s). , shell> mysql -uroot -p12345) and <password> with new password for zabbix user on the database (including apostrophes: identified by '67890';): Feb 9, 2023 · Please create database manually, and set the configuration parameters for connection to this database. when viewing logs we see - [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES) can any one advise I've copied the details from the sever. 15. Stop Zabbix. Closed 7:20220718:214905. I have newly installed Zabbix on my PC, unfortunately I can't connect to the database and I really don't know where the problem may be. Error: Cannot connect to the database. 4 OS: Debian 9 Database MySQL (Using terminal on Debian uses MariaDB) I've followed all of the Mar 14, 2016 · Like to try Zabbix on my laptop, but get the message from the frontend: Unable to select configuration. Apparently, the developers made a mistake somewhere. 0 LTS on Debian 10 Buster with Postgresql Database. Packages installation and configuration worked fine, the zabbix DB schema is OK. Sep 14, 2019 · Find Zabbix server container zabbix-server-mysql:alpine-4. This can be fixed by changing the row format to dynamic (see also ZBX-17690). Server/proxy make a TLS connection to the database after verifying the database certificate. (the detail in the image) Thank you, Paul, You have to make sure that MariaDB server is running and that you've created the 'zabbix' database and 'zabbix' user and set up the initial schema before you can have either the 'zabbix-server' process or the Zabbix web front-end connect to the database. log file instead, usually problems related to zabbix server start is listed there P. Jul 30, 2022 · 03-08-2022, 07:15. Everything looks okay on the database side I have 166 tables in the public schema. conf). systemctl restart and enable fot zabbix-server zabbix-agent apache2 already runned. May 7, 2022 · Hello, I want to upgrade my Zabbix Server version from 6. To configure a host in Zabbix frontend, do the following: Go to: Data collection → Hosts or Monitoring → Hosts. Zabbix frontend is written in PHP, so to run it a PHP supported webserver is needed. 1. 0 LTS to 5. we have installed the zabbix 5. The following is a description of the topology: device/agent -> zabbix proxy (2 poller/zabbix proxy) -> zabbix server -> database server. Share. Parameter. When I run: service zabbix_server start. systemctl status mysql. Details * Unable to select configuration :20180629:213009. Database server configuration: Sometimes, the database server configuration may prevent Zabbix from Creating initial database. You switched accounts on another tab or window. 4 from packages and setup a PostgreSQL database with the schema and data from the package SQL files. This section provides step-by-step instructions for installing Zabbix web interface. You can also use the Clone button in the configuration form of an existing host to create a new host. 114:10051] started to fail (cannot connect to [[118. 33 3 Nov 2, 2022 · If I try "Database host: <my_ip>" "Host '<my_ip>' is not allowed to connect to this MySQL server" appears. Thanks in advance! Patxi. g. drop database zabbix; create database zabbix character set utf8 collate utf8_bin; grant all privileges on zabbix. 431 UTC [4035] LOG: database system is ready to accept connections Zabbix Server, I can see that there is database version listed in the logs and also i can see that the table is present. So when I add ZBX_HOSTNAME=Zabbix server to environment variables of my zabbix-agent and depends on it to the zabbix-server everything is good. May 1, 2023 · I can also login at mysql using the user/db that I created: Code: [root@nms zabbix]# sudo -u zabbix mysql -u zabbix --database=zabbix -p. sock (permissions 777, Directory permissions 755) different MySQL users (zabbix@localhost, [email protected] ) and making sure the firewall is not blocking. Name accordingly, for instance: 3. 0 in centOs 7 and configured it to connect to remote mysql. Managed to get everything setup and installed, on the front end I am unable to connect to the server. The text was updated successfully, but these errors were encountered: Jul 14, 2023 · Hello Folks, I'm new to the Zabbix and Linux Platform. Oct 8, 2020 · I created a new zabbix server on Zabbix 5, the sql server and the application are on two separate servers. 2をインストール が非情に勉強になります。. I also viewed the forum, but unfortunately nothing helped me. When I log into the web interface, I have the error: The connection to Zabbix server "localhost" failed. 3. 37 PHP 8. 11 MariaDB Server 10. Today, we saw how our Support Engineers fix this error. 0 Regards, Kaspars Nov 14, 2016 · But unable to start the zabbix server with the below error: 7219:20161114:072713. 6. 149 Starting Zabbix Server. conf. systemctl start maridb. You can do this in the next step. php. 11-1. 141 -U zabbix -d zabbix. May 6, 2024 · No matter how I try to connect to the MySQL server it results in two different screens: I have tried all the variations of connecting to MySQL using the mysql. Make a clean installation of CentOS 8, decide which is for DB and which for Zabbix and edit hostnames of VMs (separate for the database and for the Zabbix installation, in our example). 0 on Ubuntu 20. 569 [Z3002] cannot create database 'zabbix_proxy': [0] unable to open database file 2613:20230204:181622. mysql>. Maschine: Debian 8 mysql apache2 Websetup: mysql: localhost port: 0 database: zabbix user: zabbix password: root While setup I am creating database and user zabbix. Click on Create host to the right (or on the host name to edit an existing host) Enter parameters of the host in the form. 77. sql sqlplus> @data. Thanks again for all your help, Tim. May 21, 2022 · The Zabbix web interface (the "front end") is a separate application from the Zabbix server. Nov 15, 2019 · Hello All, I have tried several times from scratch. You could check whether MySQL listens on that port. I installed and configured the Zabbix Server in one machine with the IP 192. 150 Starting Zabbix Server. 7219:20161114:072713. 4 on a brand new vm under Debian 10 with nginx and postgreSQL 11. answered Dec 2, 2017 at 1:11. flush privileges; 2》解决完全下问题,有出现了“Unable to select configuration . The running line to mysql server is: docker run --name create user zabbix@localhost identified by 'password'; Re grant all privileges of the new Zabbix database to your Zabbix database user. Thanks again for your help. If you go back to the front end and refresh the page, you can see that availability is highlighted with green. インストール後、ごく普通のインストール方法で zabbixをインストール 。. Nov 19, 2020 · I am very new to zabbix and I am trying to get it running on an Azure VM running Ubuntu 18. Server 11110:20201119:144604. Kindly look into that and help me to fix. May 31, 2022 · 1. ZABBIX BUGS AND ISSUES; ZBX-13057; Final Setup URL: Setup. I've followed all instructions to get zabbix installed. sudo iptables -t nat -D DOCKER 2. I run a MySQL database version 8. Now prepare the database: shell> cd database/oracle shell> sqlplus zabbix/password@host/ORCL sqlplus> @schema. 操作如下. Because they are separate applications, each application has a separate configuration file. Here is what I've done so far: Install Zabbix from Package Version 3. Wait a few moments and the Agents should now go "green"- assuming there are no other configuration or firewalling issues. That's separate from how the Zabbix *server* talks to the database. but i did it like 10 times and cant figure why this is happening, here are the commands and the outputs on creating database. Nov 2, 2022 · If I try "Database host: <my_ip>" "Host '<my_ip>' is not allowed to connect to this MySQL server" appears. I was able to get the initial interface up and when "next" is chosen I was able to make to "check for pre-requisties" and after that not able to go to option 3 "Configure DB connection"Any pointers or help will be greatly appreciated. x]:10051 [cannot connect to [[x. I'm a new Zabbix user and I try to install Zabbix 6. I finally can resolve my problem. Unable to select configuration. Apr 13, 2015 · zabbix_proxy - cannot connect [13] permission denied. So, please send above parameters from configuration files. Nessa sessão do arquivoabaixo: . I seen some people solved this same issue by recreating the database and populating the data from scratch. I found out that my DB password was commented out. -----More detail here: Log file permissions Old machine Group - zabbix Owner - zabbix Octal - 640 New machine Group - zabbix [112] Owner - zabbix [108] Octal - 664 Jun 18, 2023 · 2023-06-18 05:44:09. 1 and before, because in those versions the default row format is compact. after that you must be able to open mysql console typing a simple command in console mysql, after that type following comands: Code: Jul 17, 2022 · Unable to select configuration. 4 to 6. Code: 27082:20081201:194349 Listener failed with error: Cannot bind to port 10051 for server [ANY]. The SQL user logins correctly to MSSQL and I manage to connect from the zabbix server using isql -V. Apr 16, 2021 · CentOS8にて、postgresqlを使用し、ZabbixのFront画面を設定しているのですが、 ZabbixのFront画面内の Configure DB connection にて、 Cannot connect to the database. After several unsuccessful attempts, I prefer to contact experts. 1 zabbix zabbix 427 Apr 22 10:05 zabbix. S If you are doing fresh start, why not to use Zabbix 3. el6. This is for reference because I couldn't find anything describing this (using Google). Oct 11, 2017 · Because your database is empty, i suggest you do the following steps. x. You can find out more about setting up SSL for Zabbix frontend by referring to these best practices. The location of custom alert scripts. Code: mysql. Please, provide a working default config. 2. GUI database details like DBName, DBPassword, DBUser should match zabbix_server configuration file then only it can connect to database. Create a backup copy of the database! 4. Sep 13, 2022 · I'm developing a docker cluster of Zabbix server (a container based in mysql with the database, and zabbix-server and zabbix-front containers). Possible reasons: • 1. 1:6446" You'll better make a /var/log/zabbix directory whith appropriate permission and ownership and modify your zabbix_server. [LIST][*]Unable to determine current Zabbix database version: the table "dbversion" was not found. Jul 26, 2021 · I changed the postgresql password from user zabbix to something very simple, and then i need to chown the ' zabbix. But instead of using the port, why not use the socket if it's all running on the same system? To do so, set the server to localhost. 13 Zabbix 6. Enter password: Reading table information for completion of table and column names. May 1, 2020 · Cannot connect to the database. ch oo oe qt ff yf no kl sl qd