Linux

126 posts in Linux

Tomcat: javax.servlet.ServletException issues

· errors, linux, software

javax.servlet.ServletException
org.apache.catalina.security.SecurityUtil.execute
(SecurityUtil.java:294)

Solution:

Create 20servlets.policy:

nano -w /etc/tomcat5.5/policy.d/20servlets.policy

And add:

grant codeBase "file:${catalina.base}/webapps/-" {
permission java.security.AllPermission;
};

And restart Tomcat

/etc/init.d/tomcat5.5 restart

Xen: PTY allocation request failed

· errors, linux, software, virtualisation

$ ssh vm3.rootspirit.com -l root
root@vm3.rootspirit.com's password:
PTY allocation request failed on channel 0
stdin: is not a tty
Solution:
Kill the DomU (xm console *might* work, but somehow rarely works for me).
mkdir /tmp/disk
mount /path/to/disk.img /tmp/disk
chroot /tmp/disk /bin/bash
=> in chroot env
nano -w /etc/fstab
And add (though this is probably not needed):
none            /dev/pts      devpts    defaults        0   0
And install udev:
apt-get install udev
Clean up, and restart DomU
exit
umount /tmp/disk
xm create /path/to/xen/vm.cfg
Should do the trick. :)

Xen: Failed to find an unused loop device

· errors, linux, software, virtualisation

I had to start a new Xen domU this afternoon,

xm create vm#.domain

But this resulted in following error:

Error: Device 5632 (vbd) could not be connected. Failed to find an unused loop device

Solution:

Create /etc/modprobe.d/local-loop.conf with this content:

options loop max_loop=64

Turn off all DomUs, yes, bummer. You’ll need to reload the loop module which won’t work if Xen is still using them. xm list should only display Domain-0.

iRail news

· linux, software, irail, www

  • Been playing around with nginx vs Apache for iRail. The bottle neck still is the NMBS site (and I'm truly sorry for DoSing you, dearest NMBS. I had to benchmark), but nginx seems to win just slightly over Apache. Maybe it's worth moving irail.be to my nginx webserver. <3 nginx.
  • The iRail (national) mobile website is getting its final touches and should go live tomorrow night.
  • The iRail API seems stable. Special thanks to Pieter.
  • iRail is currently developing a native Qt (Symbian, Maemo and MeeGo) application.
  • There will most likely be a Bada (Samsung) native application as well.
  • Same for the iPhone, native app should be here soonish.
  • If you'd like to help, one way or another, two addresses, Project iRail and mailing list. :)
  • iRail team will attend Apps Marathon on Monday.
  • iRail @ OpenBelgium

iRail.git

· apple, linux, software, irail, www

iRail source is on Github.

To access the iRail source code;

Be aware you need to be added as contributor before being able to commit changes.

  1. get Git
  2. [browse to some folder] mkdir git
  3. cd git
  4. git clone git@github.com:Tuinslak/iRail.git
  5. cd iRail
  6. git fetch

To edit & commit changes:

  1. git add [file]
  2. git commit -m 'edited [file], added this and that'
  3. git push

To update repo

  1. git fetch
  2. git merge origin/master

To check log

Four

· hardware, linux

Has a year uptime as well! Yay ;)

It's the one at the bottom. Running Ubuntu as OS (Dom0) and several Xen virtual machines (such as the nginx reverse proxy cache of this blog). Four is a dual core Xeon with 8Gb RAM.

nginx configs

· linux, software, www

Been slacking a bit lately, but here they are:

  • /etc/nginx/nginx.conf // general nginx config
  • /etc/nginx/sites-available/blog // my current (as of posting this) rproxy settings for this blog
  • /etc/nginx/conf.d/proxy.conf // reverse proxy related config

nginx cache in tmpfs

· linux, software, www

Probably won’t change a lot to my performance, but I’ve mounted the nginx reverse proxy cache in a tmpfs mount.

none on /var/cache/nginx/blog type tmpfs (rw,size=512m)
none  512M   47M  466M   4% /var/cache/nginx/blog

Let’s see what performance boosts this will give. :P