Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

[BUG] Notifications aren't sent #18

Open
stefanelul2000 opened this issue Jun 10, 2021 · 25 comments
Open

[BUG] Notifications aren't sent #18

stefanelul2000 opened this issue Jun 10, 2021 · 25 comments
Labels
bug Something isn't working

Comments

@stefanelul2000
Copy link
Contributor

Describe the bug
Discords notifications are not being sent by all backup jobs.

To Reproduce
Setup multiple jobs in Veeam and setup them to send notifications.

Expected behavior
Every job should send a notification.

Relevant part of log/debug.log
Don't have it right now, will post it a bit later.

RemoteDesktopManagerFree_9Ql4yxxE3A

This backup sends notifications without any issue.

RemoteDesktopManagerFree_Er5Z4ZssHb

This backup does not send any notification at all.
@stefanelul2000 stefanelul2000 added the bug Something isn't working label Jun 10, 2021
@tigattack tigattack changed the title [BUG] [BUG] Notifications aren't sent Jun 10, 2021
@tigattack
Copy link
Owner

Hi @stefanelul2000. Once you've attached logs I can take a look into this for you 👍

@stefanelul2000
Copy link
Contributor Author

debug.log

I have attached the logs. Hopefully they are the right ones as they do not mention from what Veeam backup job they origiate,

@stefanelul2000
Copy link
Contributor Author

debug.log

Another job finished just now. This is the latest log for that job

@stefanelul2000
Copy link
Contributor Author

stefanelul2000 commented Jun 12, 2021

I saw something in the logs. Line 56 in file "DiscordVeeamAlertSender.ps1" needs to be changed to "Import-Module Veeam.Backup.PowerShell"

Issue is similar to #17

Edit: That didn't do anything.
Another important thing to point out is this
"WARNING: This cmdlet is no longer supported for computer backup jobs. Use "Get-VBRComputerBackupJob" instead.
You cannot call a method on a null-valued expression."

tigattack added a commit that referenced this issue Jun 12, 2021
@tigattack
Copy link
Owner

Didn't see your update; good thing to sort anyway though. Thought I sorted that one!

So does this line match yours then? DiscordVeeamAlertSender.ps1#L56
Do you see anything else in the logs after making that change?

I'm aware of the warning, thanks. A lot of this needs a rewrite, I'm just quite short of time. Progress is happening, just quite slowly 😄

@stefanelul2000
Copy link
Contributor Author

Yeah, the line matches mine now but it still does not work. I am unsure why.

@tigattack
Copy link
Owner

Do you see anything else in the logs after making that change?

@stefanelul2000
Copy link
Contributor Author

The same errors as before. But without the line with the snappin module missing.

@stefanelul2000
Copy link
Contributor Author

debug.log

This is another log after that change. Still the same errors as before. I am not really sure what is wrong.

@tigattack
Copy link
Owner

Could you try the following and show me the output?

  1. Open PowerShell on your Veeam server
  2. Run Import-Module Veeam.Backup.PowerShell -Verbose

@stefanelul2000
Copy link
Contributor Author

Import-Module-Verbose.txt

I have attached the output of the command.

@tigattack
Copy link
Owner

tigattack commented Jun 14, 2021

Please try replacing your DiscordNotificationBootstrap.ps1 with this (make sure the filename isn't changed). Trigger a job and please attach the new debug.log once the script has run.
It seems it's failing to get the session information but this should confirm it.

If that's the case, I'm currently not sure why that would fail, but once it's confirmed I'll see if I can work out what's happening.

@stefanelul2000
Copy link
Contributor Author

I have update it with the provided file. I will report as soon as the next job runs.

@stefanelul2000
Copy link
Contributor Author

debug.log

I have attached the latest logs.

@stefanelul2000
Copy link
Contributor Author

Hello, do you have any update on this?

@tigattack
Copy link
Owner

Apologies, I've been quite busy lately. I'm hoping to look into this some more ASAP as I'm currently unsure why it's failing.

@stefanelul2000
Copy link
Contributor Author

Ok, sure. Let me know if you have any update.

@tigattack
Copy link
Owner

@stefanelul2000 Apologies for the delay, life has been very busy, but I haven't forgotten about this.

A collaborator and I are investigating the issue and I realised I've not actually confirmed which version you're running.
Are you running the latest release or have you cloned one of the branches?

@stefanelul2000
Copy link
Contributor Author

@tigattack

I am running on 1.5 I believe with small modifications. The ones mentioned in this ticket.

@tigattack
Copy link
Owner

Great, thanks Stefan.

@stefanelul2000
Copy link
Contributor Author

I have also checked, since 12.06.2021 There haven't been any notifications sent to my discord even thought the script is still enabled on the veeam server.

@stefanelul2000
Copy link
Contributor Author

veeam-discord-log.txt

This is the latest log.

@tigattack
Copy link
Owner

Ah, that's very useful actually, seems it's failing to get job and session details. Thanks.

I'll spend some more time on this this weekend and hopefully have something for you to try.

@stefanelul2000
Copy link
Contributor Author

@tigattack Do you have any update for me?

@tigattack
Copy link
Owner

Hi @stefanelul2000, could you please try the latest release and let me know if the issue persists?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants