Wednesday, September 18, 2013

GENTRAN:Server Notifications on stalled events

Do you have an event that occasionally stalls. There are many reasons an event might stall: network errors, unexpected data values and poor code just to name a few. My goal here is not to give you or anyone a hard time about that one program you wrote like 5 years ago; however, I'm sure it would be fun. My goal is to show you how to setup a notification so that the next time it does get stalled your not stuck with 3 or 4 days in unsent transactions and a pissed off boss.

First take note of the Session and Command that is stalled:

Next, you will have to stop the event that runs the session. If the event is currently stalled you will have to stop and restart the "GENTRAN:Server Executive" service. This can either be done from Services under the Control Panel, or from the command prompt using the following commands.

NET STOP "GENTRAN:Server Executive"
NET START "GENTRAN:Server Executive"

Once you are able to suspend the event under the Events tab you will be able to edit the session under the Sessions tab. Set the Notification flag and them set the number of minutes the process should be allowed to run before it sends you the notification. If you are uncertain, run the event and see how long it normally takes to complete.


Now it's time to setup the notification. The Audit Number is 1-3-1591, you will need this to setup the notification and it normally looks like the following in the Audit Log.


Open Gentran Server for Windows Configuration and select the "Audit/Notification" tab. Click on the "Notifications" button, the Gentran Notifications windows will open. Create a new Notification.


Select an operator to receive the notification.


Select OK and your all done. Note if you do not have operators or notifications setup they will have to be setup first. Do to the number of steps that will have to be a topic for a future post.

5 comments:

  1. Thanks Stephen! I've had this happen from time to time and this will really help in correcting the issue in a timely manner.

    ReplyDelete
  2. Stephen, How could I used this here to monitor the Gentran services? Which would be the right Audit Number Notification to use if one of them got hung or crash for whatever reason.. Thanks,

    ReplyDelete
    Replies
    1. Carlos, because Gentran couldn't send the notification if the services stalled, the notification would never go out. You need to setup a server monitor outside of Gentran like the Windows Server Resource Kit or a custom script. There are plenty of good script ideas through Google that can tell you if a service is running and if it has crashed; however, if the service is still running but unresponsive this might require a bit of creative thinking. My idea would be a script that monitors the SQL log and will notify you if an entry hasn't been posted in more than an hour. Then simply make sure that 1 session in the process controller is running at least once per hour, all day, every day. If it didn't run during the last hour you will know something is up. Thank you for reading. - Stephen

      Delete