Apr 252012
 

We all know Putty and it has been a very useful tool over the years (on windows that is). However there are some features that are really lacking, especially if you compare it to the likes of KDE Konsole or iTerm on the Mac. The feature I miss most is the ability to use tabs. Now there are a lot of alternatives out there that are all very fancy looking and, most of the times, based on .NET.

I’ve found all of them to crash on me at least once a day. All, with one exception. The exception is called putty-nd. It is not fancy looking, but does what it should do. Now if it could only detach and reattach tabs…

 Good tabbed putty quest

Get it here.

Apr 232012
 

Because of some NFS issues I needed to synchronize the unix user account IDs of my various documentum installation owner accounts. I had expected it to be as easy as changing the passwd file and updating the rights. However things are slightly more complicated. Here is what I did:

usermod -u 1234 dmadmin
cd /opt/
chown -R dmadmin /opt/documentum
chown -R dmadmin [path_to_data_directory]

This all seems to work, however you will notice that as soon as you try to logon you will get “logon denied” messages ruining your day. The simple and obvious fix for this one is to execute the following as root:

sh /opt/documentum/dba/dm_root_task

Oh so obvious, but it took me some time and a little help to get there.

 Posted by at 14:08 Documentum, Just bloggin' No Responses »
Jul 262011
 

So OS X Lion came out. I rushed to the AppStore to get myself a fresh copy and install it on my (almost fresh) install of Snow Leopard. After the download I started the installation and within no time I was all set up with Lion. Everything seemed smooth.

Then I remembered the new FileVault feature coming with Lion. A new encryption technology which would (finally) be able to encrypt the whole hard disk and would improve the TimeMachine backups. I went over to the correct system settings panel and was informed that I first had to remove the old encryption. So I did.

The next day (enabling and removing encryption can take some time) I rebooted the machine and went back to the system settings panel. This time I could enable the new FileVault. After clicking I was informed that, although a reboot was required, I could continue to use my Mac until the encryption process was done. So I rebooted the PC again.

And then nothing happened. Nothing? Well there was this grey screen with a grey apple on it and below it there was this tiny wheel turning and turning and turning. I throught maybe this is the encryption process doing some initial work, so the kernel and all are encrypted. I left it running for around eight hours. Then I forced a shutdown.

The result was the same. Booting into save mode and running fsck showed errors on the partition that all could be fixed. However as soon as I mounted the root partition the journal was replayed and the errors popped up again. My attempts at removing the journal all failed. What worked was a save boot (pressing the shift key during the boot).

I tried to boot into recovery only to find out that the recovery partition had not been installed! And no, I am not using bootcamp (which seems to be a reason for not getting the recovery partition).

My current situation is that my MacBook is foobar. I have decided to reinstall Lion completely, so I had to download it again from the AppStore (click everything with alt is the trick here) and get the dmg (it is hidden in the Lion installation app, but you can find it if you press “show contents”) on a USB.

And no, this does not remind me of Windows or Linux. This is the worst experience I have ever had.

Update: I reinstalled Snow Leopard, so I could do a fresh install of everything. With the fresh Leopard the Lion installer refused to start, talking about being unable to download additional files. To fix this I had to clean the PRAM and NVRAM.

Update: today, after 5 days of installation trouble, making backups, reformatting and waiting for filevault, I finally have a working Lion installation that works and has everything installed and configured the way I want it. During the filevault encryption I had around 5 spinning balls of death / total freezes, but it worked. It seems that the filevault encryption can put too much load on the hard disc, causing he whole system to freeze. Once it is done everything runs smooth.

 Posted by at 10:18 Just bloggin', OS X No Responses »
Jul 192011
 

You know this situation where you install tomcat in “some location” with “some user” being able to stop and start it? Not going the official (linux) way and installing it through your package manager?

So I have made a small script, on Solaris, to have stop and start functionality in those locations for that special user (in my case dmtomcat):

# tomcat stop und start Skript
#

# Some things that run always
set -e
NAME=tomcat
TOMCAT_TIMEOUT=60
TOMCAT_USER=dmtomcat

# Directory where the Tomcat 6 binary distribution resides
CATALINA_HOME=/opt/tomcat/current

# Define other required variables
export CATALINA_PID="$CATALINA_HOME/temp/$NAME.pid"
CATALINA_SH="$CATALINA_HOME/bin/catalina.sh"

# Escape any double quotes in the value of JAVA_OPTS
JAVA_OPTS="$(echo $JAVA_OPTS | sed 's/\"/\\\"/g')"

if [ `/usr/xpg4/bin/id -u` -ne `/usr/xpg4/bin/id -u $TOMCAT_USER` ]; then
        echo "You need to be" $TOMCAT_USER "to run this script"
        exit 1
fi

# Carry out specific functions when asked to by the system
case "$1" in
  start)
    # Test to see whether tomcat is already running
    if [ -f "$CATALINA_PID" ]; then
        # We have a pid file, not good, do some sanity
        PID=`exec cat $CATALINA_PID`
        PID_USER=`ps -ef | grep $PID | grep tomcatjava | awk '{ print $1}'`

        # Is the pid assigned to the tomcat user and using tomcatjava?
        if [ "X"$PID_USER == "X"$TOMCAT_USER ]; then
            echo "It seems that tomcat is already running with pid" $PID
            exit 1
        fi

        # PID file was there but the above sanity check failed
        # So we can remove the PID file
        rm $CATALINA_PID
    fi

    if [ "$2" == "clean" ]; then
        echo "** Cleaning tomcat work directory"
        rm -rf $CATALINA_HOME/work/catalina/localhost
    fi

    echo "** Starting tomcat service..."
    $CATALINA_SH start
    echo "All done. Please enter 'tailout' to monitor the startup process"
    ;;
  stop)
    echo "** Stopping tomcat service..."
    echo "** Will take" $TOMCAT_TIMEOUT "seconds"
    $CATALINA_SH stop $TOMCAT_TIMEOUT -force
    ;;
  restart)
    echo "** Stopping tomcat service..."
    echo "** Will take" $TOMCAT_TIMEOUT "seconds"
    $CATALINA_SH stop $TOMCAT_TIMEOUT -force

    if [ "$2" == "clean" ]; then
        echo "** Cleaning tomcat work directory"
        rm -rf $CATALINA_HOME/work/catalina/localhost
    fi

    echo "** Starting tomcat service..."
    $CATALINA_SH start
    echo "All done. Please enter 'tailout' to monitor the startup process"
    ;;

  *)
    echo "Usage: tomcat-service {start|stop|restart} [clean]"
    echo
    echo "       If the clean option is provided the tomcat work"
    echo "       directory will be cleaned before starting the service"
    exit 1
    ;;
esac

exit 0
 Posted by at 12:31 Documentum, Just bloggin' No Responses »