Stuff…

I know I will forget.

Stuff… header image 1

pci_add_option_rom: failed to find romfile “pxe-rtl8139.bin”

January 7th, 2011 · 1 Comment

Was having two small issues with starting a KVM virtual server on Ubuntu 10.04 LTS:

  • pci_add_option_rom: failed to find romfile “pxe-rtl8139.bin”
  • inet_parse: ipv4 parse error (1)

root@hostname:~/qemu-test# qemu -m 256 -vnc 1 -hda linux.small.img -cdrom dsl-n-01RC4.iso -boot d
pci_add_option_rom: failed to find romfile “pxe-rtl8139.bin”
inet_parse: ipv4 parse error (1)
root@hostname:~/qemu-test# apt-get install kvm-pxe
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed
kvm-pxe
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 113kB of archives.
After this operation, 201kB of additional disk space will be used.
Get: 1 http://gb.archive.ubuntu.com/ubuntu/ lucid-updates/universe kvm-pxe 5.4.4-1ubuntu1.2 [113kB]
Fetched 113kB in 0s (1,224kB/s)
Selecting previously deselected package kvm-pxe.
(Reading database … 44025 files and directories currently installed.)
Unpacking kvm-pxe (from …/kvm-pxe_5.4.4-1ubuntu1.2_all.deb) …
Setting up kvm-pxe (5.4.4-1ubuntu1.2) …

root@hostname:~/qemu-test# qemu -m 256 -vnc 1 -hda linux.small.img -cdrom dsl-n-01RC4.iso -boot d
inet_parse: ipv4 parse error (1)

Installing “kvm-pxe” with apt-get resolved the first problem.

root@hostname:~/qemu-test# qemu -m 256 -vnc :1 -hda linux.small.img -cdrom dsl-n-01RC4.iso -boot d

And correcting the -vnc option resolved the second problem.

URLs:

→ 1 CommentTags: Operating System · Virtualisation

CGI::Application::Plugin::Session and expiring old sessions

December 25th, 2010 · No Comments

Using Perl module CGI::Application::Plugin::Session for CGI::Application to keep track of users sessions, however, I could not see anywhere in the module to expire old session data from the database.  So, I was ending up with lots of old entries in the database with the expire time from ages ago.

As CGI::Application::Plugin::Session seemlessly brings CGI::Session support to CGI::Application we can use the CGI::Session::ExpireSessions module to expire old entries in the database.

In the logout area of my session handling code I simply added:

use CGI::Session::ExpireSessions;
CGI::Session::ExpireSessions->new(dbh => $self->dbh, verbose => 1)->expire_sessions();

URLs:

→ No CommentsTags: Coding

Plesk IPAddress error on clicking new domain

December 24th, 2010 · No Comments

OS: Ubuntu 8.04 LTS
Plesk: 9.3

For some reason when clicking on Domains>New Domain the following error was being displayed.

ERROR: PleskFatalException

Top of Form
Unable to load object of type IPAddress with id=4: Table->select() failed: no such row in the table
________________________________
0: common_func.php3:3121
objectMakerEx(string ‘IPAddress’, integer ’4′)
1: IPPoolManager.php:968
IPPoolManager::toString(integer ’4′, string ‘exclusive’)
2: class.CreateDomainForm.php:31
ip_pool_slist(array)
3: class.CreateDomainForm.php:271
CreateDomainForm->assign(boolean false, boolean false, string ”, object of type Client, array, array, integer ’0′, boolean true, boolean false, boolean false, boolean false, boolean false, array, array, array, boolean false, object of type plesk__client__domain__properties)
4: DomainPropertiesUIPointer.php:437
DomainPropertiesUIPointer->accessItem_create(string ‘GET’)
5: DomainPropertiesUIPointer.php:59
DomainPropertiesUIPointer->accessItem(string ‘GET’, NULL null)
6: UIPointer.php:596
UIPointer->access(string ‘GET’)
7: plesk.php:38
Bottom of Form

Not sure how it got into this state but it was annoying.  Tried adding an IP via the control panel, however, that used an auto incremented value for the ID, so, did not match id=4.

Instead, went into the PSA database and added a temporary IP manually:

mysql> insert into IP_Addresses values (“4″, “10.10.0.2″, “255.255.255.255″, “eth0″, 1, 0, “false”);
Query OK, 1 row affected (0.02 sec)

mysql> select * from IP_Addresses;                                                           +—-+—————–+—————–+——-+——————–+——————-+——-+
| id | ip_address      | mask            | iface | ssl_certificate_id | default_domain_id | ftps  |
+—-+—————–+—————–+——-+——————–+——————-+——-+
|  1 | 192.168.50.45  | 255.255.255.0   | eth0  |                  1 |                 0 | false |
|  2 | 192.168.50.171 | 255.255.255.0   | eth0  |                  1 |                 0 | false |
|  3 | 192.168.50.198 | 255.255.255.0   | eth0  |                  1 |                 0 | false |
|  4 | 10.10.0.2       | 255.255.255.255 | eth0  |                  1 |                 0 | false |
+—-+—————–+—————–+——-+——————–+——————-+——-+
4 rows in set (0.00 sec)

Then, going back to Domains>New Domain this worked fine.  After confirming that the insert fixed the problem in Plesk we went to Settings>IP Addresses and removed IP 10.10.0.2.  All good.

→ No CommentsTags: Control Panels · Linux · Operating System

Plesk 9.5.3 failing security metrics PCI scan

December 23rd, 2010 · 1 Comment

OS: CentOS 5.5
Plesk for Linux 9.5.3

Security Metrics was suggesting it was possibly a Horde related problem on TCP port 8443.  Horde doesn’t listen on 8443 (that is the Plesk control panel), but, disabled webmail server wide and ran the test again.

Once again, PCI scan failed stating the help.php on the default hostname and port 8443 was vulnerable to a XSS attack via help.php.

Went to: /usr/local/psa/admin/htdocs
Moved help file:  mv help.php help.php.tmp

And re-ran the scan and the problem was resolved.  Now, perhaps Plesk 9.5.4 resolves this problem, however, I cannot see any mention of it in the release notes.

→ 1 CommentTags: Control Panels · Linux · Operating System

rbldnsd: invalid zone spec

December 16th, 2010 · No Comments

Was playing around with rbldnsd to setup a black list and whilst preparing the startup configuration file I was having troubles starting rbldnsd with ‘/etc/init.d/rbldnsd start’.

OS: Ubuntu 10.04
Configuration file: /etc/default/rbldnsd

Error message received:

Starting rbldnsd: -r
rbldnsd: listening on 192.168.1.1/53
rbldnsd: invalid zone spec `/home/rbl/’

It turns out I had a very simply error in the RBLDNSD configuration file.

I had:

RBLDNSD=”-r /home/rbl/ -w ./ \
-t 300:300:86400 \
……”

Instead of:

RBLDNSD=”bl -r /home/rbl/ -w ./ \
-t 300:300:86400 \
……”

I had essentially missed out the name of the process and the startup script uses this for naming the PID file.  rbldnsd must have thought I was defining a zone with /home/rbl and I found the pid file /var/run/rbldnsd–r.pid.

→ No CommentsTags: Coding · Linux · Operating System