Wednesday, October 31, 2007

How to not lock yourself our of your own remote Linux server

While testing iptables rules on a remote server you can add the following line to crontab:

*/10 * * * * /sbin/iptables -F

This will reset your rules every 10 minutes, so if you made a mistake you will still be able to gain access to your router in a maximum of 10 minutes.

Source

Sunday, October 28, 2007

Eclipse TPTP + Gutsy Gibbon = love?

1) Fixing the "Error occurred during initialization of VM" error when trying to profile with TPTP

If you get this error:

Error occurred during initialization of VM
Could not find agent library on the library path or in the local directory: piAgent

Then install libstdc++2.10-glibc2.2 ( apt-get install libstdc++2.10-glibc2.2 )

2) Fixing the "FATAL ERROR: JVMPI, an experimental interface, is no longer supported." error when trying to profile with TPTP

If you get this error:
FATAL ERROR: JVMPI, an experimental interface, is no longer supported.
Please use the supported interface: the JVM Tool Interface (JVM TI).
For information on temporary workarounds contact: jvmpi_eol@sun.com
Could not resolve to JVMPI interface
Error occurred during initialization of VM
-Xrun library failed to init: piAgent

then
a) install Java 1.5 (separately from your Java 1.6 install)
b) go to Eclipse and Go to Window > Preferences > Agent Controller > Integrated Agent Controller. Click on the Environment tab. Change the path of the Java executable to Java 1.5.
c) Right click on your Eclipse project > Properties > Java Compiler > Click Enable project specific settings. Select 5.0 from Compiler Compliance Level > Let it rebuild the project.

Reference: http://dev.eclipse.org/newslists/news.eclipse.tptp/msg02475.html

Tuesday, October 23, 2007

VMware Server (1.0.3) + Management Interface (vmware-mui) notes

Tested on Ubuntu Feisty + Ubuntu Gutsy Gibbon VMs

vmware-server-console: libpng error on Debian GNU/Linux

How to fix the MAC address problem after making a copy of an Ubuntu VM:
1) Login on the VM and unlink /etc/udev/rules.d/70-persistent-net.rules
2) Poweroff
3) BEFORE POWERING ON: open the .vmx file and delete the following lines
ethernet0.addressType = "generated"
uuid.location = "56 4d d7 38 51 b8 c7 4b-94 71 85 98 39 fc 4d 0a"
uuid.bios = "56 4d d7 38 51 b8 c7 4b-94 71 85 98 39 fc 4d 0a"
ethernet0.generatedAddress = "00:0c:29:fc:4d:0a"
ethernet0.generatedAddressOffset = "0"
4) Power on. VMware should automatically generate a new MAC address for your virtual machine, and Ubuntu should rewrite its persistent file with the new MAC.

If the management interface won't start:
"# vi httpd.vmware (or use your favourite text editor)

Search for the string: "start)". Right after this line, place the following:

if [ ! -d /var/run/vmware/httpd ] ; then
mkdir /var/run/vmware/httpd
chown www-data:nogroup /var/run/vmware/httpd
chmod 700 /var/run/vmware/httpd
fi

(Save your changes). Note that if your httpd runs as a different owner and group, season the above to taste." - source

Start multiple VMs faster at system startup:
- Open the Web Management interface
- Select Properties for each VM (click the arrow)
- Set the "Continue Starting Other Virtual Machines After" to "Don't Wait" at the System Startup Options in the Options tab