Thursday, April 03, 2008

Websense DC agent won't start.

From polywogsys here is how to fix a "1067: Service terminated unexpectedly" error when trying to restart the Websense DC agent on Windows 2003


cd \path\to\websense\bin
XidDCAgent -s
XidDCAgent -c
Press enter after a little while and eventually the command prompt will respond. Also, you may notice that the service is now running after the last command. I restarted it to make sure it can start automatically on reboot.

Initially I thought that maybe someone changed the password of our websense user, so I reset it, reset the password of the service and within Websense, but that did not clear it up. I also noticed that DEP was killing the Database agent, so I turned that off. Eventually I found this post and it saved the day.

Hope this helps!

Doug

Thursday, January 31, 2008

How to compile Nagios plugins for Solaris 10 Sparc

Time to setup monitoring for our new Sun Fire T2000 servers running Solaris 10 and Oracle.... That being said, I began compiling the nagios plugins in the normal way, however, I discovered there a couple tweaks on Solaris 10.

Here's a way to get it done... BTW, check_disk does NOT work with ZFS zpools yet...

Log in as a normal user acount. Invoke bash shell.
bash

Un-tar the archive.
gunzip nagios-plugins-1.4.11.tar.gz tar -xvf nagios-plugins-1.4.11.tar
Set path as follows.
PATH=$PATH:/usr/sbin:/usr/sfw/bin:/usr/ccs/bin

Mysql libraries are compiled using Sun's C compiler and have incompatible flags. Skip the mysql package in configure. If you absolutely need check_mysql, then consider using Sun Studio to compile the plugins.
./configure --without-mysql

Run gmake instead of make.
gmake

Su to root. set path, run gmake install
su
PATH=$PATH:/usr/sbin:/usr/sfw/bin:/usr/ccs/bin
gmake install

Done. Now you can navigate to /usr/local/nagios/libexec to test them out. You should be able to tar them up and place them on any Solaris 10 sparc server and they should work. They will need to be re-compiled for Solaris 9 however.

Now here is what not to do...

-bash-3.00$ PATH=$PATH:/usr/sbin

-bash-3.00$ ./configure
checking for a BSD-compatible install... build-aux/install-sh -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... no
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

-bash-3.00$ PATH=$PATH:/usr/sfw/bin
-bash-3.00$
./configure
... Sucess (or so I think...)

-bash-3.00$ find / -name make 2>&1 | grep -v cannot
/usr/share/lib/make
/usr/ccs/bin/make
/usr/xpg4/bin/make


-bash-3.00$ /usr/xpg4/bin/make

make all-recursive
bash: make: command not found
*** Error code 127
make: Fatal error: Command failed for target `all'


*HINT*
http://forum.java.sun.com/thread.jspa?threadID=5096509&messageID=9331271
-bash-3.00$ PATH=$PATH:/usr/ccs/bin
-bash-3.00$ /usr/xpg4/bin/make
....
*** Error code 255
make: Fatal error: Command failed for target `libgnu.a'
Current working directory /export/home/datactr/nagios-plugins-1.4.11/gl
*** Error code 1
make: Fatal error: Command failed for target `all'
Current working directory /export/home/datactr/nagios-plugins-1.4.11/gl
*** Error code 1
The following command caused the error:
failcom='exit 1'; \
for f in x $MAKEFLAGS; do \
case $f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
list='gl lib plugins plugins-scripts plugins-root po'; for subdir in $list; do \
echo "Making $target in $subdir"; \
if test "$subdir" = "."; then \
dot_seen=yes; \
local_target="$target-am"; \
else \
local_target="$target"; \
fi; \
(cd $subdir && make $local_target) \
|| eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
make "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'
Current working directory /export/home/datactr/nagios-plugins-1.4.11
*** Error code 1
make: Fatal error: Command failed for target `all'

Ah Ha... Re configure...
-bash-3.00$
./configure
-bash-3.00$ make clean
-bash-3.00$
gmake ....
gcc: language strconst not recognized
gcc: check_mysql.c: linker input file unused because linking not done
mv: cannot access .deps/check_mysql-check_mysql.Tpo
gmake[2]: *** [check_mysql-check_mysql.o] Error 2
gmake[2]: Leaving directory `/export/home/datactr/nagios-plugins-1.4.11/plugins'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/export/home/datactr/nagios-plugins-1.4.11'
gmake: *** [all] Error 2


-bash-3.00$ ./configure --without-mysql
-bash-3.00$ gmake clean

-bash-3.00$ gmake
-bash-3.00$ su
# PATH=$PATH:/usr/sbin:/usr/sfw/bin:/usr/ccs/bin

# gmake install
Tuesday, January 29, 2008

Installing Openfiler 2.2 on Dell Powervault 715N

So, after re-organizing some stuff in our datacenter, we pulled an old Powervault 715n from the racks as it has been shut down for a while and just taking up space. Being somewhat adventurous, I decided to embark on the journey to get Openfiler installed on it. If you have a Powervault 715n, you probably already know it is a headless machine with two NICs and a serial console. Oh, and to make it trickier, no CD ROM drive...
Armed with a cisco roll (null modem) cable, a crossover cable, some patience and an extra machine running Vmware Server, I was able to get Openfiler to PXE boot and install via a serial port.

Here's how:

  1. First, download the latest stable Openfiler 32bit ISO.
    http://www.openfiler.com/download/
  2. Either setup a PXE server or download a PXE server appliance. I found PXE Installer and Recovery Appliance to work well. (instructions below will cover the Appliance)
    http://www.vmware.com/appliances/directory/371
  3. Either transfer the ISO to the Vmware appliance or attach it to the cdrom of the vm.
  4. Mount the ISO on the VM and share the mount point with NFS. (add it to the /etc/exports file)
    /mnt *(rw,sync,no_root_squash)
  5. Start nfs and portmap
    /etc/init.d/portmap start
    /etc/init.d/nfs start
  6. Make a directory under /tftpboot called openfiler.
    mkdir /tftpboot/openfiler
  7. Copy initrd.img and vmlinuz from /images/pxeboot on the ISO to /tftpboot/openfiler
    cp /mnt/images/pxeboot/initrd.img /tftpboot/openfiler
    cp /mnt/images/pxeboot/vmlinuz /tftpboot/openfiler
  8. Now edit the /tftpboot/pxelinux.cfg/default file and add the following to the top. If there is a "default whatever" line, comment it out...
    serial 0 115200 0
    default serial
  9. Then add the following to the same file after the label 4 stanza
    label 5
    kernel openfiler/vmlinuz
    append initrd=openfiler/initrd.img text ramdisk_size=8192 console=ttyS0,115200n8
  10. Now bridge the PXE_Installer-Recovery VM to a nic off your corporate network!!! Connect the crossover cable to the NIC and connect the other end to the Powervault. Start dhcpd:
    /etc/init.d/dhcpd start
  11. Attach your serial cable to the PC that you will use to control the install. Fire up a serial port terminal and configure it to 115200,8n1 XON/XOFF.
  12. Turn on the Powervault and ensure you are seeing the POST messages from boot. Press F2 When you see "Press F2 for Setup function. You may need to hit it a couple of times to get your point across...
    Now press 3 for Reinstallation, the server will reboot and after some time, you should see the NICs searching for a DHCP address. If sucessfull, you should see a bunch of hard to read output in a column on the left of the screen and a prompt. Press 5 and enter.
  13. Now you should see the standard output of linux boot processes kicking off. You should come up to a prompt asking for the install source. Select NFS.
  14. Now, select the interface that is attached to the crossover cable and get a DHCP address.
  15. On the next screen, type in the address of the NFS server "192.168.100.1" and the path, "/mnt" Select Next.
If everything is successful, you should be able to navigate through Anaconda and install Openfiler. It may take a couple of tries to get the system setup the way you want boot partition wise, but in the end, you should have a useable system. You then will be able to use the serial port to attach to the console of the device for configuration later.

Good Luck!!
-Doug
Friday, January 18, 2008

Swftools on Red Hat/Centos 5

Since there was no RPM for RHEL 5 for swftools, I decided to compile one for a project at work.
  • Install the src RPM on your redhat build machine. Also, install the rpmforg-release package as you will need to install another package to compile the code.
  • Now, install libjpeg-devel t1lib-devel freetype freetype-devel giflib and giflib-devel
NOTE: t1lib-devel is in DAG's repo

yum install libjpeg-devel t1lib-devel freetype freetype-devel giflib and giflib-devel

All of the dependencies should figure themselves out...

  • Now, build the package:
    • i386 (32-bit)
      • rpmbuild -bb --clean --define "rhel 5" -vv --target i386 --define "_smp_mflags -j1" --define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" --define "_initrddir %{_sysconfdir}/rc.d/init.d" --define "debug_package %nil" --define "dist el5" --define "disttag el5" --define "el5 1" --define "el5i 1" /usr/src/redhat/SPECS/swftools.spec
    • x86_64 (64-bit)
      • rpmbuild -bb --clean --define "rhel 5" -vv --target x86_64 --define "_smp_mflags -j1" --define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" --define "_initrddir %{_sysconfdir}/rc.d/init.d" --define "debug_package %nil" --define "dist el5" --define "disttag el5" --define "el5 1" --define "el5a 1" /usr/src/redhat/SPECS/swftools.spec


If all goes well, you should have your binary rpm in /usr/src/redhat/RPMS

Cya & Good Luck!!

Doug

Friday, January 12, 2007

Dothill + SAN Hell = Dothell!

I hate Dothill!!! Their Sannet II line of products suck... We have had to replace at least 5 Controllers in the past year. Now I am battling Parity errors on the logical drives and cant seem to keep a filesystem stable. Ugh... It's sad that the serial numbers reported by the devices don't match what is printed on their labels, so if you need to order a new controller, you need the chassis serial which is wrong and the controller serial, which is also wrong...
Saturday, September 16, 2006

Test post using Drivel on Ubuntu

I have been sick all day so I thought I would play around with some blog apps for linux. Blogtk seem a little lacking right now and gnome-blog really didn't work...

I really should try to get something done today however... Maybe I'll clean up the house before my wife comes home from work. My son is just sleeping away after I gave him some tylenol for his cold. He'll be two months old tomorrow, and all I can say is, Wow! The last two months have been a blur... I hope things slow down and I don't just wake up one day to see him leaving for college...

Oh well, time to get my "Mr. Mom" chores done!!!
Friday, September 15, 2006
First post on my new blog...

Interesting day though, had a performance review, will be getting some sort of raise. My 2 month old baby boy is sick with a cold and I will be taking care of him tonight since my wife is working. We also had an interesting meeting with our Sun reseller and a Sun StorageTek rep regarding some options for our production Oracle DB server replacement. Time to get rid of those old 420R's and their A1000 disks now that they are showing their age and also not a supported config by Solaris 10.

I am also getting interested in ZFS and QFS. I think I might play around with them a little. I'm not sure of the timetable for cluster support with ZFS, and who knows if Sun will charge extra for it either. I seriously doubt that they will release a free cluster file system, but hey, who knows?