首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >openvpn启动错误:步骤CHDIR产卵/usr/bin/openvpn失败

openvpn启动错误:步骤CHDIR产卵/usr/bin/openvpn失败
EN

Server Fault用户
提问于 2020-11-03 18:35:11
回答 1查看 3.5K关注 0票数 0

我试图通过运行openvpnv2.4.9服务器来启动

代码语言:javascript
复制
systemctl start openvpn-server@server

在Arch Linux上作为root用户。

这将导致以下错误:

代码语言:javascript
复制
 The job identifier is 176005 and the job result is failed.
Nov 03 13:42:35 hostname audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=openvpn-server@-etc-openvpn-server.onf comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=?>
Nov 03 13:42:35 hostname systemd[100169]: openvpn-server@-etc-openvpn-server.service: Changing to the requested working directory failed: No such file or directory
Nov 03 13:42:35 hostname systemd[100169]: openvpn-server@-etc-openvpn-server.service: Failed at step CHDIR spawning /usr/bin/openvpn: No such file or directory
Subject: Process /usr/bin/openvpn could not be executed
Defined-By: systemd
Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel

The process /usr/bin/openvpn could not be executed and failed.

我不太清楚“CHDIR产卵失败”是什么意思。

/usr/bin/openvpn对每个人都是可执行的:

代码语言:javascript
复制
root@hostname > ls -l /usr/bin/openvpn
-rwxr-xr-x 1 root root 788544 Apr 20  2020 /usr/bin/openvpn

/usr和/usr/bin也是任何人都可以接受的。

我的配置位于/etc/openvpn/server.conf,如下所示:

代码语言:javascript
复制
user nobody
group nobody

persist-key
persist-tun

proto udp
proto udp6

dev tun

ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/cert.crt
key /etc/openvpn/easy-rsa/pki/private/key.key
dh /etc/openvpn/easy-rsa/pki/dh.pem

cipher AES-256-CBC
auth SHA512
comp-lzo
reneg-sec 36000

server 192.168.100.0 255.255.255.0
push "route 192.168.100.0 255.255.255.0"

keepalive 10 36000

status openvpn-status.log

log /var/log/openvpn.log

verb 6

这两个日志文件中没有一个列出任何有价值的信息。

你需要我的系统提供更多信息吗?

任何帮助都是非常感谢的。

EN

回答 1

Server Fault用户

回答已采纳

发布于 2020-11-04 12:10:35

server.conf定位错位。显然,系统希望server.conf位于/etc/openvpn/server,而不搜索其他位置。将文件移到这个位置解决了这个问题。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1041150

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档