Ombi-app / Ombi

Want a Movie or TV Show on Plex/Emby/Jellyfin? Use Ombi!
http://ombi.io
GNU General Public License v2.0
3.73k stars 396 forks source link

Mattermost Integration Settings not honored (http port) #4840

Closed strcrzy closed 1 year ago

strcrzy commented 1 year ago

Describe the bug Adding a mattermost integration to a server running on a port that is not 80 results in an exception. Notably, the "test" button successfully delivers a notification. All future notifications throw an exception and do not deliver.

To Reproduce Steps to reproduce the behavior:

  1. Set up a mattermost integration on a non-standard port (not 80)
  2. Click on Test to verify the test notification delivers
  3. Request or open an Issue
  4. Observe lack of delivery
  5. Observe stack trace
  6. Investigate settings
  7. Investigate logs

Expected behavior The mattermost notifications are delivered to the correct port as specified in the mattermost URL, instead of port 80.

Logs (Logs directory where Ombi is located)

sqlite> select * from GlobalSettings where SettingsName = "MattermostNotificationSettings";
11|{"WebhookUrl":"http://chat:8065/hooks/XXXXXXXXXX","Channel":"notifications","Enabled":false,"Id":11}|MattermostNotificationSettings
| Connection refused (chat:80)
| fail: Ombi.Notifications.Agents.MattermostNotification[4004]
|       Failed to send Mattermost Notification
|       System.Net.Http.HttpRequestException: Connection refused (chat:80)
|        ---> System.Net.Sockets.SocketException (111): Connection refused
|          at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
|          at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
|          at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
|          at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
|          --- End of inner exception stack trace ---
|          at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
|          at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
|          at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
|          at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
|          at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
|          at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
|          at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)

Desktop (please complete the following information):

Ombi Version (please complete the following information):

github-actions[bot] commented 1 year ago

Hi!
Thanks for the issue report. Before a real human comes by, please make sure you used our bug report format.
Have you looked at the wiki yet? https://docs.ombi.app/
Before posting make sure you also read our FAQ.
Make the title describe your issue. Having 'not working' or 'I get this bug' for 100 issues, isn't really helpful.
If we need more information or there is some progress we tag the issue or update the tag and keep you updated.
Thanks!
Ombi Bot.

strcrzy commented 1 year ago

this was my issue, i missed the tiny "enabled" box. the port 80 failures were from previous tests. sorry!