![slurmdbd 无法启动(初始安装)](https://linux22.com/image/717190/slurmdbd%20%E6%97%A0%E6%B3%95%E5%90%AF%E5%8A%A8%EF%BC%88%E5%88%9D%E5%A7%8B%E5%AE%89%E8%A3%85%EF%BC%89.png)
slurmdbd
我尝试从标准存储库(版本:)在 Ubuntu 16.04 上安装会计软件15.08.7-1build1
。
命令如下:
$ sudo apt-get install mysql-server
$ sudo mysql
> create user 'slurm'@'localhost' identified by '123456';
> grant all on *.* TO 'slurm'@'localhost' identified by '123456' with grant option;
> create database slurm_acct_db;
> flush privileges;
> exit
$ sudo apt-get install slurmdbd
$ sudo vi /etc/slurm-llnl/slurmdbd.conf
$ cat /etc/slurm-llnl/slurmdbd.conf
AuthType=auth/munge
AuthInfo=/var/run/munge/munge.socket.2
DbdHost=localhost
DebugLevel=debug5
StorageHost=localhost
StorageLoc=slurm_acct_db
StoragePass=123456
StorageType=accounting_storage/mysql
StorageUser=slurm
LogFile=/var/log/slurm-llnl/slurmdbd.log
PidFile=/var/run/slurm-llnl/slurmdbd.pid
SlurmUser=slurm
但是启动slurmdbd
失败:
$ sudo systemctl start slurmdbd.service
Job for slurmdbd.service failed because the control process exited with error code. See "systemctl status slurmdbd.service" and "journalctl -xe" for details.
$ systemctl status slurmdbd.service
● slurmdbd.service - Slurm DBD accounting daemon
Loaded: loaded (/lib/systemd/system/slurmdbd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Di 2018-02-06 08:42:59 CET; 21s ago
Process: 5881 ExecStart=/usr/sbin/slurmdbd $SLURMDBD_OPTIONS (code=exited, status=1/FAILURE)
Feb 06 08:42:59 accslurm systemd[1]: Starting Slurm DBD accounting daemon...
Feb 06 08:42:59 accslurm systemd[1]: slurmdbd.service: Control process exited, code=exited status=1
Feb 06 08:42:59 accslurm systemd[1]: Failed to start Slurm DBD accounting daemon.
Feb 06 08:42:59 accslurm systemd[1]: slurmdbd.service: Unit entered failed state.
Feb 06 08:42:59 accslurm systemd[1]: slurmdbd.service: Failed with result 'exit-code'.
$ journalctl -xe
Feb 06 08:42:59 accslurm systemd[1]: Starting Slurm DBD accounting daemon...
-- Subject: Unit slurmdbd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit slurmdbd.service has begun starting up.
Feb 06 08:42:59 accslurm systemd[1]: slurmdbd.service: Control process exited, code=exited status=1
Feb 06 08:42:59 accslurm systemd[1]: Failed to start Slurm DBD accounting daemon.
-- Subject: Unit slurmdbd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit slurmdbd.service has failed.
--
-- The result is failed.
尝试使用详细输出手动执行此操作:
$ sudo -u slurm slurmdbd -Dvvv
slurmdbd: error: mysql_query failed: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ignore table cluster_table modify `creation_time` int unsigned not null, modify ' at line 1
alter ignore table cluster_table modify `creation_time` int unsigned not null, modify `mod_time` int unsigned default 0 not null, modify `deleted` tinyint default 0, modify `name` tinytext not null, modify `control_host` tinytext not null default '', modify `control_port` int unsigned not null default 0, modify `last_port` int unsigned not null default 0, modify `rpc_version` smallint unsigned not null default 0, modify `classification` smallint unsigned default 0, modify `dimensions` smallint unsigned default 1, modify `plugin_id_select` smallint unsigned default 0, modify `flags` int unsigned default 0, drop primary key, add primary key (name(20));
slurmdbd: Accounting storage MYSQL plugin failed
slurmdbd: error: Couldn't load specified plugin name for accounting_storage/mysql: Plugin init() callback failed
slurmdbd: error: cannot create accounting_storage context for accounting_storage/mysql
slurmdbd: fatal: Unable to initialize accounting_storage/mysql accounting storage plugin
那么看起来数据库创建的语法有错误?
我错过了什么?
答案1
我不知道是否应该通过手动降级到较旧的 mysql 版本或调整 slurmdbd 来解决这个问题。但根本原因alter ignore table
是从 mysql 5.7 中删除。看起来您使用“旧语法” SQL 语句和“新语法”引擎。