My ongoing experiences with Ubuntu, and later Mythbuntu, as a media center with MythTV. I'm also using the system for a virtual machine server, a mediawiki server and a general all around home infrastructure base.

Thursday, May 28, 2009

Installing Virtual Box

I recently upgraded to VMServer 2.0.1 on my Ubuntu laptop and I'm very unhappy. The new console is very slow and it hangs often. I'm tried of watching "loading" message. Certainly my laptop is a little old (1.5GHz Celeron M processor) and maybe that is a contributor. On the other hand if you google the net, you'll find no shortage of other people with the same opinion.

I installed VirtualBox on my Mac laptop and found I really liked it. So I figured I'd give it a try on my Ubuntu laptop as well.

First you need to choose between the Open vs Closed Source editions. Despite being a fan of open source I went with the closed source, mainly because the Remote Display Protocol server sounded like useful functionality I might want.

Install was fairly straight forward, I went to the VirtualBox Linux Downloads page and clicked on the Ubuntu .deb link.

One annoyance is that it didn't install an entry in the Applications menu, so I had to start it from the command line:
% /usr/X11R6/bin/VirtualBox
I did add an icon on the panel using the following steps:
  1. Right Click on Application Panel
  2. Select "Add to Panel"
  3. Select "Custom Application Launcher" and "Add"
  4. Type is "Application"
  5. Name is "VirtualBox"
  6. Command is "/usr/X11R6/bin/VirtualBox"
  7. Click OK.
This will create an icon with the default "spring" image. If anyone knows where I can find a stash of images for applications, please let me know.

That's it. If I like it on my laptop, next step will be installing it on my server which will be more interesting since I'll want to have unattended, automatically starting VMs and I'll also want to re-use my existing VMWare images (the images on my laptop don't have enough state for me to worry about).

MythTV Volume too low

I noticed the volume on MythTV seemed rather low. Poking around the net I found this thread and followed the directions as follows:
% alsamixer
And set Master and PCM volume to 100% (Master was down at 70%). That fixed my problem.

Then as suggested later in the thread, I saved the results (has to be done as root):
% sudo alsactl store

Tuesday, May 26, 2009

DynDNS false alarm

I previously set up automatic updating of DynDNS. Today I got an email warning me "Your account vwelch at DynDNS.com is due to expire in 5 days."

Hmmm, I'd seen this problem before. So I logged into my server, but no hung ddclient processes:

% ps auxwww | grep ddclient
%


Hmmm, poking around some more, looks like the problem maybe fixed itself?

%grep ddclient /var/log/daemon.log
May 25 08:21:48 casey ddclient[13892]: WARNING: forcing update of Home from 98.222.63.70 to 98.222.63.70; 30 days since last update on Fri Apr 24 21:31:51 2009.
May 25 08:21:48 casey ddclient[13892]: WARNING: forcing update of vwelch.dyndns.org from 98.222.63.70 to 98.222.63.70; 30 days since last update on Fri Apr 24 21:31:51 2009.
May 25 08:21:50 casey ddclient[13892]: SUCCESS: updating Home: good: IP address set to 98.222.63.70
May 25 08:21:50 casey ddclient[13892]: SUCCESS: updating vwelch.dyndns.org: good: IP address set to 98.222.63.70


Sure enough, logging into DynDNS showed a last update time from this morning.

So apparently there is a race condition between the email warning and the ddclient forcing a refresh.

Saturday, May 9, 2009

dbus-daemon: Rejected send message

Since my Ubuntu laptop upgrade to 9.04 I'm seeing the following messages every 10 minutes in /var/log/auth.log and in my logwatch emails:
dbus-daemon: Rejected send message, 1 matched rules; type="method_call", sender=":1.36" (uid=1000 pid=3697 comm="/usr/lib/indicator-
applet/indicator-applet --oaf-a") interface="org.freedesktop.DBus.Properties" member="Get" error name="(unset)" requested_reply=0 destination=":1.1421" (uid=0 pid=22921 comm="/USR/SBIN/CRON ")): 1 Time(s)
dbus-daemon: Rejected send message, 1 matched rules; type="method_call", sender=":1.36" (uid=1000 pid=3697 comm="/usr/lib/indicator-applet/indicator-applet --oaf-a") interface="org.freedesktop.DBus.Properties" member="Get" error name="(unset)" requested_reply=0 destination=":1.1422" (uid=0 pid=22923 comm="/USR/SBIN/CRON ")): 1 Time(s)
dbus-daemon: Rejected send message, 1 matched rules; type="method_call", sender=":1.36" (uid=1000 pid=3697 comm="/usr/lib/indicator-applet/indicator-applet --oaf-a") interface="org.freedesktop.DBus.Properties" member="Get" error name="(unset)" requested_reply=0 destination=":1.1423" (uid=0 pid=22928 comm="/USR/SBIN/CRON ")): 1 Time(s)
Poking around the net I found this bug and in particular this comment. I applied the suggested fix:
# cd /etc/dbus-1
# cp system.conf system.conf.orig
# vi system.conf
# diff system.conf.orig system.conf
66a67,70
>
> > send_type="method_call"
> send_member="Get"/>
After that I tried restarting dbus ('/etc/init.d/dbus restart') but that resulted in logging me out, so I suggest just rebooting instead.

Sunday, May 3, 2009

Installing VMServer 2.0.1

Having just upgraded to 9.04, it seemed like a good time to catch up on my VMWare server upgrades, since I was still on 1.0.7, which is getting a little old.

I started by trying to upgrade to 1.0.9, but I could not get the vmmon module to build...

So, I shifted gears and tried installing 2.0.1 following the directions at VMWare Server 2.01 on Ubuntu 9.04.

I downloaded the 2.0.1 tarball and tried installing it following those directions.
$tar xvfz ~/Downloads/VMware-server-2.0.1-156745.i386.tar.gz
$cd vmware-server-distrib/
$patch ./bin/vmware-config.pl ~/Downloads/vmware-config.pl.patch.txt
$sudo ./vmware-install.pl
I took the default answers except for the following:
Your computer has multiple ethernet network interfaces available: eth0, pan0,
wlan0. Which one do you want to bridge to vmnet0? [eth0] wlan0

The current administrative user for VMware Server is ''. Would you like to
specify a different administrator? [no] yes
Please specify the user whom you wish to be the VMware Server administrator
von
I actually goofed typing in my serial number, but looks like my existing VMServer 1.0 license worked.

apt-get nautilus-dropbox errors

Hmmm. After upgrading my laptop to 9.04, I'm seeing the following error:
# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
nautilus-dropbox
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 77.5kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]?
WARNING: The following packages cannot be authenticated!
nautilus-dropbox
Install these packages without verification [y/N]? y
Get:1 http://linux.getdropbox.com jaunty/main nautilus-dropbox 0.6.1 [77.5kB]
Fetched 77.5kB in 0s (670kB/s)
Failed to fetch http://linux.getdropbox.com/ubuntu/dists/jaunty/main/binary-i386/nautilus-dropbox_0.6.1_i386.deb Size mismatch
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


So far I haven't figure out how to solve this. Will post an update here when I have.

Update 5/29/09: I fixed this by installing it manually as follows.

# wget https://www.getdropbox.com/download?dl=packages/nautilus-dropbox_0.6.1_i386_ubuntu_9.04.deb
--2009-05-29 13:51:23-- https://www.getdropbox.com/download?dl=packages/nautilus-dropbox_0.6.1_i386_ubuntu_9.04.deb
Resolving www.getdropbox.com... 174.36.30.67
Connecting to www.getdropbox.com|174.36.30.67|:443... connected.
HTTP request sent, awaiting response... 302 FOUND
Location: http://linux.getdropbox.com/packages/nautilus-dropbox_0.6.1_i386_ubuntu_9.04.deb [following]
--2009-05-29 13:51:24-- http://linux.getdropbox.com/packages/nautilus-dropbox_0.6.1_i386_ubuntu_9.04.deb
Resolving linux.getdropbox.com... 174.36.30.67
Connecting to linux.getdropbox.com|174.36.30.67|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 77528 (76K) [application/octet-stream]
Saving to: `nautilus-dropbox_0.6.1_i386_ubuntu_9.04.deb'

100%[======================================>] 77,528 316K/s in 0.2s

2009-05-29 13:51:25 (316 KB/s) - `nautilus-dropbox_0.6.1_i386_ubuntu_9.04.deb' saved [77528/77528]

# dpkg -i nautilus-dropbox_0.6.1_i386_ubuntu_9.04.deb
(Reading database ... 193825 files and directories currently installed.)
Preparing to replace nautilus-dropbox 0.6.1 (using nautilus-dropbox_0.6.1_i386_ubuntu_9.04.deb) ...
Unpacking replacement nautilus-dropbox ...
Setting up nautilus-dropbox (0.6.1) ...

Dropbox installation successfully completed! Please log out and log back in to complete the integration with your desktop. You can start Dropbox from your applications menu.

Processing triggers for man-db ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place

ttf-mscorefonts-installer, apt-cacher and .exe files

Since upgrading to 9.04 I was still having problems upgrading ttf-mscorefonts-installer. The 'apt-get dist-upgrade' would die with the following error:

--2009-05-03 12:00:35-- http://heanet.dl.sourceforge.net/sourceforge/corefonts/andale32.exe
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:3142... connected.
Proxy request sent, awaiting response... 403 Sorry, not allowed to fetch that type of file: andale32.exe
2009-05-03 12:00:36 ERROR 403: Sorry, not allowed to fetch that type of file: andale32.exe.
Poking around, I found this post which explained that apt-cacher had a list of allowed file types and '.exe' wasn't on it. Unforunately, the apt-cacher script had changed and the patch in the post wasn't relevant any more. Here is my fix:
#cd /usr/share/apt-cacher
#cp apt-cacher-lib.pl apt-cacher-lib.pl.20090503
#vi apt-cacher-lib.pl
# diff -c apt-cacher-lib.pl.20090503 apt-cacher-lib.pl
*** apt-cacher-lib.pl.20090503 2009-05-03 12:06:48.000000000 -0500
--- apt-cacher-lib.pl 2009-05-03 12:07:15.000000000 -0500
***************
*** 57,62 ****
--- 57,63 ----
package_files_regexp => '(?:' . join('|',
('\.deb',
'\.rpm',
+ '\.exe',
'\.dsc',
'\.tar\.gz',
'\.diff\.gz',


The I restarted apt-cacher:
# /etc/init.d/apt-cacher restart
Then I reran 'apt-get dist-upgrade' and it installed fine.

Saturday, May 2, 2009

Upgrading Mythbuntu from 8.10 to 9.04

Time to upgrade my Mythbuntu box to 9.04 from 8.10. I followed the Network Upgrade directions.

Not unsurprisingly, update-manage-core was already installed, so on to the upgrade (only showing highlights):

# do-release-upgrade
...
8 packages are going to be removed. 82 new packages are going to be
installed. 731 packages are going to be upgraded.
...
What is the password for the MySQL administrator account 'root':
Hmmm. I just enter here, I got an error about a database connection being refused and the upgrade continued. AFAICT, it worked out OK.
...
Will you be using this webserver exclusively with mythweb? Yes

Configuration file `/etc/services'
==> Modified (by you or by a script) since installation.
Y or I : install the package maintainer's version

I got asked about apt-cacher.conf - I hit "D" to get diffs and I got an error and the install went on. Fortunately I got another chance at this later...

What would you like to do about smb.conf? I kept the local version currently installed
...
Configuration file `/etc/apt-cacher/apt-cacher.conf'
N or O : keep your currently-installed version
...
The ending of the upgrade did not look good:

--2009-05-02 10:23:29-- http://switch.dl.sourceforge.net/sourceforge/corefonts/andale32.exe
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:3142... connected.
Proxy request sent, awaiting response... 403 Sorry, not allowed to fetch that type of file: andale32.exe
2009-05-02 10:23:29 ERROR 403: Sorry, not allowed to fetch that type of file: andale32.exe.

andale32.exe: No such file or directory

All done, errors in processing 1 file(s)
dpkg: error processing ttf-mscorefonts-installer (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
ttf-mscorefonts-installer
I'm not sure what ttf-mscorefonts is, but doesn't seem to have any major impact.

Upgrade complete.

The upgrade is completed but there were errors during the upgrade
process.
Ok, not the best message at the end, but at leat things have finished.

First thing I noticed is I started getting emails from cron:
Subject: Cron [ -x /etc/init.d/mythtv-status ] && /etc/init.d/mythtv-status reload > /dev/null
Sorry, failed to fetch http://localhost:6544/xml.
Hmmm. Well, first things first, just on principle:
#reboot
System comes up fine in MythTV. Everything seems to be working well.

Hmmm, another email from cron:

Subject: Cron [ -x /etc/init.d/mythtv-status ] && /etc/init.d/mythtv-status reload > /dev/null
mv: cannot stat `/var/run/motd.new': No such file or directory
Update: This problem was caused by two cron jobs both trying to modify /etc/motd at the same time (every 10 minutes)! The update-motd cron job moves /var/run/motd.new out from underneath the mythtv-status job. You can see the two jobs in /etc/cron.d:
# grep 10 /etc/cron.d/mythtv-status /etc/cron.d/update-motd
/etc/cron.d/mythtv-status:*/10 * * * * root [ -x /etc/init.d/mythtv-status ] && /etc/init.d/mythtv-status reload > /dev/null
/etc/cron.d/update-motd:*/10 * * * * root [ -x /usr/sbin/update-motd ] && /usr/sbin/update-motd 2>/dev/null
I believe what should really be happening is myth-status should be run by update-motd every 10 minutes instead of independently. Here is what I did to make that happen:
# rm /etc/cron.d/mythtv-status
# cd /etc/update-motd.d/
# ln -s /usr/bin/mythtv-status 50-mythtv-status
Test it out...
# /usr/sbin/update-motd
# cat /etc/motd
Linux casey 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686
...typical motd stuff...

MythTV status for localhost
===========================
...typical mythtv-status stuff...

0 packages can be updated.
0 updates are security updates.
End Update.

Checked on vmware and it wasn't running. Usual problem:
# /etc/init.d/vmware start
VMware Server is installed, but it has not been (correctly) configured
for the running kernel. To (re-)configure it, invoke the
following command: /usr/bin/vmware-config.pl.
Usual fix:
# /usr/bin/vmware-config.pl
I took all the defaults. Afterwards, don't forget to fix /etc/vmware/config.

I then checked /usr/share/apt-cacher/apt-cacher-report.pl to see if I needed to patch it and it had been fixed in the distribution - yeah!

Well, I think that's it. Will update this post if I run into any more problems.

Update: This system also acts as my apt-cacher, and when I went to upgrade the next system I got "104 Connection reset by peer" errors. Turns out I had to use the new /etc/apt-cacher/apt-acher.conf file:
# cd /etc/apt-cacher
# mv apt-cacher.conf apt-cacher.conf.8.10
# cp apt-cacher.conf.dpkg-dist apt-cacher.conf
# /etc/init.d/apt-cacher restart
Restarting Apt-Cacher: apt-cacher.
For the record, here's the diff:

# diff apt-cacher.conf.8.10 apt-cacher.conf

26c26
< # optional setting, binds the listening daemon to one specified IP. Use IP --- > # optional setting, binds the listening daemon to specified IP(s). Use IP
40c40
< allowed_hosts="192.168.1.0/24,"> allowed_hosts=*
43c43
< # And similiarly for IPv6 with allowed_hosts_6 and denied_hosts_6. --- > # And similarly for IPv6 with allowed_hosts_6 and denied_hosts_6.
49c49
< # This thing can be done by Apache but is much simplier here - limit access to --- > # This thing can be done by Apache but is much simpler here - limit access to
112a113,117
> # This sets the interface to use for the upstream connection.
> # Specify an interface name, an IP address or a host name.
> # If unset, the default route is used.
> #interface=
>
125,126c130,131
< # To enable data checksumming, install libdbd-sqlite3-perl and set this option < # to 1. Then wait untill the Packages/Sources files have been refreshed once --- > # To enable data checksumming, install libberkeleydb-perl and set this option
> # to 1. Then wait until the Packages/Sources files have been refreshed once
133c138
< # apt-cacher server is beeing relocated (via apt-get's error messages while --- > # apt-cacher server is being relocated (via apt-get's error messages while
140,143c145,147
< # also the only method to use FTP access to the target hosts. The syntax is simple, the part of the beginning to replace, followed by a list of mirror urls, all space separated. Multiple profile are separated by semicolons < # path_map = debian ftp.uni-kl.de/pub/linux/debian ftp2.de.debian.org/debian ; ubuntu archive.ubuntu.com/ubuntu ; security security.debian.org/debian-security ftp2.de.debian.org/debian-security < path_map =" debuntu"> # also the only method to use FTP access to the target hosts. The syntax is
> # simple, the part of the beginning to replace, followed by a list of mirror
> # urls, all space separated. Multiple profile are separated by semicolons
146a151,163
> # path_map = debian ftp.uni-kl.de/pub/linux/debian ftp2.de.debian.org/debian ; ubuntu archive.ubuntu.com/ubuntu ; security security.debian.org/debian-security ftp2.de.debian.org/debian-security
>
> # Permitted package files - this is a perl regular expression which matches all
> # package-type files (files that are uniquely identified by their filename).
> # The default is:
> #package_files_regexp = (?:\.deb|\.rpm|\.dsc|\.tar\.gz|\.diff\.gz|\.udeb|index\.db-.+\.gz|\.jigdo|\.template)$
>
> # Permitted Index files - this is the perl regular expression which matches all
> # index-type files (files that are uniquely identified by their full path and
> # need to be checked for freshness).
> #The default is:
> #index_files_regexp = (?:Index|Packages\.gz|Packages\.bz2|Release|Release\.gpg|Sources\.gz|Sources\.bz2|Contents-.+\.gz|pkglist.*\.bz2|release|release\..*|srclist.*\.bz2|Translation-.+\.bz2)$
>