Archive for the ‘random rants’ Category

Moore hangs after a line with EventPersistencySvc

Wednesday, November 18th, 2009

If you are running Moore on a machine other than lxplus it might hang after a line printing something about “EventPersistencySvc”. If you investigate further (using strace) you’ll see it’s waiting forever in “poll” for a file descriptor. If you check you’ll find that file descriptor to be bound by “bind” to a “AF_INET” port 300XX. So you probaly have a firewall running and that port range is blocked. On SLC5 use (as root)

system-config-securitylevel-tui

and under “customize” add:

30000-30100:tcp, 30000-30100:udp

to solve this problem. (Of course now you have opened a new attack vector for the bad guys ;-) )

Cisco-VPN with Mac OS X 10.6

Sunday, October 11th, 2009

I needed to remotely log into our university network. Until now I was using the Cisco VPN Client, but after an upgrade to Mac OS X 10.6 (Snow Leopard) I couldn’t start the Cisco Client anymore. As Mac OS X 10.6 now natively supports Cisco VPN connections, I wanted to try it out. Here is a simple HowTo for the TU Dortmund VPN:

  1. If you have the Cisco VPN Client installed, uninstall it by executing the following command in the terminal:
    sudo /usr/local/bin/vpn_uninstall
  2. Open System Preferences and go to Network
  3. Add a new entry with Interface VPN and Type Cisco IPSec

    Interface
  4. Enter the access information e.g. Account Name (Accountname) and password (Kennwort). For the TU Dortmund it is your UniMail or MyITMC username / password.Network
  5. Click on Authentication Settings (Identifizierungseinstellungen) and insert the information which can be found here for the TU Dortmund.
    AuthenticationSettings
  6. Click on Connect (Verbinden)

LHC restart 2009

Saturday, October 10th, 2009

It’s not that easy to find the schedule for the LHC restart. If you also would like to know, when the first injection tests are made and when the first beam will be circling in the LHC, you can find up to date information here:

http://lhc-injection-test.web.cern.ch/lhc-injection-test/2009/injection-tests-2009.htm

As of today, the first injection test is planned for the 24th to 25th october. The first beam circulating in the LHC is expected for 19th November.

Test status of network connection

Wednesday, August 26th, 2009

Just came across following web page

http://ndt.switch.ch/

where you find a java applet; This applet is very useful to test the speed, reliablity and operational status of your box and the network connection for the box.

CERN at Google Streetview

Tuesday, August 18th, 2009

Since today Google Streetview is available for Switzerland. It covers quite a few streets and among them is the road to CERN.

Here you can see the main entrance:

And here you can see the ATLAS building

… the CERN Globe:

LHCb Experiment:

Fonts in LaTeX

Tuesday, August 11th, 2009

Ever searched for the right font in LaTeX?  Then have a look at The LaTeX Font Catalogue! It lists several fonts with a preview and instructions how to include them into your document.

I really like the TeX Gyre Pagella font which is based on the Palatino font. Even if you need some handwritten or caligraphic fonts for LaTeX, have a look at the Font Catalogue!

CRE is great :-)

Monday, August 10th, 2009

Today i would like to introduce you to one of my favorite Podcast shows Chaosradio Express , which is a German Podcast on technology, software and webculture.

Some of the episodes i liked best are:

CRE 088 – Python und PyPy
CRE 086 – USB
CRE 082 – Erlang

But English speaking friends do not despair, there are also English episodes of the sister series Chaosradio Express International

All this is a shameless advertisement plug as demanded by Tim Pritlove the moderator of the show.

So this should be Nr. 44 of a linked chain of blog posts covering CRE.

== Previous Blog4CRE post (Nr.43 ) ========== Next Blog4CRE post (Nr.45) ==

Comet style demo using CheeryPy

Thursday, August 6th, 2009

The following illustrates how to update an SVG embeded in XHTML when new information is available on the server (aka COMET style). The trick is to querry the Server in a “long poll” through an XMLHttpRequest and then wait until Server has the new info ready. In this Example the delayed info is a new time string from the server after a REST style querry to the exposed “sleep” function of the CherryPy server.

The resulting app will be served under http://localhost:8080/xhr
and should show a rotating clock with the time send from the server
like seen here:

clock

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import cherrypy
import time

__author__ = 'Stephan Nies'

server = 'localhost'

class Comet(object):
  """CherryPy for Comet-style asynchronous communication through XMLHttpRequest"""

  @cherrypy.expose
  def xhr(self):
    xhtml="""<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">

  <script type="text/javascript">

    function sendToServer(url){
      try{
        var http = new XMLHttpRequest();
        var url = url;
        http.open("GET", url, false);
        http.send(null);
        return http.responseText;
      }
      catch(ex){
        throw ex;
      }
    }

    function time(sec){
      return sendToServer("http://%s:8080/sleep/"+sec);
    }

    function update(x) {
      if (x > 360) {
        x = 0;
      }
      x = x + 6;
      t = time(5);
      document.getElementById("txt").firstChild.textContent = t;
      document.getElementById("clock").setAttribute("transform", "rotate("+x+",200,200)");
      setTimeout("update("+x+")", 100);
    }
  </script>

  <head>
    <title>SVG clock with time by server side comet</title>
  </head>

  <body onload="update(0)">
    <svg width="600px" height="400px" version="1.1"
    xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
      <defs>
        <g id="MyClock">
          <rect x="0" y="0" rx="20" ry="20" width="250" height="100"
          style="fill:red;stroke:black;stroke-width:5;opacity:0.5"/>
          <text id="txt" x="15" y="56"
          style="font-family:Verdana;font-size:16px"> It's SVG! </text>
        </g>
      </defs>
      <use id="clock" x="50" y="150" xlink:href="#MyClock" />
    </svg>
  </body>
</html>
    """
    cherrypy.response.headers['Content-Type'] = 'application/xhtml+xml'
    return xhtml % server

  @cherrypy.expose()
  def sleep(self, sec):
    sec = float(sec)
    time.sleep(sec)
    return str(time.ctime(time.time()))

cherrypy.config.update({
    'log.screen':True,
    'tools.sessions.on': True,
    'checker.on':False
})
cherrypy.server.socket_host = server
cherrypy.tree.mount(Comet(), config=None)
cherrypy.engine.start()
cherrypy.engine.block()

Please note that this code uses only standard conform technologies like XHTML, JavaScript and SVG and therefore should work without plugins on any standard conform Browser (tested on Firefox 3.0.12 and Safari 4.0.2). In other words: This Code doesn’t work in any Internet Explorer available to date (<= IE8).

LHC in The Daily Show

Saturday, June 6th, 2009

A bit late, but still a few people haven’t seen the funny report on the LHC and the end of the world in The Daily Show. Go ahead, watch it! Extra points for finding the reference to the Grid!

Changing the keyboard layout for Scientific Linux on a MacBook

Friday, June 5th, 2009

I recently installed Scientific Linux in a virtual Machine on my MacBook and ended up with the Standard PC keyboard layout. As the keyboard layout of my MacBook has quite some differences, I tried to figure out how to get all the keys I’m used to.

Here’s what I did (following the advices given here):

  • open the file /etc/sysconfig/keyboard and change it (for a german keyboard) as following

    KEYBOARDTYPE="mac"
    KEYTABLE="mac-de-latin1-nodeadkeys"
  • for other layouts than the german one have a look at /lib/kbd/keymaps/mac/all/ and choose one of the keytables listed there