Linux firebird3.0.service的作业失败,因为超出了配置的资源限制
安装时出错,尝试启动Firebird 3.0服务后出错Linux firebird3.0.service的作业失败,因为超出了配置的资源限制,linux,ubuntu,firebird,ubuntu-16.04,firebird-3.0,Linux,Ubuntu,Firebird,Ubuntu 16.04,Firebird 3.0,安装时出错,尝试启动Firebird 3.0服务后出错 Job for firebird3.0.service failed because a configured resource limit was exceeded. See "systemctl status firebird3.0.service" and "journalctl -xe" for details. invoke-rc.d: initscript firebird3.0, action "start" failed.
Job for firebird3.0.service failed because a configured resource limit was exceeded. See "systemctl status firebird3.0.service" and "journalctl -xe" for details.
invoke-rc.d: initscript firebird3.0, action "start" failed.
dpkg: error processing package firebird3.0-server (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for systemd (229-4ubuntu7) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
firebird3.0-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
参见“服务firebird3.0启动”返回:
请参阅“journalctl-xe”中的返回:
我尝试了很多方法来解决问题,但目前唯一的方法是手动启动:
start-stop-daemon --quiet --start --exec /usr/sbin/fbguard --pidfile /var/run/firebird/3.0/firebird.pid -b -m -- -daemon -forever -pidfile /var/run/firebird/3.0/firebird.pid
和手动停止:
start-stop-daemon --stop --signal KILL --exec /usr/sbin/fbguard
start-stop-daemon --stop --signal KILL --exec /usr/sbin/firebird
有什么想法吗?目录/run/firebird/3.0不是在基于debian的系统上安装时创建的。所以systemd脚本不起作用 解决方法: 正如用户root所做的那样
[Unit]
Description=Firebird Database Server ( SuperServer )
After=network.target
Conflicts=firebird3.0-classic.socket
[Service]
User=firebird
Group=firebird
Type=forking
# Run ExecStartPre with root-permissions
PermissionsStartOnly=true
ExecStartPre=-/bin/mkdir -p /run/firebird/3.0
ExecStartPre=/bin/chown -R firebird:firebird /run/firebird
PIDFile=/run/firebird/3.0/default.pid
ExecStart=/usr/sbin/fbguard -pidfile /run/firebird/3.0/default.pid -daemon -forever
RuntimeDirectory=firebird/3.0
StandardError=syslog
[Install]
WantedBy=multi-user.target
PermissionsStartOnly=true是能够以root身份执行除服务本身(ExecStart)之外的所有语句所必需的。这对于在/run中创建子目录很重要。
顺便说一句:第一行ExecStartPre中的-(减号)使得在目录创建返回错误时不停止运行脚本,这有助于确定目录是否存在,例如在服务重新启动后
别忘了重新加载systemd:
systemctl——系统守护进程重新加载在基于debian的系统上安装时不会创建目录/run/firebird/3.0。所以systemd脚本不起作用 解决方法: 正如用户root所做的那样
[Unit]
Description=Firebird Database Server ( SuperServer )
After=network.target
Conflicts=firebird3.0-classic.socket
[Service]
User=firebird
Group=firebird
Type=forking
# Run ExecStartPre with root-permissions
PermissionsStartOnly=true
ExecStartPre=-/bin/mkdir -p /run/firebird/3.0
ExecStartPre=/bin/chown -R firebird:firebird /run/firebird
PIDFile=/run/firebird/3.0/default.pid
ExecStart=/usr/sbin/fbguard -pidfile /run/firebird/3.0/default.pid -daemon -forever
RuntimeDirectory=firebird/3.0
StandardError=syslog
[Install]
WantedBy=multi-user.target
PermissionsStartOnly=true是能够以root身份执行除服务本身(ExecStart)之外的所有语句所必需的。这对于在/run中创建子目录很重要。
顺便说一句:第一行ExecStartPre中的-(减号)使得在目录创建返回错误时不停止运行脚本,这有助于确定目录是否存在,例如在服务重新启动后
别忘了重新加载systemd:
systemctl--系统守护进程重新加载您是否按照错误消息中的建议检查了
systemctl status firebird3.0.service
的输出?如果是,请发布此消息好吗?相关:您是否按照错误消息中的建议检查了systemctl status firebird3.0.service
的输出?如果是的话,你能发布这个吗?相关的:
[Unit]
Description=Firebird Database Server ( SuperServer )
After=network.target
Conflicts=firebird3.0-classic.socket
[Service]
User=firebird
Group=firebird
Type=forking
# Run ExecStartPre with root-permissions
PermissionsStartOnly=true
ExecStartPre=-/bin/mkdir -p /run/firebird/3.0
ExecStartPre=/bin/chown -R firebird:firebird /run/firebird
PIDFile=/run/firebird/3.0/default.pid
ExecStart=/usr/sbin/fbguard -pidfile /run/firebird/3.0/default.pid -daemon -forever
RuntimeDirectory=firebird/3.0
StandardError=syslog
[Install]
WantedBy=multi-user.target