feat(openvpn): explain ip route error in logs
- `RTNETLINK answers: File exists` changed to warning with explanation - `Linux route add command failed:` changed to warning with explanation
This commit is contained in:
@@ -65,6 +65,16 @@ That error usually happens because either:
|
||||
filtered = s
|
||||
level = levelInfo
|
||||
}
|
||||
|
||||
switch {
|
||||
case filtered == "RTNETLINK answers: File exists":
|
||||
filtered = "OpenVPN tried to add an IP route which already exists (" + filtered + ")"
|
||||
level = levelWarn
|
||||
case strings.HasPrefix(filtered, "Linux route add command failed: "):
|
||||
filtered = "Previous error details: " + filtered
|
||||
level = levelWarn
|
||||
}
|
||||
|
||||
filtered = constants.ColorOpenvpn().Sprintf(filtered)
|
||||
return filtered, level
|
||||
}
|
||||
|
||||
@@ -43,6 +43,36 @@ func Test_processLogLine(t *testing.T) {
|
||||
"AUTH: Received control message: AUTH_FAILED",
|
||||
"AUTH: Received control message: AUTH_FAILED\n\nYour credentials might be wrong 🤨\n\n",
|
||||
levelError},
|
||||
"TLS key negotiation error": {
|
||||
s: "TLS Error: TLS key negotiation failed to occur within " +
|
||||
"60 seconds (check your network connectivity)",
|
||||
filtered: "TLS Error: TLS key negotiation failed to occur within " +
|
||||
"60 seconds (check your network connectivity)" + `
|
||||
🚒🚒🚒🚒🚒🚨🚨🚨🚨🚨🚨🚒🚒🚒🚒🚒
|
||||
That error usually happens because either:
|
||||
|
||||
1. The VPN server IP address you are trying to connect to is no longer valid 🔌
|
||||
Update your server information using https://github.com/qdm12/gluetun/wiki/Updating-Servers
|
||||
|
||||
2. The VPN server crashed 💥, try changing your VPN servers filtering options such as SERVER_REGIONS
|
||||
|
||||
3. Your Internet connection is not working 🤯, ensure it works
|
||||
|
||||
4. Something else ➡️ https://github.com/qdm12/gluetun/issues/new/choose
|
||||
`,
|
||||
level: levelWarn,
|
||||
},
|
||||
"RTNETLINK answers: File exists": {
|
||||
s: "ERROR: RTNETLINK answers: File exists",
|
||||
filtered: "OpenVPN tried to add an IP route which already exists " +
|
||||
"(RTNETLINK answers: File exists)",
|
||||
level: levelWarn,
|
||||
},
|
||||
"Linux route add command failed": {
|
||||
s: "ERROR: Linux route add command failed: some error",
|
||||
filtered: "Previous error details: Linux route add command failed: some error",
|
||||
level: levelWarn,
|
||||
},
|
||||
}
|
||||
for name, tc := range tests {
|
||||
tc := tc
|
||||
|
||||
Reference in New Issue
Block a user