0

我正在维护一个项目,而且我刚刚开始,所以我不太了解代码库。我的第一个任务是将项目使用的 Wireguard 库更新到最新版本。在我这样做之后,应用程序拒绝通过wireguard进行连接。我很确定应用程序中不起作用的部分是我的应用程序创建的网络首选项中的条目。在可以运行的版本中,安装的条目可以在不运行应用程序的情况下连接,在无法连接的版本中,该条目不起作用。我尝试登录控制台:

对于有效的版本,日志是:

default 01:34:22.934533+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)]: Adding a connection for client com.apple.preference.network.re[2011]
default 01:34:35.530616+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)]: Received a start command from com.apple.preference.network.re[2011]
default 01:34:35.530683+0100    nesessionmanager    Registering session NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)]
default 01:34:35.531061+0100    nesessionmanager    <NESMServer: 0x7fb9a35040a0>: Register Enterprise VPN Session: NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)]


default 01:34:35.531107+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)]: Successfully registered
default 01:34:35.531142+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)]: Changing pause level 1 -> 0
default 01:34:35.532532+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)]: status changed to connecting
default 01:34:35.532738+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)] in state NESMVPNSessionStateIdle: received start message
default 01:34:35.532783+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)]: Leaving state NESMVPNSessionStateIdle
default 01:34:35.532807+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)]: Entering state NESMVPNSessionStatePreparingNetwork
default 01:34:35.534507+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)]: Leaving state NESMVPNSessionStatePreparingNetwork
default 01:34:35.534537+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)]: Entering state NESMVPNSessionStateStarting
default 01:34:35.592272+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)]: Plugin NEVPNTunnelPlugin(com.VPN.osx.VPNBackend[inactive]) initialized with Mach-O UUIDs (
    "ECA8D451-66ED-3748-A76D-0C6FA6ACC5E5"
)
default 01:34:35.595024+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)] in state NESMVPNSessionStateStarting: plugin NEVPNTunnelPlugin(com.VPN.osx.VPNBackend[inactive]) started with PID 2013 error (null)
default 01:34:35.702611+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)] in state NESMVPNSessionStateStarting: set configuration started
default 01:34:35.702672+0100    nesessionmanager    <NESMServer: 0x7fb9a35040a0>: Request to install session: NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)] (exclusive)
default 01:34:35.702697+0100    nesessionmanager    <NESMServer: 0x7fb9a35040a0>: Request to install Session NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)] is Enterprise - Exclusive
default 01:34:35.793277+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)] in state NESMVPNSessionStateStarting: set configuration completed with result 1
default 01:34:35.794877+0100    configd nw_path_evaluator_start [3BD8B408-C2CB-4EB7-8C1C-8B931B2B61B5 IPv4#17f94fd3:0 generic, indefinite]
    path: unsatisfied (Network Agent [domain: NetworkExtension, type: VPN, description: VPN: VPN WireGuard, uuid: D52281C5-4B04-4E55-A906-A0825158EE45, flags: 1] is unsatisfied), interface: utun2, ipv4, dns
default 01:34:35.818440+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)] in state NESMVPNSessionStateStarting: plugin NEVPNTunnelPlugin(com.VPN.osx.VPNBackend[inactive]) status changed to connected
default 01:34:35.818486+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)]: Leaving state NESMVPNSessionStateStarting
default 01:34:35.818514+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)]: Entering state NESMVPNSessionStateRunning
default 01:34:35.818561+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)]: status changed to connected
default 01:34:35.818624+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:40F11705-1D5E-460C-AB50-E16CD86E289F:(null)]: Updated network agent (active, compulsory, not-user-activiated, not-kernel-activated)

对于不起作用的版本,日志是:

default 01:40:42.706804+0100    VPN Service  Saving configuration VPN WireGuard with existing signature (null)
default 01:40:42.749663+0100    WireGuard   Received a com.apple.neconfigurationchanged notification with token 42
default 01:40:42.750127+0100    VPN Service  Successfully saved configuration VPN WireGuard
default 01:40:42.752069+0100    nesessionmanager    Creating session with type 1, id D7354992-B57D-40FE-A881-0085FA025B7E (VPN WireGuard)
default 01:40:42.752249+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Registered network agent (inactive)
default 01:40:42.752693+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Resetting VPN On Demand
default 01:40:42.752710+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Entering state NESMVPNSessionStateIdle
default 01:40:42.753165+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Plugin is registered with provider manager
default 01:40:42.753360+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Plugin is installed
default 01:40:42.753679+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Adding a connection for client com.apple.preference.network.re[2011]
default 01:40:42.754223+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Adding a connection for client SystemUIServer[452]
default 01:40:42.769361+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Adding a connection for client VPN Service[3072]
default 01:40:42.770910+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Received a start command from VPN Service[3072]
default 01:40:42.770946+0100    nesessionmanager    Registering session NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]
default 01:40:42.771264+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Resetting VPN On Demand
default 01:40:42.771323+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Plugin is registered with provider manager
default 01:40:42.771342+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Plugin is installed
default 01:40:42.771368+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)] in state NESMVPNSessionStateIdle: update configuration
default 01:40:42.771842+0100    nesessionmanager    <NESMServer: 0x7fb9a35040a0>: Register Enterprise VPN Session: NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]


default 01:40:42.771965+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Successfully registered
default 01:40:42.773427+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: status changed to connecting
default 01:40:42.773664+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)] in state NESMVPNSessionStateIdle: received start message
default 01:40:42.773716+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Leaving state NESMVPNSessionStateIdle
default 01:40:42.773741+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Entering state NESMVPNSessionStatePreparingNetwork
default 01:40:42.774647+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Leaving state NESMVPNSessionStatePreparingNetwork
default 01:40:42.774732+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Entering state NESMVPNSessionStateStarting
default 01:40:42.859883+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)] in state NESMVPNSessionStateStarting: plugin NEVPNTunnelPlugin(com.VPN.osx.VPNBackend[inactive]) started with PID 0 error (null)
default 01:40:42.860681+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Leaving state NESMVPNSessionStateStarting
default 01:40:42.860713+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Entering state NESMVPNSessionStateStopping, timeout 20 seconds
default 01:40:42.860769+0100    nesessionmanager    <NESMServer: 0x7fb9a35040a0>: Request to uninstall session: NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]
default 01:40:42.860791+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: status changed to disconnecting
default 01:40:42.860851+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Updated network agent (inactive, compulsory, not-user-activiated, not-kernel-activated)
default 01:40:42.861054+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Leaving state NESMVPNSessionStateStopping
default 01:40:42.861095+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Entering state NESMVPNSessionStateDisposing, timeout 5 seconds
default 01:40:42.861510+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)] in state NESMVPNSessionStateDisposing: plugin NEVPNTunnelPlugin(com.VPN.osx.VPNBackend[inactive]) dispose complete
default 01:40:42.861536+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)] in state NESMVPNSessionStateDisposing: all plugins have disposed
default 01:40:42.861685+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Leaving state NESMVPNSessionStateDisposing
default 01:40:42.861793+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: Entering state NESMVPNSessionStateIdle
default 01:40:42.862178+0100    nesessionmanager    NESMVPNSession[Primary Tunnel:VPN WireGuard:D7354992-B57D-40FE-A881-0085FA025B7E:(null)]: status changed to disconnected, last stop reason Plugin failed
default 01:40:43.055916+0100    VPN Service Last disconnect error for VPN WireGuard changed from "none" to "The VPN session failed because an internal error occurred."

引起我注意的是插件在第二个日志中的pid = 0,这可能是插件没有根据日志加载的原因,但我想知道是否有更聪明的事情要做调试问题比阅读这个不是很详细的日志。有没有类似详细选项的东西?非常感谢您的帮助。

4

1 回答 1

0

这可能有助于调试。

日志流 --info --predicate 'senderImagePath contains[cd] "NetworkExtension"'

于 2021-02-16T11:48:30.293 回答