Tecknat medlemskap på gym

Jag har registrerat mig på ett gym! Gymmet har nyöppnat som granne till vårat hus. Som bilden visar fanns en hel del intresserade människor utanför för att registrera sig på öppningsdagen. Träningsintresset verkar vara högt!

Nu har jag inte har några ursäkter att inte träna. Nu är det dags att starta det ”nya” liv som jag har funderat på så länge men aldrig genomfört pga att jag arbetar mycket och är riktigt lat. Den här gången är det på riktigt och jag är motiverad till att försöka arbeta mindre och prioritera mig själv och min familj bättre. Träningen skall hjälpa mig att orka med familjerlivet som kommer kräva mer av mig fysiskt.

Det var riktigt trevligt med ren och fräsh utrustning / lokaler måste säga.

0

En son är född

Några av er vet redan att vi har idag fick vårt andra barn. Det blev en liten pojke den här gången.

Denna födelse var inte lika intensivt som när vi hade Ebba. Men vi kämpade ändå lite för att få ut honom. Det visade sig att han hade navelsträngen runt halsen och övervakningsnivåerna sjönk under förlossningen.

Men trots allt gick det bra och vi hade stort stöd under hela processen från alla fantastiska barnmorskor och läkare på Östersund sjukhus. Jag fick chansen att klippa navelsträngen här gången.

Vi kommer att kalla honom Måns.

0

Ny Cykel

Jag har alltid älskat att cykla. Denna sommar har varit fantastiskt med bra väder och många timmar på cykeln till och från arbetet. Min nuvarande cykel är nästan 10 år gammal och har tjänat mig väl men efter den senaste servicen kände jag att det var dags för en ny cykel.

Det är allt som oftast utförsäljning av cyklar i slutet av sommaren, så vi besökte den lokala sportaffären och jag fastnade för den här Scott cykeln. Det är inte den dyraste eller coolaste men den passar mina behov.

Nästa sommar kommer jag att försöka cykla ännu mer. Kanske plocka upp min dröm och intresse kring att försöka tävla i cykling.

0

Call HostServiceSystem.Start for object serviceSystem on vCenter Server servername failed.

Enabling SNMPD deamon on ESXi 5.1, after migration/upgrade from 4.0, is giveing me an error.

”Call HostServiceSystem.Start for object serviceSystem on vCenter Server servername failed.”

I found a workaround on below url, it turns out that migration tools is adding some unsupported characters to the snmpd.xml files that the service doesnt like. So have you like me upgraded and needed to snmpd deamon running, follow the instruction in below blogpost. You can enable/restart the service from vSphere client, so you dont have to restart all services.

http://www.matthewjwhite.co.uk/blog/2010/02/10/esxi-enabling-snmp/

0

Error 25004. Setup failed to create the vCenter Server repository

Iam in the running of upgrading an large vSphere farm to version 5.0 from 4.x. During the install of vCenter on a new server (using the migration-tool from VMware) i come across some nasty problems. First of all i had the database upgrade running forever and the transaction logs grew by almost 100gb.

After the upgrade finished i got and error telling me ”Error 25004. Setup failed to create the vCenter Server repository”. It turns out that the database upgrade was not successful and that the error is a sign of just that. I needed to roll back an database update and retry the upgrade. But first of all i truncated the performance data from the tables. All the gigabytes in the databases are performance data, we really don’t need old data. So i truncated the data and reinstalled vSphere. This time upgrade was fast and i didnt get any error message.

Here is VMwares KB article about this error message.
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2020504

I will later write something about the truncation of the performance data.

0

java.security.UnrecoverableKeyException: Cannot recover key

Today i ran into a problem while developing a jsp page for a customer. It uses Tomcat with keystore for ssl.

When starting Tomcat, i recived the following errormessage in the logfile.
java.security.UnrecoverableKeyException: Cannot recover key

I found that the error occurs when the keystore and key-entry passwords are different. To resolve this problem, you have to remove all the old certificate and request files. You must generate a new keystore, key-entry and CSR. While recreating the keystore, use the same password for the keystore and the key-entry and the problem should be resolverd.

0

Find leftover .vswp files in datastores

I have had problems with systems leaving vswp files on datastore if a migration / system was hung and guest / host rebooted.

I found an great way to find all the leftovers, it easy to clean them out afterwards. They can take up lot of space in big prod enviroments.

For this i use the PowerCLI addon to my vmware farms.

Connect-VIServer "localhost" -User "yourusername" -Password "yourpassword"

dir vmstores:\ -Recurse -Include *.vswp.* | Select Name,Folderpath

0

How to fix virtual disk is in link-cloned mode error message

Have you like me got the cryptic message from VMware vCenter ”A general system error occurred: The virtual machine has virtual disk in link-cloned mode that prevents migration” when trying to migrate an machine?

I have found a great site that shows how to fix the problem thats most likely caused by un-committed snapshots not listed in the SnapShot Manager.

http://networkadminkb.com/KB/a347/how-to-fix-virtual-disk-is-in-link-cloned-mode-error-message.aspx

0

Telia SMTP error in MountainLion

I have had a problem sending emails (via Telia) from my Mac since i upgraded to MountainLion. It turns out that Mail.app have a different setup than previous versions.

As standard. the SMTP settings is set to user default SMTP ports (25, 465, 587) that doesnt work well with Telias SMTP relay server (smtprelay1.telia.com) and iam to lazy to get an telia mailadress to use as smtp-autentication to there regular smtpserver.

When i tried to send an email, i got ”503 wrong state for EHLO command” as a result in the mail-log.

It turns out theres an easy fix, by luck i tried pressing the ”Custom port” and setting the value to 25 (thats the standard smtp port), and voila, the email was sent successfully!

0

Increase diskspace on an LVM volume

Today i was researching howto increase diskspace on an linuxbox that was running LVM. I have done this before but lost the commands. So here is a quick guide for my own remindings.

First of all, run the command vgs to get information about your volume groups (VGs)
srv01:~# vgs
VG #PV #LV #SN Attr VSize VFree
srv01 1 6 0 wz--n- 29.76g 3.88g

Then run lvdisplay to show your current lv-volumes.
srv01:~# lvdisplay
--- Logical volume ---
LV Name /dev/srv01/tmp
VG Name srv01
LV UUID xxxxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxxxx
LV Write Access read/write
LV Status available
# open 1
LV Size 680.00 MiB
Current LE 170
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:4

Now we know our lv’s name in this case /dev/srv01/tmp. now its time to increase the space. the command below increases the volume by 300mb. Check your VGs to that you have enough space left.
lvresize -L+300M /dev/srv01/tmp

When this is done, you can run the command df -h to check your diskspace, as you can see the space has not increased on the mounted filesystem. You will have to run resize2fs in order to change the filesystem space. my /tmp folder has its filesystem under /dev/dm-4 as shown in the df -h command. resize the ext3 volume to the same size as your lvm.
resize2fs /dev/dm-4 680M

Done!

0

Install NRPE and Nagios plugins on Debian

Lately i have been working alot with Nagios and setting up monitoring of linux host in an large datacenter. I have been looking for an easy way of deploying the NRPE and Nagios plugins to the servers without installing so much crap on them. I didnt find anything good so here is my own guide to installing NRPE and plugins.

Start by adding a nagios user
useradd nagios

Install building tools if they arent present
apt-get install build-essential libssl-dev

Download the package from nagios
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.13.tar.gz

Untar and cd into the folder
tar -zxvf nrpe-2.13.tar.gz
cd nrpe-2.13

Configure the package with command args enabled
./configure --enable-command-args
make all

Leave the nrpe folder for now, Download the plugins
cd ..
wget http://downloads.sourceforge.net/project/nagiosplug/nagiosplug/1.4.16/nagios-plugins-1.4.16.tar.gz

Untar and cd into folder
tar xvfz nagios-plugins-1.4.16.tar.gz
cd nagios-plugins-1.4.16

Configure the package
./configure

Make it
make

and then make install it
make install

Now lets go back into the nape folder
cd ..
cd nrpe-2.13

And then install nrpe, plugin, daemon and config
make install-plugin
make install-daemon
make install-daemon-config

add the nrpe init.d script and chmod it..
cp init-script.debian /etc/init.d/nrpe
chmod 700 /etc/init.d/nrpe

it should start just fine now
/etc/init.d/nrpe start

finally update the update-rc.d
update-rc.d nrpe defaults

This always works fine for me!

0

Autostart VM in free version of XenServer 6

I have been looking for an solution to bypass the HA licens restriction Citrix applied in free version of xenserver. The feature i was looking for and needing inte the HA version was autostart of VM’s upon host-server reboot. It turns the feature is there, only restriction is in GUI.

If you wish to enable that feature in Xenserver run these commands in the servers console:

Get the UUID for your vm.
xe vm-list

Run this command to enable autostart.
xe vm-param-set uuid=your-uuid-here other-config:auto_poweron=true

If you would like to autostart a pool, run these commands.
xe pool-list

and

xe pool-param-set uuid=your-uuid-here other-config:auto_poweron=true

0

Flash Media Server on Debian Server

Back again to give some tips. I have lately been trying out Flash Media Server (Interactive ED) on behalf of my previous employer, they are going to add the FMS server to their live-server-farm and it has been my responsibility to implement the server and setup the software.

I started trying out RHEL and CentOs but after failing to get them to start and run properly in Xenserver6 i decided to try to install it on Debian instead, Adobe have in the later versions 4.5+ started allowing the software to run on other servers than RHEL and CentOS.

The server i am installing this machine in is an 2p (12core) server with 32gb ram running Xenserver 6.

Said and done i started by installing the Debian 6 64bit in xenserver, i gave it 4-vcpu, 8gb of ram, 2 1gbit networkcards and 40gb of hard drive (the server will be mounting the san-shares with all VOD files on later).

The Debian server only has the ssh server installed as standard. I manually installed the Xen-tools.

After reading about FMS and debian on various webpages i found out that FMS requires an lib thats called libnspr4. I ran the command below in order to get it installed. apt-get install libnspr4-0d

I also read that the lib32stdc++6 should be installed in order to get the fmscheck tool to work properly. Yes FMS is now 64bit only but this tool remains 32bit for some reason. So the only thing to do is to install the lib and it dependencies. I ran the command below in order to get it installed.
apt-get install lib32stdc++6

Before installation i created an user and a group for the software to run as. The installation creates these for you if you want, but i like to have them in the system UID range instead of in the public UID range. To create the user and group i ran the following command
addgroup --system fms; adduser --system --group fms

Now we finally are ready to run the installation!
I downloaded the FMS package from adobe, the linux installer are inside the zipfile. Unpack it and exec the installFMS shell script.
tar -xzvf FlashMediaServer4.5_x64.tar.gz
cd FMS_4_5_0_r297/
./installFMS

The installation program is pretty straight forward, answer yes to the questions regarding path, user and group. Change the ports if you like, i use the standard ports for compatibility issues with some streaming software. And choose your own user and password, security is important!

You will be asked if you would like to install apache, let FMS do that for you. Its easier than trying to install it yourself, you can alter the config later on. I will cover it in a different post. You will also be asked if you would like to add the fms daemon, do that too.

After the installation is complete you have to change the run levels of the FMS binary. As default the installation skips runlevel 2 which is debians standard runlevel.
update-rc.d fms remove; update-rc.d fms defaults

If the installation asks you if you would like to start the server after installation, select no and reboot the machine first.

After the installation you can point your web browser to your domain oct ipadress, now you will se the console/demo page for FMS! Happy streaming.

0

Installing FFMpeg in Debian or Ubuntu

I have had the pleasure to install and reinstall ffmpeg on an linux (debian) host and thought that i should share my experience. Or at least save it for myself.

I have tried getting ffmpeg directly from apt-get but it didn’t have all the libraries that i needed for the server dependencies, so i ended up having to install it directly from source.

This simple steps worked fine for me..

First of all, add the debian multimedia deb repositories to your sources.list.

deb http://www.debian-multimedia.org/ etch main
deb-src http://www.debian-multimedia.org/ etch main

run command apt-get install debian-multimedia-keyring and apt-get update to get the package lists.

Install subversion, we will need it to get source from ffmpeg homesite
apt-get install subversion

Get all the libraries needed
apt-get install liba52-dev libdts-dev libgsm1-dev libvorbis-dev libxvidcore4 libxvidcore-dev libdc1394-dev libfaac-dev libfaad-dev liblame-dev libx264-dev libtheora-dev libsdl1.2-dev

Get all the build dependencies for ffmpeg
apt-get build-dep ffmpeg

install yasm, needed for x264

wget http://www.tortall.net/projects/yasm/releases/yasm-0.7.1.tar.gz
tar xzvf yasm-0.7.1.tar.gz
./configure
make
make install

get and install x264

wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20080630-2245.tar.bz2
bunzip2 < x264-snapshot-20080630-2245.tar.bz2 | tar -xf -
./configure --enable-shared
make
make install

get the ffmpeg code

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk

go into the dir, then configure and make

./configure --enable-libmp3lame --enable-libtheora --enable-liba52 --enable-libx264 --enable-libgsm --enable-postproc --enable-libxvid --enable-libfaac --enable-pthreads --enable-libvorbis --enable-libfaad --enable-gpl --enable-x11grab --enable-libamr-nb --enable-libamr-wb --enable-nonfree --enable-shared --disable-vhook --prefix=/usr/local --extra-cflags=-I/usr/include --extra-ldflags=-L/usr/lib
make
make install

Run ldconfig to update lib-paths and then check to se if ffmpeg is responding. If not, reinstall it.. :(

ldconfig -v
ffmpeg -version
0

libxml2.so.2 error

After an php upgrade on one of my web hosts i have gotten an strange error, it tells me that the libxml2.so.2 package is corrupt.

I got the following error thrown in the php-cli and php commands. It appears in various logs aswell..
php: /usr/local/lib/libxml2.so.2: no version information available (required by php)

I found a solution to the problem, _its just a workaround_ as this error is telling me that the libxml2 package is broken and it needs to be rebuilt. I have built mine from source and it is/was a pain in the ass to get to work. apt-get doesn’t give me the version i want. I know i could always do it but this server is a critical part and can’t be offline that long. I have started building the server from scratch and will move the code/files to this server in a couple of weeks.

Anyways, when this problem was found i ran locate libxml2.so.2 in the console and i found the library in two different places. It should only exist in one place. Mine was in /usr/local/lib and /usr/lib. The file in /usr/lib seems to be the correct working one, so i tried to delete the other one, it didn’t work. After reading around on google i found that this file could exist in two places but there should only be one lib file, the other one should be a symlink.

So i tried to delete the wrong one, and replace it with and symlink to the source file. Boom, it worked.

cd /usr/local/lib/
rm libxml2.so.2
ln -s /usr/lib/libxml2.so.2.7.8 libxml2.so.2
0

Nagios XEN plugin

I have tried the new XEN api-plugin for nagios the other day. It works well and i hope the team behind OP5 will make it available in the standard package soon.

The plugin is available here, http://git.op5.org/git/?p=nagios/op5plugins.git. Download the code from GIT. Move the xen folder to /opt/plugins/xen as this is a dependency, that folder contains the API code for XEN. Move the check_xenapi.pl file to your normal plugin location.

After moving the folder and file to the right location, you can try to see if you’ll get any results from your server.

[root@monitor]# ./check_xenapi.pl -S http://10.0.10.1 -u user -p mypass -l listhost
CHECK_XENAPI.PL OK - 1/1 are enabled: xen1(ENABLED) | hostcount=1units;;

Make sure you use the http:// in the url to the server, otherwise it will fail. Took me a while to figure that one out

If you would like to check the how cpu,

[root@monitor]# ./check_xenapi.pl -S http://10.0.10.1 -u user -p mypass -l cpu -H xen1
CHECK_XENAPI.PL OK - cpu: usage = 0.64 %, loadavg = 0.0300 | cpu_usage=0.64%;; loadavg=0.0300;;

If you would like to check the net status, it displays status for all network cards

[root@monitor]# ./check_xenapi.pl -S http://10.0.10.1 -u user -p mypass -l net -H xen1
CHECK_XENAPI.PL OK - net: send = 0.16 KBps, receive = 0.65 KBps, send errors = 0, receive errors = 0 | send=0.16KBps;; receive=0.65KBps;; send_errors=0;; receive_errors=0;;

If you would like to check the IO,

[root@monitor]# ./check_xenapi.pl -S http://10.0.10.1 -u user -p mypass -l io -H xen1
CHECK_XENAPI.PL OK - disk io: cache size = 0 B, cache misses = 0, cache hits = 0 | cache_size=0B;; cache_misses=0;; cache_hits=0;;

If you would like to show running vm’s on the server,

[root@monitor]# ./check_xenapi.pl -S http://10.0.10.1 -u user -p mypass -l list -H xen1
CHECK_XENAPI.PL OK - 3/3 are Running: server1(Running), server2(Running), server3(Running) | vmcount=3units;;

You can also run checks against a specific vm aswell,

[root@monitor]# ./check_xenapi.pl -S http://10.0.10.1 -u user -p mypass -l cpu -N server1
CHECK_XENAPI.PL OK - VM 'server1' cpu: usage = 0.20 % | cpu_usage=0.20%;;
0

A daughter is born

I’m so happy and a bit overwhelmed. Today my daughter was born after an intensive morning/day.

She came almost one month to early and had asphyxia when she came out due to something neither we or the doctors could explain. To be honest it’s kind of a blur to talk about this but the clear memory of this day will stick forever.

I had to follow the doctors as they ran from the birth room out to the ”resuscitation” room. She did not breath on her own and after a couple of minutes of heart massage and oxygen she started to manage on her own. When she was stable we went to say help to the mother and then we went up to the neonatal department.

The doctors was a bit pensive about her getting some kind of damage to the brain as she had the asphyxia for so long. they were talking about flying to UmeÃ¥ and cooling her down if the examination was showing any signs of damage. as of now, they don’t see anything that indicate this. We will probably stay here at neonatal for a couple of days for further monitoring.

As you all understand it has been a long day and i really can’t write/talk about everything here.

We will probably call her Ebba.

0