Windows guru
Windows guru » title=» Windows guru » border=»0″/>
Зарегистрирован: 23.02.2005
Пользователь #: 24,533
Сообщения: 13861
Откуда: Москва
Голоса: 139
| Добавлено: Вт 24 Дек, 2019 16:01 Заголовок сообщения: | |
| _________________ Чтобы правильно задать вопрос, нужно знать половину ответа. Троли в игноре. |


Новичок
Зарегистрирован: 22.08.2012
Пользователь #: 141,330
Сообщения: 59


| Добавлено: Вт 24 Дек, 2019 16:35 Заголовок сообщения: |

Новичок
Зарегистрирован: 22.08.2012
Пользователь #: 141,330
Сообщения: 59


| Добавлено: Вт 24 Дек, 2019 16:39 Заголовок сообщения: |

Windows guru
Windows guru » title=» Windows guru » border=»0″/>
Зарегистрирован: 23.02.2005
Пользователь #: 24,533
Сообщения: 13861
Откуда: Москва
Голоса: 139
| Добавлено: Вт 24 Дек, 2019 16:46 Заголовок сообщения: | |
| _________________ Чтобы правильно задать вопрос, нужно знать половину ответа. Троли в игноре. |

Новичок
Зарегистрирован: 22.08.2012
Пользователь #: 141,330
Сообщения: 59


| Добавлено: Вт 24 Дек, 2019 17:03 Заголовок сообщения: |

Новичок
Зарегистрирован: 22.08.2012
Пользователь #: 141,330
Сообщения: 59


| Добавлено: Ср 25 Дек, 2019 10:26 Заголовок сообщения: |

Windows guru
Windows guru » title=» Windows guru » border=»0″/>
Зарегистрирован: 23.02.2005
Пользователь #: 24,533
Сообщения: 13861
Откуда: Москва
Голоса: 139
| Добавлено: Ср 25 Дек, 2019 10:36 Заголовок сообщения: | |
| _________________ Чтобы правильно задать вопрос, нужно знать половину ответа. Троли в игноре. |

Новичок
Зарегистрирован: 22.08.2012
Пользователь #: 141,330
Сообщения: 59


| Добавлено: Ср 25 Дек, 2019 10:55 Заголовок сообщения: |

Новичок
Зарегистрирован: 22.08.2012
Пользователь #: 141,330
Сообщения: 59


| Добавлено: Ср 25 Дек, 2019 10:58 Заголовок сообщения: |

Новичок
Зарегистрирован: 22.08.2012
Пользователь #: 141,330
Сообщения: 59
Источник
Zabbix cannot connect to the database – Let’s fix it!
Are you looking for a solution to “zabbix cannot connect to the database” error ? Here’s how we fix it.
Zabbix is a monitoring software tool. When using zabbix we may encounter many errors like zabbix cannot connect to the database. This may occur due to incorrect database details.
At Bobcares, we often get requests from our customers to fix ‘zabbix cannot connect to the database’ as part of our Server Management Services.
Today, we’ll see the reasons and how our Support Engineers fix this error.
Causes for ‘Zabbix cannot connect to the database’ Error
At Bobcares, where we have more than a decade of expertise in managing servers, we see many customers face problems while managing Zabbix.
Now, let’s see the major reasons for this Zabbix error to occur and we’ll also see how our Support Engineers fix this zabbix database cannot connect error.
Incorrect Database details
Recently one of our customers approached us with the same zabbix problem. He said he was getting an error in his zabbix dashboard like the one shown below in the screenshot.
When we checked in detail, our Support Engineers found that there is mismatch in the details given in database with those in zabbix_server configuration file.
We found that the DBName given in database was not the same as the one given in zabbix configuration file. So, we changed it to the right one. Finally, this fixed the error.
We also Checked and confirmed whether all other values entered were right.
Incorrect DBsocket
We got another request from some other customer. However, the error was similar. Here is the error message our customer was receiving.
We checked and found that the socket given in mysql configuration file is different from the one specified in the configuration file for zabbix. In mysql configuration DBSocket value was /var/run/mysql/mysql.sock and in zabbix_server configuration it was DBSocket=/var/run/mysql. So, we made the following corrections in zabbix configuration file:
And this fixed the problem.
[Need any further assistance in fixing zabbix errors? – We’ll help you]
Conclusion
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. Today, we saw how our Support Engineers fix this error.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
Источник
Adblock
detector
zabbix 3.0 frontend fails with :
«Database error
Error connecting to database: No such file or directory»
api in that case returns :
{"jsonrpc":"2.0","error":{"code":1,"message":"Error` connecting to database: No such file or directory","data":""},"id":1}
zabbix::tiny use was like this :
my $zabbix = Zabbix::Tiny->new(
server => $url,
that fails with Error: at stuff.pl line 33.
Note to self, «stuff.pl» is the name of Richlv’s script, not part of my error message.
Richlv, can you provide any more instruction on how to reproduce? I tried this:
#!/usr/bin/env perl
use strict;
use warnings;
use lib "../lib/";
use Zabbix::Tiny;
# Create a new Zabbix::Tiny object
my $zabbix = Zabbix::Tiny->new(
server => 'https://zabbix.local/api_jsonrpc.php',
);
The failure I received was: Missing required arguments: password, user at (eval 16) line 51.
Note, that the line reflected there is from the module, so I can look at cleaning it up to show the calling line, but as a simple explanation this is clear, so I must be doing something slightly different.
Copy link
Collaborator
Author
oh, sorry for not being clear enough — the script is a proper one, it also passed user & parameter, then tried to execute a method against the api.
the main idea is that any api-using script should show the same problem when the api returns an error like that.
I agree, but did you try an invalid method, have invalid parameters, etc? How can I reproduce this failure? Is it limited to 3.0? I don’t have much access to a 3.0 server right now, but if there’s a specific enough scenario to reproduce, I should be able to do that.
Copy link
Collaborator
Author
the backend database was down 
Ahhh — well, then the fact that the only 3.0 server I have is in a relatively unused scenario, I’m actually in a GOOD place to test this 
whosgonna
referenced
this issue
Aug 7, 2016
Some errors from the Zabbix API put the interesting data into 'data' field of the error response, which is how Zabbix::Tiny was originally written to provide the error message to users. Some other error responses (Zabbix not connected to it's database) have the interesting data in the 'message' field of the error response. Zabbix::Tiny will now provide both messages on failure.
Log inSkip to main contentSkip to sidebar
- ZABBIX BUGS AND ISSUES
- ZBX-15690
Log In
Export
- XMLWordPrintable
Details
-
Type:
Incident report
-
Status:
Closed -
Priority:
Critical
-
Resolution:
Commercial support required
-
Affects Version/s:
None
-
Fix Version/s:
None
-
Component/s:
Server (S)
-
Labels:
- database
-
Environment:
live
Description
Steps to reproduce:
- Changes in configuration…
- Navigate to screen title…
- Click on screen element…
- …
Result:
See screenshot…
See log file…
See memory dump…
Expected:
See screenshot….
See attached patch file…
Attachments
Attachments
-
- Sort By Name
- Sort By Date
- Ascending
- Descending
- Thumbnails
- List
- Download All
-
- zabbix database error.png
- 8 kB
- 2019 Feb 19 16:10
Activity
People
- Assignee:
-
Zabbix Support Team
- Reporter:
-
Rajendraprasad
- Votes:
-
0
Vote for this issue
- Watchers:
-
2
Start watching this issue
Dates
- Created:
-
2019 Feb 19 16:10
- Updated:
-
2019 Feb 19 17:33
- Resolved:
-
2019 Feb 19 17:33
I’m following this tutorial to install a fresh copy of Cent OS 7 and Zabbix 3.4. I’ve gone through the entire tutorial and have Zabix front end up and running. During the tutorial, when I got to step «Import initial DB schema and Data» I received the error «gzip: /usr/share/doc/zabbix-server-mysql-3.4.12/create.sql.gz: No such file or directory». When i try to log into Zabbix web-server I get the error «Cannot connect to the database: The frontend does not match Zabbix database.» I checked in mysql and there is a database called «zabbix», but there are no tables inside of it. I ran the command «rpm -ql zabbix-server-mysql» and do see a directory called «user/share/doc/zabbix-server-mysql-3.4.12/create.sql.gz». Outside of the several hours I’ve spent troubleshooting this, I have VERY little Linux knowledge. I’ve used up my googlefoo, and am in need of some help. Any ideas on how to proceed? Thank you!
Update: Asked a colleague to take a look with me and he figured it out. He downloaded the repository again and manually extracted the create.sql.gz file then transfered it via FTP to the server. This fixed my issue.



