最近项目要用到达梦数据库,按照官方说明使用默认配置安装完成,最后启动时却报错。
# systemctl start DmServiceDMSERVER.service
Job for DmServiceDMSERVER.service failed because the control process exited with error code. See "systemctl status DmServiceDMSERVER.service" and "journalctl -xe" for details.
查看状态
# systemctl status DmServiceDMSERVER.service
● DmServiceDMSERVER.service - DM Instance Service(DmServiceDMSERVER).
Loaded: loaded (/usr/lib/systemd/system/DmServiceDMSERVER.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2023-03-07 21:59:02 CST; 27s ago
Process: 32099 ExecStart=/dm/bin/DmServiceDMSERVER start (code=exited, status=1/FAILURE)
Mar 07 21:58:47 instance-20230304-1756 systemd[1]: Starting DM Instance Service(DmServiceDMSERVER)....
Mar 07 21:59:02 instance-20230304-1756 DmServiceDMSERVER[32099]: [43B blob data]
Mar 07 21:59:02 instance-20230304-1756 systemd[1]: DmServiceDMSERVER.service: control process exited, code=...us=1
Mar 07 21:59:02 instance-20230304-1756 systemd[1]: Failed to start DM Instance Service(DmServiceDMSERVER)..
Mar 07 21:59:02 instance-20230304-1756 systemd[1]: Unit DmServiceDMSERVER.service entered failed state.
Mar 07 21:59:02 instance-20230304-1756 systemd[1]: DmServiceDMSERVER.service failed.
也没什么有效提示,网上也没搜到有效方法。考虑是否实例配置有问题,返回到创建实例的章节,发现这样一句话“执行初始化命令前,需要使用 root 用户授予 /dm/data 目录相应权限”。于是检查目录权限
# ls /dm/ -al
total 36
drwxr-xr-x. 17 dmdba dinstall 263 Mar 7 21:55 .
dr-xr-xr-x. 18 root root 235 Mar 7 21:11 ..
drwxr-xr-x. 10 dmdba dinstall 8192 Mar 7 21:58 bin
drwxr-xr-x. 2 dmdba dinstall 30 Mar 7 21:21 bin2
drwxr-xr-x. 3 root root 20 Mar 7 21:55 data
drwxr-xr-x. 3 dmdba dinstall 19 Mar 7 21:20 desktop
drwxr-xr-x. 2 dmdba dinstall 4096 Mar 7 21:21 doc
drwxr-xr-x. 14 dmdba dinstall 160 Mar 7 21:21 drivers
drwxr-xr-x. 2 dmdba dinstall 4096 Mar 7 21:21 include
drwxr-xr-x. 2 dmdba dinstall 94 Mar 7 21:21 jar
drwxr-xr-x. 7 dmdba dinstall 161 Mar 7 21:20 jdk
-rwxr-xr-x. 1 dmdba dinstall 1071 Mar 7 21:21 license_en.txt
-rwxr-xr-x. 1 dmdba dinstall 1146 Mar 7 21:21 license_zh.txt
drwxr-xr-x. 2 dmdba dinstall 198 Mar 7 21:58 log
drwxr-xr-x. 6 dmdba dinstall 92 Mar 7 21:21 samples
drwxr-xr-x. 3 dmdba dinstall 37 Mar 7 21:21 script
drwxr-xr-x. 9 dmdba dinstall 4096 Mar 7 21:21 tool
drwxr-xr-x. 3 dmdba dinstall 97 Mar 7 21:21 uninstall
-rwxr-xr-x. 1 dmdba dinstall 2208 Mar 7 21:21 uninstall.sh
drwxr-xr-x. 3 dmdba dinstall 88 Mar 7 21:21 web
果然data目录没有正确授权,于是
# chown dmdba:dinstall -R /dm/data
# chmod -R 755 /dm/data
再次开启数据库
# systemctl start DmServiceDMSERVER.service
查看数据库状态
# systemctl status DmServiceDMSERVER.service
● DmServiceDMSERVER.service - DM Instance Service(DmServiceDMSERVER).
Loaded: loaded (/usr/lib/systemd/system/DmServiceDMSERVER.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2023-03-07 22:50:36 CST; 59s ago
Process: 32573 ExecStart=/dm8/bin/DmServiceDMSERVER start (code=exited, status=0/SUCCESS)
Main PID: 32594 (dmserver)
CGroup: /system.slice/DmServiceDMSERVER.service
└─32594 /dm/bin/dmserver path=/dm8/data/DAMENG/dm.ini -noconsole
已经正常开启了
评论
本文评论功能已关闭。