[Bug] Covenant Crashes When BindAdress for Listener Unavailable
- Dominant language
- C#
- Stars
- 4.7k
- Forks
- 822
- PR merge metrics
- No merged PRs in 30d
Description
**Feature Request or Bug**
Bug
**Describe the feature request or bug**
When a covenant listener was previously configured to start on a specific IP (e.g. the one of a tun0 interface of a VPN connection) that is not available during startup covenant will fail to start.
**To Reproduce**
Steps to reproduce the behavior:
1. Confiugre a Listener bound to a specific IP
2. Stop Covenant
3. Down the interface
4. Start Covenant again
**Expected behavior**
Covenant warns about the IP not being available, but starts correctly.
**Observed behavior**
Covenant crashes with the following stacktrace:
```
Unhandled exception. System.AggregateException: One or more errors occurred. (BadRequest - Listener with id: 2 did not start due to exception: One or more errors occurred. (Cannot assign requested address))
---> Covenant.Core.ControllerBadRequestException: BadRequest - Listener with id: 2 did not start due to exception: One or more errors occurred. (Cannot assign requested address)
at Covenant.Core.CovenantService.StartListener(Int32 listenerId) in /home/user/Covenant/Covenant/Core/CovenantService.cs:line 4532
at Covenant.Core.DbInitializer.InitializeListeners(ICovenantService service, CovenantContext context, CovenantUser user) in /home/user/Covenant/Covenant/Core/DbInitializer.cs:line 103
at Covenant.Core.DbInitializer.Initialize(ICovenantService service, CovenantContext context, RoleManager`1 roleManager, UserManager`1 userManager, String username, String password) in /home/user/Covenant/Cov
enant/Core/DbInitializer.cs:line 30
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at Covenant.Program.<>c__DisplayClass0_0.b__0() in /home/user/Covenant/Covenant/Covenant.cs:line 114
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass146_0.b__0(CancellationToken _)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at Covenant.Program.Main(String[] args) in /home/user/Covenant/Covenant/Covenant.cs:line 136
```
**Covenant Server Information:**
- OS: Kali GNU/Linux Rolling
- Native
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.