Fixing Zabbix Linode Marketplace application deployment issue
I deployed Zabbix Linode Marketplace from the marketplace but I'm stuck at "Access your Zabbix App" section from the guide and on the front-end I see an error message that says:
"Unable to determine current Zabbix database version: the table "dbversion" was not found."
Has anyone managed to fix this?
1 Reply
Update:
After getting this to work on my own Zabbix Linode Marketplace application, I tried a new deployment a few days ago and I struggled a bit to get these instructions to work on new deployments. Since then, I managed to figure out more clearly what's wrong and how to get this to work successfully in even fewer steps, so I wanted to share my latest process in case anyone else gets a bit stuck as well following the original instructions.
From what I've gathered, the solution here is broken down into the following steps after the deployment finishes:
- Create the zabbix mysql user account.
- Grant all necessary privileges for the zabbix mysql user account.
- Unzip and run the server.sql.gz file to finish the configuration settings on the zabbix database.
- Update/setup the Admin user account password.
Here's how to do each step:
Create the zabbix mysql user account
use the mysql
shell and execute this command:
mysql> create user zabbix@localhost identified by 'YourSecurePassword';
Query OK, 0 rows affected (0.00 sec)
Grant all necessary privileges for the zabbix mysql user account.
use the mysql
shell and execute this command then quit:
mysql> grant all privileges on zabbix.* to zabbix@localhost;
Query OK, 0 rows affected (0.00 sec)
mysql> quit;
Unzip and run the server.sql.gz file to finish the configuration settings on the zabbix database
This one is easy. You'll need to wait a few minutes until this finishes. Also, you will be using the password for the zabbix user you set up during the first step:
zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
Enter password:
Update/setup the Admin user account password
Again, you'll need a bycript-encrypted password. I got mine from here:
After that, you can enter the mysql shell and run this command and quit the shell:
mysql> update zabbix.users set passwd=('$2a$12$wdflkjsdflksdjflskdfji......') where userid='1';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> quit;
Bye
Give it a few seconds and after that, you can login to your Zabbix server using the default 'Admin' username and the (unencrypted) password you setup from the previous step by visiting your Linode's IPv4 address on your browser.
I've completed this process now a few times and it seems relatively easier than the previous one though it is more or less the same. Hope this info makes things easier for anybody else until this gets fixed :-)
Hi there,
I managed to resolve this on my own Zabbix One-Click App (OCA) deployment. As best as I can tell, the issue here is that the database is not getting setup correctly. In my case, I managed to resolve this by following some of the instructions from the Zabbix installation page:
First, after my Oca finished deploying, I launched the LISH Console from Cloud Manager and logged in as root. After that, I used this command to access the mysql shell:
mysql
After that, I used something similar to the commands shown in the installation link above. The only difference is that the "create user zabbix@localhost identified by 'password';" command doesn't work anymore. To fix that, I ended up using an online resource to convert my password into an encrypted version with bycript:
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user zabbix@localhost identified by 'password';
mysql> update zabbix.users set passwd=('$2a$12$nSgRcPgrA7qXAAR45EWJTOAiJnBM73R2iT2YMoniZWn/MduueDtlK') where userid='1';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> set global log_bin_trust_function_creators = 1;
mysql> quit;
From there, I used this command (again as instructed from the installation instructions):
zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
That took a few minutes to finish. After that, I then used the "mysql
" to login to the mysql shell and executed this as recommended:
mysql> set global log_bin_trust_function_creators = 0;
mysql> quit;
From there, I think I also used this command to restart the service. I'm not entirely sure if that was necessary, but when I tried to use the login page before that the system was spinning for a few seconds, so it may be needed. It definitely shouldn't hurt :-)
sudo systemctl restart zabbix-server
I hope that helps & good luck!
Arty