Posts

Showing posts from August, 2012

jQuery UI plugin conflict with dot net's default jQuery UI

A very short note on something I came across today (I might elaborate on this later..) In a dot Net application, I found that when I tried to use the jQuery UI Autocomplete plugin, there was a conflict. The errors and messages that I came across in the console of Chrome, indicated that there was an API mismatch in the jQuery UI library and the jQuery UI Autocomplete plugin. After a bit of inspection, I found out that dot Net had it's own version of jQuery UI, which actually was a concatenation of many jQuery UI plugins along with the jQuery UI core (even though it was named as jquery-ui.js!). It was pretty straightforward to fix this - I just had to get rid of one of them, either the dot Net's version or the original jQuery UI's version. In my case, since it was a dot Net application, I thought it might be better to retain Microsoft's copy of  jQuery UI!

Moving a storage pool in Virt Manager/Qemu

Today, I had to move my storage pool in Qemu to some other partition due to low disk space on my root partition. I decided to move it to a directory in my /home partition (I'm used to allocating most of my disk space to the /home partition). First of all, we need to stop libvirtd. /sbin/service libvirtd stop Next, we should move the storage pool to the new location. By default the storage pool is located at /var/lib/libvirt/images . I choose to move it to the directory /home/ausmarton/vm . mv /var/lib/libvirt/images /home/ausmarton/vm Any storage pool that is configured, has an xml file created for itself in /etc/libvirt/storage . So, in our case, we just need to edit the file /etc/libvirt/storage/default.xml . Here, we need to edit the path element which comes under the target element. <path>/var/lib/libvirt/images</path> Now that line should look something like this: <path>/home/ausmarton/vm</path> I would like to point out that /etc/libvirt/storage/ a...

Errors while trying to monitor Asterisk through Nagios

Today, I was trying to configure nagios to monitor an asterisk setup. I installed the nagios-plugins-check_sip plugin available for CentOS. I also had check_asterisk downloaded from here just to try out both. Now, check_asterisk and check_sip are perl scipts which can be used to monitor an asterisk setup. When run through the command line, they seem to work fine, i.e: given that asterisk or any other sip server is listening and your command is correct, you should get output similar to this: ;SIP/2.0 200 OK, 0.000585 seconds response time, cnt=1 Although, that's exactly what I got, it didn't work the same way through nagios, I was getting the following as the output from the plugin. (Service check did not exit properly) After enabling debug info for nagios, I found this in the logs, HOST: remotehost, SERVICE: Asterisk, CHECK TYPE: Active, OPTIONS: 1, SCHEDULED: Yes, RESCHEDULE: Yes, EXITED OK: No, RETURN CODE: 3, OUTPUT: **ePN failed to compile /usr/lib64/nagios/plugins/chec...

Allow ssh access to multiple users on GoDaddy's shared hosting without sharing your password

My aim was to allow a couple of colleagues to ssh into my shared hosting server at GoDaddy. If it was any other server, I could have very well created another user which could be used by anyone else who needs access to the server. But, on GoDaddy shared hosting servers you get just one ssh user, hence this blog entry. As described in Max Beatty's  blog , its a very simple job. But my approach was a little different, I did not want to keep copying everyone's public key into my godaddy server's .ssh/authorized_keys2 file. Instead of that, I created a new public/private key pair [ausmarton@ausmarton ~]$ ssh-keygen Next, step which is similar to Max's approach is to copy the newly generated public key onto our server. [ausmarton@ausmarton ~]$ scp ~/.ssh/id_rsa.pub user@remote-host:.ssh/authorized_keys2 If you're on a linux system, you can use ssh-copy-id, which does it quite neatly. [ausmarton@ausmarton ~]$ ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host Now, you just need...

Class 'DOMDocument' not found error in Drupal 7

Thought of trying out Drupal 7 after a long time, as much as I had used Drupal 6, I was expecting Drupal 7 to work out of the box for a system which was previously running Drupal 6.I noticed that, for some reason, there were these error messages in my httpd logs: [Wed Jul 25 17:40:13 2012] [error] [client 127.0.0.1] PHP Fatal error:  Class 'DOMDocument' not found in /home/ausmarton/Public/website/drupal-7.7/modules/filter/filter.module on line 1041 Now, since I had worked quite a bit with version 6, I knew that all that needs to be done was this: yum install php-xml and /sbin/service httpd reload  And it did work! Well, so it looks like besides the usual php extensions like php-gd, php-mysql and others, Drupal 7 also needs php-xml to be able to work properly. EDIT: I've tried this with PHP 5.3.11 on Apache 2.2.21.