首先,我要感谢在这里给出这些精彩答案的所有人!我是 Ubuntu 的新用户,仍在学习中。使用 OSX 8 年后,它比我想象的要难。两周前,我在三星 ATIV Book 9 Lite 上安装了 Ubuntu 14.04。我在 BIOS 上遇到了困难,无法从 USB 启动机器,最后无法启动到 Ubuntu。这就是我找到这个网站并找到修复方法的原因。
我认为我的机器已经准备就绪。我观看了很多视频和文章,例如“安装 Ubuntu 后要做的 5/10 件事”。因此,我通过命令行完成了所有更新和调整。
我有 CyberGhost VPN 服务的高级帐户,所以我想将 OpenVPN 安装到我的新 Linux 机器上。我发现了这些优秀的教程https://www.youtube.com/watch?v=M-qLZmp5WBo
sudo apt-get install openvpn
sudo apt-get install openvpn bridge-utils
sudo apt-get install network-manager-openvpn network-manager-openvpn-gnome
sudo restart network-manager
令我大吃一惊的是,我的 VPN 在第一次尝试后就正常工作了!再次感谢 Scott Hunt。VPN 运行正常,但重启后单击任务栏网络 -- VPN 连接 --(我的 VPN 名称)什么也没发生。无线指示器甚至没有尝试连接。我尝试再次重启并检查设置,但一切正常。它没有连接。我不知道如何检查任何错误日志等。即使这样做,也帮不上什么忙……
我以为安装过程中出了问题,所以我想我可以重新安装操作系统并更新所有内容,只是为了练习并更熟悉 Ubuntu。当一切回到原点时,我又开始安装 VPN。
这次遵循 youtube 上的先前链接和 cyberghost 自己的安装指南https://support.cyberghostvpn.com/index.php?/Knowledgebase/Article/View/395/0/configure-openvpn-for-linux-mint
就像我说的,我第一次尝试使用 OpenVPN UDP .ovpn 和 YouTube 提供的设置,并且它运行良好,直到重新启动。
全新安装操作系统后,我使用 TCP .ovnp 建立 VPN,并从 cyberghost 链接提供设置。单击后,新的 TCP vpn 连接工作了,这对我来说有点意外!!一切都很好,就像第一次安装 vpn 后一样,但是...重启后它不会再连接。使用 Ubuntu 两周后,我没有工具来解决这个问题。在论坛上搜索答案几个小时后,我更加困惑了。我没有其他选择来发布我的问题,希望有人能抽出时间写出一步一步的说明来让这个东西工作,希望有同样问题的人也能找到它。
好吧,我不知道我在这里做什么,但我能够找到一个命令来查看日志文件。我不知道这些是否有用,因为我不理解或读不懂。也许这对某些人有帮助?
cyberghost@CyberGhost:~$ grep VPN /var/log/syslog
Feb 11 01:57:16 CyberGhost NetworkManager[737]: <info> Starting VPN service 'openvpn'...
Feb 11 01:57:16 CyberGhost NetworkManager[737]: <info> VPN service 'openvpn' started (org.freedesktop.NetworkManager.openvpn), PID 3791
Feb 11 01:57:16 CyberGhost NetworkManager[737]: <info> VPN service 'openvpn' appeared; activating connections
Feb 11 01:57:16 CyberGhost NetworkManager[737]: <error> [1423612636.123729] [nm-vpn-connection.c:1374] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.
Feb 11 01:57:21 CyberGhost NetworkManager[737]: <info> VPN service 'openvpn' disappeared
Feb 11 10:51:24 CyberGhost NetworkManager[5339]: <info> VPN: loaded org.freedesktop.NetworkManager.pptp
Feb 11 10:51:24 CyberGhost NetworkManager[5339]: <info> VPN: loaded org.freedesktop.NetworkManager.openvpn
Feb 11 10:51:40 CyberGhost NetworkManager[5339]: <info> Starting VPN service 'openvpn'...
Feb 11 10:51:40 CyberGhost NetworkManager[5339]: <info> VPN service 'openvpn' started (org.freedesktop.NetworkManager.openvpn), PID 5487
Feb 11 10:51:40 CyberGhost NetworkManager[5339]: <info> VPN service 'openvpn' appeared; activating connections
Feb 11 10:51:40 CyberGhost NetworkManager[5339]: <error> [1423644700.329580] [nm-vpn-connection.c:1374] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.
Feb 11 10:51:45 CyberGhost NetworkManager[5339]: <info> VPN service 'openvpn' disappeared
Feb 11 21:12:54 CyberGhost NetworkManager[5339]: <info> Starting VPN service 'openvpn'...
Feb 11 21:12:54 CyberGhost NetworkManager[5339]: <info> VPN service 'openvpn' started (org.freedesktop.NetworkManager.openvpn), PID 7569
Feb 11 21:12:54 CyberGhost NetworkManager[5339]: <info> VPN service 'openvpn' appeared; activating connections
Feb 11 21:12:54 CyberGhost NetworkManager[5339]: <error> [1423681974.194144] [nm-vpn-connection.c:1374] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.
Feb 11 21:12:59 CyberGhost NetworkManager[5339]: <info> VPN service 'openvpn' disappeared
Feb 11 21:15:58 CyberGhost NetworkManager[767]: <info> VPN: loaded org.freedesktop.NetworkManager.pptp
Feb 11 21:15:58 CyberGhost NetworkManager[767]: <info> VPN: loaded org.freedesktop.NetworkManager.openvpn
Feb 11 22:21:35 CyberGhost NetworkManager[739]: <info> VPN: loaded org.freedesktop.NetworkManager.pptp
Feb 11 22:21:35 CyberGhost NetworkManager[739]: <info> VPN: loaded org.freedesktop.NetworkManager.openvpn
Feb 11 22:27:10 CyberGhost NetworkManager[739]: <info> Starting VPN service 'openvpn'...
Feb 11 22:27:10 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' started (org.freedesktop.NetworkManager.openvpn), PID 2986
Feb 11 22:27:10 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' appeared; activating connections
Feb 11 22:27:10 CyberGhost NetworkManager[739]: <error> [1423686430.334729] [nm-vpn-connection.c:1374] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.
Feb 11 22:27:15 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' disappeared
Feb 11 22:27:18 CyberGhost NetworkManager[739]: <info> Starting VPN service 'openvpn'...
Feb 11 22:27:18 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' started (org.freedesktop.NetworkManager.openvpn), PID 2989
Feb 11 22:27:18 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' appeared; activating connections
Feb 11 22:27:18 CyberGhost NetworkManager[739]: <error> [1423686438.614084] [nm-vpn-connection.c:1374] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.
Feb 11 22:27:23 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' disappeared
Feb 11 22:27:24 CyberGhost NetworkManager[739]: <info> Starting VPN service 'openvpn'...
Feb 11 22:27:24 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' started (org.freedesktop.NetworkManager.openvpn), PID 2992
Feb 11 22:27:24 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' appeared; activating connections
Feb 11 22:27:24 CyberGhost NetworkManager[739]: <error> [1423686444.783814] [nm-vpn-connection.c:1374] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.
Feb 11 22:27:29 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' disappeared
Feb 11 22:27:30 CyberGhost NetworkManager[739]: <info> Starting VPN service 'openvpn'...
Feb 11 22:27:30 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' started (org.freedesktop.NetworkManager.openvpn), PID 2995
Feb 11 22:27:30 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' appeared; activating connections
Feb 11 22:27:30 CyberGhost NetworkManager[739]: <error> [1423686450.537733] [nm-vpn-connection.c:1374] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.
Feb 11 22:27:35 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' disappeared
Feb 11 23:10:18 CyberGhost NetworkManager[739]: <info> Starting VPN service 'openvpn'...
Feb 11 23:10:18 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' started (org.freedesktop.NetworkManager.openvpn), PID 3431
Feb 11 23:10:18 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' appeared; activating connections
Feb 11 23:10:18 CyberGhost NetworkManager[739]: <error> [1423689018.394501] [nm-vpn-connection.c:1374] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.
Feb 11 23:10:23 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' disappeared
Feb 11 23:18:21 CyberGhost NetworkManager[739]: <info> Starting VPN service 'openvpn'...
Feb 11 23:18:21 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' started (org.freedesktop.NetworkManager.openvpn), PID 3613
Feb 11 23:18:21 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' appeared; activating connections
Feb 11 23:18:21 CyberGhost NetworkManager[739]: <error> [1423689501.604361] [nm-vpn-connection.c:1374] get_secrets_cb(): Failed to request VPN secrets #2: (6) No agents were available for this request.
Feb 11 23:18:26 CyberGhost NetworkManager[739]: <info> VPN service 'openvpn' disappeared
cyberghost@CyberGhost:~$
答案1
这只是一点知识:Mac 版 OSX 基于 Darwin,它是 Linux 的一个发行版。因此命令等彼此相似。尝试这种思维方式,看看您是否可以改进解决问题的方法。希望对您有所帮助。
答案2
我也遇到了这个错误,尽管我是在使用 OpenVPN 一周后才遇到的,包括多次断电和重启。我找到了一个在 Ubuntu 中重新启动 dbus 服务的模糊想法。
sudo service dbus restart
最好将另一个命令与 GUI 连接起来以重新启动,因为执行此命令后我需要按电源按钮重新启动。但之后我能够正常连接到我的 VPN。