Friday 26 August 2011

SSH in EC2 cluster without annoying questions

ever wanted to fan-out a file to all your cluster nodes in EC2 using scp? This shows the option you will need to pass into scp/ssh to make sure it does not annoy you (for example in a script) with the questions about the known-hosts:
#!/bin/bash
for host in `cat slaves-to-copy-to`; do
scp -o "StrictHostKeyChecking no" index-config.xml $host:/home/hadoop/index-config.xml
done
The magic is in the option StrictHostKeyChecking (from the ssh man-page):
StrictHostKeyCheckingIf this flag is set to "yes", ssh(1) will never automatically add host keys to the ~/.ssh/known_hosts file, and refuses to connect to hosts whose host key has changed. This provides maximum protection against trojan horse attacks, though it can be annoying when the /etc/ssh/ssh_known_hosts file is poorly maintained or when connections to new hosts are frequently made. This option forces the user to manually add all new hosts. If this flag is set to "no", ssh will automatically add new host keys to the user known hosts files. If this flag is set to "ask", new host keys will be added to the user known host files only after the user has confirmed that is what they really want to do, and ssh will refuse to connect to hosts whose host key has changed. The host keys of known hosts will be verified automatically in all cases. The argument must be "yes", "no", or "ask". The default is "ask".

Saturday 27 March 2010

Compiling nvidia drivers for my 9500GT on linux Mandriva

Do you end up with things like these:
  • kernel not configured....
  • version.h missing
  • genksyms missing
Then you can do this on Mandriva (tried on 2010 Spring):
  • Copy the config of the running kernel:
    cd /usr/src/linux
    cp /boot/config-`uname -r`

  • Prepare the kernel for building:
    make oldconfig && make prepare && make scripts
  • run the nvidia installer:
    sh /path/to/NVIDIA-Linux-x86-195.36.15-pkg1.run
And let's see how far I get this time!

Blah! This does not work as the compiler that Mandriva uses to compile the stock kernels is not the same as the one installed on my system. So I digged a little further: I started using the dkms-nvidia-current. This worked out rather nicely. (dkms is part of the stuff you get when you use easy-urpmi)

What a mess my system is when I turn on desktop effects. I guess the 190 nvidia driver is not up to it for the 9500GT yet. Let's hope the 2011 release of Madriva will fix this ;-)

Wednesday 14 October 2009

Fiddler again, Again for SOAP

How amazing. I forgot about my own blog and dug into Fiddler and SOAP again. And with Google I could not find my blog item about Fiddler & SOAP. Very strange.

Now I have some simple code, again, to add the SOAP-action header as a column to Fiddler. Here we go:
public static BindUIColumn("SOAP", 120)
function FillSoapAction(oS: Session) {
if ((oS.oRequest != null)
&& (oS.oRequest.headers != null)
&& (oS.oRequest.headers.Exists("SOAPAction"))) {
var action = oS.oRequest.headers.Item["SOAPAction"];
return action.replace(/^.*\//, "").replace(/"/, "");
} else return String.Empty;
}


Hope you'll use it.

Friday 12 December 2008

Change the battery of your Z22 Palm Pilot


Ever wanted to change the battery on your Z22 Palm Pilot? It's just very strange that one can buy a new battery, but no-where in the manual one can find how to do so. I finally took the chance and the palm-pilot in my family did a dive into the washing-machine ;-)

Here are two photo's of the interior of the Z22... One will need: sharp nails, a torx T5 and a small philips/cross-screwdriver. For the rest you will end up as show in the pictures.

At the red-'circles' one will find the torx screws to remove before being able to open the rest with your nails. The screws are behind the black cover over the USB-mini-b-connector and the IR-sender.

Please have fun with it.

Tuesday 18 November 2008

Adding Opsview to hardy

This is how I added Opsview to my Ubuntu Hardy servers:
Run these as route:
gpg --keyserver subkeys.pgp.net --recv-key 77CB2CF6
gpg --export --armor 77CB2CF6 | apt-key add -
 Add this to /etc/apt/sources.list:
#
# OpsView
#
deb http://apt.opsview.org/ubuntu hardy main 
And then run:
apt-get update
apt-get install opsview-agent
And of you go! Have fun.

Friday 6 June 2008

Fiddler helps with SOAP

When you want to inspect your SOAP traffic, you can use the http-debugging-proxy Fiddler to inspect your traffic. But right out of the box you cannot see the method called for each session. For this you can add a rule to the Rules.

Within the class declare the options you need:


// Show SOAP requests

public static RulesOption("Show SOAP Request", "SOAP")

var m_ShowSoapRequest: boolean = false;

Add this to the call OnBeforeResponse:


if (m_ShowSoapRequest) {

//oSession.utilDecodeRequest();

var strRequestStart : String = "><";

var iPos = oSession.utilFindInRequest(strRequestStart, false);

if (iPos != -1) {

var oBodyString : String = System.Text.Encoding.UTF8.GetString(oSession.requestBodyBytes);

iPos = iPos + strRequestStart.Length;

var iEndPos = oBodyString.IndexOf(">", iPos);

var soapRequest : String = oBodyString.Substring(iPos, iEndPos - iPos);

if (soapRequest.IndexOf("/") != -1) {
soapRequest = soapRequest.Substring(0, soapRequest.IndexOf("/"));

}

if (soapRequest.IndexOf(" ") != -1) {

soapRequest = soapRequest.Substring(0, soapRequest.IndexOf(" "));

}

oSession["ui-customcolumn"] = soapRequest;

}

}