getting crazy with mysql and MacPort

Have you ever had an error like this???
macbook-di-antonio-lorusso:var zekus$ sudo /opt/local/share/mysql5/mysql/mysql.server start
Starting MySQL
.../opt/local/share/mysql5/mysql/mysql.server: line 159: kill: (22793) - No such process
ERROR!

Please check permissions because you have a problem with that!
Check that the owner of /opt/local/var/db and /opt/local/var/run/mysql5 is _mysql group admin.

change the console keyboard and language

If you are using a ready-made virtual machine or, for any other exigence, you have to change the default keyboard and default language in a server environment without xorg installed, you can use:

sudo dpkg-reconfigure console-setup

Bye

udev change peripheral names

Often, in VMware Linux guests, it happens that the mac address of the virtual Ethernet card changes due to various operations I wont list here and, like in physical machines when you change the network card, the default Ethernet name changes from eth0 to eth1. If you want to restore the eth0 name, just edit the udev rule like this:
sudo nano /etc/udev/rules.d/70-persistent-net.rules
and change eth1 to eth0 minding to delete the row relative to the previous card (virtual or real) .

That’s it!

sudo: timestamp too far in the future … ??

Have you ever encoutered this error?
I resolved it with a brutal machine reset and recovery mode boot via grub. When you are there, just type  sudo -K in the command line and then reboot again.

That’s it!
If you want to know more about the command you have used, remember to read the “man” pages ;)

Tags: , ,

vmware mui interface error and solution

After a server reboot, I’ve had some problem accessing the mui interface on https://localhost:8333. The server vmware.httpd didnt want to start so I checked the /var/log/vmware-mui/error_log and I found the following error:[Thu Nov 15 08:37:46 2007] [error] ModVmdb load: Address of ModVmdb_InitCore: 0xb7c745a0\n
[Thu Nov 15 08:37:46 2007] [error] Failed to create named-pipe directory:
/var/run/vmware//httpd/8234: No such file or directory\n
[
Thu Nov 15 08:37:46 2007] [error] VMWARE PANIC: \nNOT_IMPLEMENTED F(4023):707\n
[
Thu Nov 15 08:37:46 2007] [error] Panic: Could not allocate temporary context.\n

The solution was a stupid permission change:# sudo mkdir /var/run/vmware/httpd
# sudo chown www-data /var/run/vmware/httpd
# sudo chmod 700 /var/run/vmware/httpd

After that, I started the mui interface and all went fine again:# sudo /etc/init.d/httpd.vmware start

Anyway, I noticed that it happens with every reboot so I added the following code directly in /etc/init.d/httpd.vmware to the start of the function vmware_start_httpd():HTTPD_RUN_DIR="/var/run/vmware/httpd"
[ -d "$HTTPD_RUN_DIR" ] || mkdir $HTTPD_RUN_DIR
chmod 777 $HTTPD_RUN_DIR

Now all seems running well!

strange MAC address change on ubuntu

After the new kernel upgrade to 2.6.20-16-generic on the Ubuntu Server 7.04, I had a strage error after the reboot: no network device were found!
On a shell window, I restarted the network this way:

sudo /etc/init.d/networking restart

that gave me following error:

SIOCSIFADDR: No such device eth0
eth0: ERROR while getting interface flags: No such device

I was desperate and I started googling around till I found a an answer to this error that make me understand! Well I discovered that the problem is common and it depends from the mac address. The mac address has changed even if I haven’t changed any hardware part!
In fact you can see that the current mac address
antonio@UbuntuServer:~$ dmesg | grep eth0
[ 19.728029] eth0: VIA Rhine II at 0×1d000, 00:00:00:00:01:f8, IRQ 19.
is not like the one stored in /etc/iftab
antonio@UbuntuServer:~$ cat /etc/iftab
# This file assigns persistent names to network interfaces.
# See iftab(5) for syntax.
eth0 mac 00:13:d4:c6:4d:ec arp 1
then 00:00:00:00:01:f8 is not 00:13:d4:c6:4d:ec :) obviously!

Solution

change the mac address in /etc/iftab with the new one and restart the machine (you cant just restart the networking service)

Hope you are smiling now ;)

Network interface problem with vmware server

So long time has passed from my last post… I’ve just been busy :/

Do you remember about the third part of vmware server installation never posted? Well I installed Firestarter as service and configured the firewall via the gui…

I’d have used IPTables directly, but the learing curve it’s too high and I didnt had time for that because I was pressed by the work so, finally, I decided for this quick solution.

The server works like a charm, however ;)

I just had a bug to correct, and today, I had time to find a solution: automatically started virtual machines set to start connected in VMware Console, fail with following error (from log file):

Could not get interface flags for vmnet1: No such device Virtual device Ethernet0 will start disconnected.

The problem is that vmnet1 adapter is slow initializing so vmware do it in background while continuing the boot process. If a VMware virtual machine is set to start automatically the vmnet1 adapter may not finish initializing in time, generating the error!

Solution

sudo nano /usr/lib/vmware-server/net-services.sh locate the following line vmware_bg_exec 'Host-only networking on /dev/vmnet'"$vHubNr" \ then substitute vmware_bg_exec with vmware_exec

This substitution let vmware wait vmnet adapter to be initialized instead of continuing with boot.

Now, the problem, should be solved ;)

ps. this bug is still present in VMWare server 1.0.3!

validation easy with jQuery and ValidationAide

These days I had to quickly implement some tedious forms for a friend and I needed a quick way to validati them with jQuery so … I’ve found this useful library: validationAide

Give it a try!

Remainder from a Web Developer switched from Linux to Mac

I just switched to Mac and I miss so much Linux and my fav distro Ubuntu :(
I was obliged to do so cause I had a great offer on a “like-new” macbook and my 1-year-old laptop with linux inside had to go to assistance ( bad Asus ).

After some time playin with fink to set up a LAMP or, better MAMP environment and rsync to move all my files on this new laptop, finally I started again with my work and one of the first things I missed on the keyboard ( mine is an italian one ) was:

` a.k.a. backtick a.k.a apice inverso ( in italian :D ) -> alt+9
~ a.k.a. tilde or twiddle or squiggle -> alt+5

It is not difficult to fnd this information on google but I decided to write it here like a reminder for myself ;)

Anyway, my mac adventure is started even if I’ll never abandone linux that run in a Virtual Machine ( VMWare Fusion ) for now…

vmware server on ubuntu (pt.2)

Damn! All went almost well installing vmware-server but I’m still getting crazy on iptables.
I’m playing with Firewall Builder that, at moment, seems more complicated than iptables itself!

Anyway… I’ll link a pair of reference used to install vmware-server on ubuntu Feisty and vmware-server-mui (the web interface of vmware):

The Ubuntu Wiki Way
Antonio Doldo Blog
http://users.piuha.net/martti/comp/ubuntu/server.html

The summary of this three sites is:

Register for free to http://register.vmware.com/content/registration.html and get your serials

Add the commercial repo from Canonicaldeb http://archive.canonical.com/ubuntu feisty-commercial mainin your /etc/apt/sources.list and update your sourcessudo apt-get updateInstall the vmware-server packagesudo apt-get install vmware-serverApply the following patch to /etc/pam.d/vmware-authd to make permissions work well:
#%PAM-1.0
auth required pam_unix_auth.so shadow null
ok
account required pam_unix_acct.so
get the Management Interface pack
wget http://download3.vmware.com/software/vmserver/VMware-mui-1.0.2-39867.tar.gzunpack it and install
tar zxvf VMware-mui-1.0.2-39867.tar.gz
cd vmware-mui-distrib/
sudo ./vmware-install.pl
fix mui boot script
cd /tmp
wget http://users.piuha.net/martti/comp/ubuntu/httpd.vmware.diff
cd /
patch -b -p0 < /tmp/httpd.vmware.diff
Now, your vmware server is installed and runnig and you can access to your management interface from firefox at https://localhost:8333 or via the Management Console at “Applications -> Administration Tools -> VMWare Server Console“.

Wait for Pt.3 of this adventure where I’ll talk about networking and VMWare ( … if I’ll survive … )!