Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
MediaBin - Email notification when service stops
System
Our MediaBin has a nack of stopping the MBPServer Service without any notification or prior warning and we have absolutely no idea why. In reaction, I'd like the server and application owners to receive a notification via email. I don't think MBin has this feature, does it? If not, I'm going to write a script to connect to the server every hour or so and if it can't connect, I'll recycle the service automatically. Any other ideas? Is this just us or does anyone else have this issue?
Find more posts tagged with
Comments
Migrateduser
You could instead run the script as a cron job (or "at" job in Windows) to poll the service every minute even and if something's wrong, use sendmail (Unix) or blat (Windows) to send email to an administrator.
I prefer this method to the one you suggested only because if there is some sort of network outage between the machine where you have the script running and the MB server, it would trigger an "MB outage" email.
Dave
Migrateduser
Hi Dave,
Thanks for responding, I appreciate it. I was not suggesting an additional machine in the equation but instead, placing a cscript on the MediaBin server itself. Then, I would create a Windows scheduled task to fire the job at a given time frame.
Also, why would you not automatically recycle the MBPServer service? Is that a bad idea?
Thanks!
Stacy
Migrateduser
Okay, I misunderstood your initial post, then. So, you're placing the script on the same server as MB -- how would you check to see if it's up, though? Since you're on Windows, you could do "net start" to see if the service is listed as running and you could also either telnet to expected ports or (easier) do a netstat -an to see if the ports are listening.
But why do this only every hour? This would be extremely gentle on CPU since it's basically just polling... so maybe run it every 5 minutes or so and send a notification then.
Migrateduser
Hi Dave,
Thanks for responding. Our MediaBin server and network connectivity is stable and consistent. Very seldom has the server actually crashed or gone offline by falling off the network. On the flip side of the coin, the actual "MediaBin Server Service" in Windows has a nack of dying once in a while. I figured that I would write a script using the MBPScriptModel2.dll type lib to connect to the server and verify it's up and running. Something like this.
''' I'll probably need an error handle in here somewhere too '''
Dim m_mediaBinSession as new MBSession
With configFileClass ''' Custom Type which stores the credentials '''
m_mediaBinSession.Logon .Server, .Domain, .Login, .Password, .Port
End With
If m_mediaBinSession.IsLoggedOn = False Then
'''Send admin alert '''
End If
m_mediaBinSession.LogOff
lyman
The MediaBin service actually works by monitoring the MediaBin process, therefore under normal circumstances the service should restart even if the executable halts. However, there really is not a good explanation for the service going down! I suggest opening a support case so we can figure out what the underlying problem is as this is not how things are supposed to behave!
Cheers,
Lyman Hurd
Migrateduser
Hi Lyman,
Thanks for your response. Unfortunately, we have raised this issue with support before and never came to any kind of resolution. I would rather that I just build a work around rather than get the support team involved. We've collaboratively looked at many lines in the event viewer, the mbp.log (and all the others we have turned on) and never seem to get any kind of hint or resolution.
The service used to lock up on almost a weekly basis and after we rebuilt a new server, now it only happens ~ twice a month.
Thanks for your recommendation though.
Stacy