ALERT! The community will be read-only starting on April 19, 8am Pacific as the migration begins. Read more for important details.
ALERT! The community will be read-only starting on April 19, 8am Pacific as the migration begins.Read more for important details.
Absent Member.
Absent Member.
5166 views

Webaccess Agent FTF1 dead

I have a couple of customers running GW 8 SP1 on Linux who are still
experiencing a crash with the gwinter agent after having applied the
latest patch dated 11/1. It appears as dead when checking status. It is
happening at least once a day per site. One is running SLES 11 with
tomcat 6, the other OES with novell-tomcat5. Any suggestions would be
greatly appreciated.
Labels (2)
0 Likes
20 Replies
Absent Member.
Absent Member.

mr_jonboy;1900866 wrote:
Where you have for in your script example <insert domain here>. could you please give an example. Trying to get the script to work but keeps saying mta is down when it isn't.

Thanks,

Jon


Jon,
My domain is called gwlindom. To find the process on your server type "ps ax|grep -v grep|grep gwmta" you should see something like this:

27699 ? Sl 0:07 /opt/novell/groupwise/agents/bin/gwmta --home /opt/novell/groupwise/gwlindom

The results are what you are going to use in the script. This shows you the location of your mta, its name and what options your are running with. You will need to plug the results in to the script in place of mine.

Dissecting the process:

Path to the mta service/agent:
I believe the default location should be /opt/novell/groupwise/agents/bin/

See what options you are running:
gwmta --home /opt/novell/groupwise/gwlindom is specific to my server. you may be running other options like --show or whatever.

If you look at the last part of the running process "/opt/novell/groupwise/agents/bin/gwmta --home /opt/novell/groupwise/gwlindom" gwlindom is the domain and its path is /opt/novell/groupwise/gwlindom

When starting the process as root you need to specify the path where the groupwise domain is located. In my case /opt/novell/groupwise/gwlindom is the path to my domain files.

In the script I have it searching for the complete process name to avoid turning up false results. By only searching for gwmta you can turn up results for any process with gwmta in it. If I'm editing a log with gwmta in the file name it it will show up in the basic grep for gwmta. In this event the actual mta could not be running but the script would still think it is because its finding a process with gwmta. That is why the whole process is specified.


In conclusion you should make sure that you are including the switches you are using on your server as well. The only common denominator between our servers is probably the path to the actual mta agent. Anything after /opt/novell/groupwise/agents/bin/gwmta is probably unique to your environment and therefore should be added into the command. I didn't think about that before.

Does that answer your question?
0 Likes
Absent Member.
Absent Member.

When I run command ps ax|grep -v grep|grep gwmta

I get the following :-

631 ? s1 0:05 /opt/novell/groupwise/agents/bin/gwmta @webacc8.mta

I don't have anything for home.

The actual domain is located at /media/nss/gwise/domain so should I add that path in ?

Thanks for your help with this........ I just need to get this sorted as I work for a college and if the agents fall down over a weekend then it means a whole weekend with staff unable to get there emails which really annoys them.

Thanks,

Jon
0 Likes
Absent Member.
Absent Member.

mr_jonboy;1901103 wrote:
When I run command ps ax|grep -v grep|grep gwmta

I get the following :-

631 ? s1 0:05 /opt/novell/groupwise/agents/bin/gwmta @webacc8.mta

I don't have anything for home.

The actual domain is located at /media/nss/gwise/domain so should I add that path in ?

Thanks for your help with this........ I just need to get this sorted as I work for a college and if the agents fall down over a weekend then it means a whole weekend with staff unable to get there emails which really annoys them.

Thanks,

Jon


Jon,
It looks to me like you are not running the mta as the root user. You will need to format the command as the root user would execute it, the cron job will process the caommand as root user would. I'm not sure it would work the other way in the cronjob. I only tested for root.

Reference the "Using MTA Startup Switches" on this link. The --home switch specifies the domain directory, where the mta can access the domain database (wpdomain.db). There is no default location. You must use this switch in order to start the mta.

Based on the information you've given it looks like you might want to try to run this command as root. It looks like webacc8 is the name of your mta. Make sure that you stop the other mta process, you don't want two mta's running.

Start the mta as root. To do this manually you can either use the su - command to open a shell as root to execute or login to the console as the root user. Then run the following:
/opt/novell/groupwise/agents/bin/gwmta --home /media/nss/gwise/domain/webacc8 &

To find the process type ps ax | grep -v grep | grep 'gwmta --home /media/nss/gwise/domain/webacc8'

Assuming this path /media/nss/gwise/domain/webacc8 is correct path to your mta. Remember to kill the other mta if this works.
0 Likes
Absent Member.
Absent Member.

I was able to make the script run by killing the 'original' mta process that grpwise script in /etc/init.d starts when the server is started.

(The snip below was just before I did this, rerunning the script then works when I manually stop mta, oops had two MTAs for a few seconds)

The script steps through properly when adjusted for specific location, etc.

It's not a matter of running as root, because that is what is supposed to happen when the server starts. I need to find out how to adjust or modify how groupwise starts when the server starts.

I am definitely missing something else, because I had the exact same output that Jon had (except for my specific location).

What I really want to do is have a third section (or change over section two) for webaccess, 'gwinter'. I am just paranoid right now of testing gwinter because it is production and we are having it go up and down a few times a day and it's finals this week.

If I can understand how you start your box for groupwise, then I can duplicate that myself.

fyi, I did catch an oops in the location of 'echo "This script will check to see if $SERVICE1 and $SERVICE2 are running...' line in line 11 I believe. I put it After the variables were defined and it runs as intended.

thanks

tim

<<<snip>>> (yeah)
FCC5:/etc/init.d # ./webmail_check3.sh
This script will check to see if gwmta and grpwise are running. If one or both are not running this script will start the processe(s). This script will also log the event and email root,mynamehere.
Log exists

Warning: Running as root
FCC5:
<<<snip>>> (two mta's, oops)
FCC5:/etc/init.d # ps ax|grep -v grep|grep gwmta
10533 ? Sl 0:00 /opt/novell/groupwise/agents/bin/gwmta @fccweb.mta
12069 pts/3 Sl 0:00 /opt/novell/groupwise/agents/bin/gwmta --home /var/op t/novell/groupwise/domain
FCC5:/etc/init.d # ps ax|grep -v grep|grep gw*
10588 ? Sl 0:26 /opt/novell/groupwise/agents/bin/gwinter @webac80b.waa
0 Likes
Absent Member.
Absent Member.

I was able to modify the original script to check for the Webaccess Agent, gwinter.

Since we are mainly concerned about gwinter here, that is what I was focused on after proving to myself that the original script works on my setup.

SLES 10 sp2, GW 8.01 hp2, eDirectory 885 ftf2.

I am pasting in my modified script at the bottom, one that works on my system for gwinter.

What I did was find out how ps and grep parse gwinter as is, no modifications on my system. We use grpwise.sh to automatically start when the server is rebooted.

<<<snip>>>
xxxx:/etc/init.d # ps ax|grep -v grep|grep gwinter
10588 ? Sl 1:47 /opt/novell/groupwise/agents/bin/gwinter @webac80b.waa
xxxx:/etc/init.d # ps ax|grep -v grep|grep 'gwinter'
10588 ? Sl 1:49 /opt/novell/groupwise/agents/bin/gwinter @webac80b.waa
<<<snip>>>

Manually both ways of testing worked. I made sure that my script is executable in /etc/init.d, server name is xxxx, webaccess startup file is webac80b.waa.

I tested the script carefully, since this is on production, by only testing the first 37 lines, replacing elif with fi in a separate script.
That worked so I then used the full script. I was confident that it would work since it parsed for the PID of gwinter successfully, it would process the full script properly, which it has.

<<<snip>>>
xxxx:/etc/init.d # ./gwinter.sh
This script will check to see if gwinter and grpwise are running. If one or both are not running this script will start the processe(s). This script will also log the event and email root,tokeeffe@frederick.edu.
Log file /var/log/novell/groupwise/gwscript_logs/gw_services_12112009.log created
<<<snip>>>

Now, the nitty gritty, I have the original script running on my machine for the gwmta, only modified for domain location which was different and my folder name for the domain itself. I will be testing for other variations to meet our system requirements.

I stopped the gwmta, ran the first script and it restarted the gwmta, wrote the information to the log file And emailed me.

So, I now feel confident that the gwinter script will do the same.

I am pasting in my gwinter script without modifications except for the variables for servername and email address. The rest is the same. The domain folder name and location will need to be adjusted of course for your system.

I am sure that this can be combined, but since we are only interested right now in gwinter because of it going comatoze unpredictably, that is all we are implementing.

The cron job will be adjusted to 5 minutes, which is Not in the current version of the script.

Once I have tested this and played around some more, I will put up a Cool Solution and give credit where due of course.

<<<snip>>>
#!/bin/bash
#
#------------------Change LOG------------------
#v9.5-Added hostname to email notifications
#v9.5.1-Removed $(date) from mail string. Mail was processing $(date) as an email address.
#v9.5.2-Moved first echo line below variables. Replaced gwmta with gwinter. Uses webaccess startup file instead of gwmta home switch.
#
#----------------------------------------------
#
#Edit crontab as root to modify the schedule of this script.
#10,20,30,40,50,00 * * * * /opt/novell/groupwise/gwinter_service_check.sh

#Defined variables
LOGDATE=$(date +"%m%d%Y")
LOG="/var/log/novell/groupwise/gwscript_logs/gw_services_$LOGDATE.log"
SERVICE1='gwinter'
SERVICE2='grpwise'
HOST=host
EMAIL1=root
EMAIL2=email@something.com
VERSION=v9.5.2

echo "This script will check to see if $SERVICE1 and $SERVICE2 are running. If one or both are not running this script will start the processe(s). This script will also log the event and email $EMAIL1,$EMAIL2."

#Check to see if log file exists already, if not create log.
if [ -e $LOG ]
then echo "Log exists"
else touch $LOG ; echo "Log file $LOG created"
fi

#Write header to log.
echo -e "-------------------------$SERVICE1/$SERVICE2 Service Check Log $VERSION-------------------------">>$LOG

#Check to see that gwmta process is running.
if ps ax | grep -v grep | grep 'gwinter' > /dev/null 2>&1
then
echo -e $(date) "$SERVICE1 service is running.">>$LOG
elif
#If service is not running try to restart and send email notification.
echo -e $(date) "Sending Email Notice that $SERVICE1 is not running to $EMAIL1,$EMAIL2">>$LOG
echo -e $(date) "$SERVICE1 is not running, attempting to restart $SERVICE1 now....">>$LOG
echo -e $(date) "$HOST $SERVICE1 is not running! attempting to restart" | mail -s "$HOST $SERVICE1 is down." $EMAIL1,$EMAIL2

/opt/novell/groupwise/agents/bin/gwwinter @webacc80b.waa &
#for script testing only: /etc/init.d/apache2 start
#Import last 15 lines from /var/log/messages to help with troubleshooting.
echo -e $(date) "Importing last 15 lines from /var/log/messages to $LOG now.... \r \r From /var/log/messages:">>$LOG
tail -15 /var/log/messages>>$LOG
echo -e "End /var/log/messages">>$LOG
echo -e "\r">>$LOG
then
#Check to see that service started correctly and send email notification.
ps ax | grep -v grep | grep 'gwinter' > /dev/null 2>&1
echo -e $(date) "$SERVICE1 started successfully">>$LOG
echo -e $(date) "Sending Email Notice that $SERVICE1 restarted successfully $EMAIL1,$EMAIL2">>$LOG
echo -e $(date) "$HOST $SERVICE1 has been restarted successfully" | mail -s "$HOST $SERVICE1 restarted" $EMAIL1,$EMAIL2
else
#If service failed to start send email notification.
echo -e $(date) "$SERVICE1 failed to restart">>$LOG
echo -e $(date) "Sending Email Notice for $SERVICE1 restart failed $EMAIL1,$EMAIL2">>$LOG
echo -e $(date) "$HOST $SERVICE1 restart failed!" | mail -s "$HOST $SERVICE1 restart failed" $EMAIL1,$EMAIL2
#Import last 15 lines from /var/log/messages to help with troubleshooting.
echo -e $(date) "Importing last 15 lines from /var/log/messages to $LOG now.... \r \r From /var/log/messages:">>$LOG
tail -15 /var/log/messages>>$LOG
echo -e "End /var/log/messages">>$LOG
echo -e "\r">>$LOG
fi
0 Likes
Absent Member.
Absent Member.

Tim,
I'm glad you were able to get the script working to suit your needs. I've already posted a cool solutions article here.

Someone posted a reply and I found that I need to change the second part of the script to search for gwinter(webaccess) and gwia process are running instead of searching for grpwise status = running. It can return invalid results.

I might recommend grepping for more than just gwinter as any process that contains "gwinter" in it would return results. For example ps ax|grep -v grep|grep 'gwinter @webac80b.waa' will only return results for the specific process you are looking for.

I'll update with my latest changes after I've finished writing and tested it .
0 Likes
Absent Member.
Absent Member.

jmarton;1885447 wrote:
On Sun, 08 Nov 2009 00:43:33 +0000, MarcRosenthal wrote:

> I have a couple of customers running GW 8 SP1 on Linux who are still
> experiencing a crash with the gwinter agent after having applied the
> latest patch dated 11/1. It appears as dead when checking status. It is
> happening at least once a day per site. One is running SLES 11 with
> tomcat 6, the other OES with novell-tomcat5. Any suggestions would be
> greatly appreciated.


I would suggest the customers open SRs with Novell (or you open an SR on
their behalf).

Joe,
As a knowledge partner you should know the point of a forum is exchange ideas about issues and problems, stop pointing out the obvious we all know that we should open an sr. Don't point out the obvious, instead actually make a sugestion on how to fix the problem.
Peter


--
Joe Marton
Novell Knowledge Partner
0 Likes
Absent Member.
Absent Member.

On Wed, 13 Jan 2010 17:36:02 +0000, ptomasi wrote:

>> As a knowledge partner you should know the point of a forum is exchange
>> ideas about issues and problems, stop pointing out the obvious we all
>> know that we should open an sr. Don't point out the obvious, instead
>> actually make a sugestion on how to fix the problem. Peter


Sometimes there is no fix, as was the case with the original posters
problem when he posted his question back in November. Back in that case
the only option was to open an SR. In fact, whenever a knowledge partner
suggests this, the reason is usually that either no fix is available at
all so the more people that open SRs the more pressure Novell feels to
fix the problem, *or* there is a fix but is not publicly available and
can only be obtained by opening an SR.

Thus the best answer back in November was in fact my response. Open an
SR.




--
Joe Marton
Novell Knowledge Partner

Joe Marton Emeritus Knowledge Partner
0 Likes
Absent Member.
Absent Member.

So now that HP1 is out, is this fixed? I see a few gwinter crashes fixed in the readme but it's not very specific.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.