Trying to build BuildR 1.4.1 on Ruby 1.8.7

I just spent quite a bit of time trying to get Buildr to work on Ruby. I started with 1.9 but that did not work. All my team was using 1.8.7, but on Mac.
So I started down the 1.8.7 path, then I found the standard Gem did not work for Ruby 1.8.7 on Windows XP.

Read the rest of this entry »

VN:F [1.9.1_1087]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.1_1087]
Rating: 0 (from 2 votes)
  • Share/Bookmark

PHP 5 upgrade on CENTOS 5 x86_64

Upgrading PHP:

I started down this path: http://jazzymarketing.com/main/0811/upgrade-php-51-php-52-centos but found that I kept getting dependency conflicts:

--> Missing Dependency: libltdl.so.3()(64bit) is needed by package php-mcrypt-5.3.2-1.el5.remi.x86_64 (remi)
php-mhash-5.2.10-1.el5.remi.x86_64 from remi has depsolving problems

--> Missing Dependency: php-common = 5.2.10-1.el5.remi is needed by package php-mhash-5.2.10-1.el5.remi.x86_64 (remi)
php-gd-5.3.2-1.el5.remi.x86_64 from remi has depsolving problems

--> Missing Dependency: libt1.so.5()(64bit) is needed by package php-gd-5.3.2-1.el5.remi.x86_64 (remi)
Error: Missing Dependency: libt1.so.5()(64bit) is needed by package php-gd-5.3.2-1.el5.remi.x86_64 (remi)
Error: Missing Dependency: libltdl.so.3()(64bit) is needed by package php-mcrypt-5.3.2-1.el5.remi.x86_64 (remi)
Error: Missing Dependency: php-common = 5.2.10-1.el5.remi is needed by package php-mhash-5.2.10-1.el5.remi.x86_64 (remi)

I finally came across this forum posting: http://forums.famillecollet.com/viewtopic.php?id=91 but this still came up with similar dependency issues.

This finally got the answer I needed: http://www.webtatic.com/blog/2009/06/php-530-on-centos-5/ But then I got this error:

Transaction Check Error:
  file /etc/my.cnf from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/charsets/README from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/charsets/ascii.xml from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/czech/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/danish/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/dutch/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/english/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/estonian/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/french/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/german/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/greek/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/italian/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/japanese/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/korean/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/polish/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/romanian/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/russian/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/serbian/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/slovak/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/spanish/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/swedish/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.x86_64
  file /etc/my.cnf from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/charsets/README from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/charsets/ascii.xml from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/czech/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/danish/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/dutch/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/english/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/estonian/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/french/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/german/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/greek/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/italian/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/japanese/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/korean/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/polish/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/romanian/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/russian/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/serbian/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/slovak/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/spanish/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/swedish/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386
  file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-libs-5.1.48-1.el5.remi.x86_64 conflicts with file from package mysql-5.0.45-7.el5.i386

Error Summary
-------------

I know that I am running MySql 5.0.x so I determined that I needed to update MySql. I did that, and was able to get to 5.1.48 but when I tried to restart mysql, I got this error:

$: /tmp $ /etc/init.d/mysqld stop</div>
$: Stopping mysqld:                                           [  OK  ]</div>
$: /tmp $ /etc/init.d/mysqld start</div>
$: MySQL Daemon failed to start.</div>
$: Starting mysqld:                                           [FAILED]</div>
r$: /tmp $ /etc/init.d/mysqld stopStopping mysqld:                                           [  OK  ]$: tmp $ /etc/init.d/mysqld startMySQL Daemon failed to start.Starting mysqld:                                           [FAILED]

in my logs, I showed this error:

100619 06:08:27 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
100619  6:08:27 [ERROR] Error message file '/usr/share/mysql/english/errmsg.sys' had only 480 error messages,
but it should contain at least 641 error messages.
Check that the above file is the right version for this program!
/usr/libexec/mysqld: Unknown error 1146
100619  6:08:27 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
100619  6:08:28  InnoDB: Started; log sequence number 0 2465238
100619  6:08:28 [ERROR] Aborting

100619  6:08:28  InnoDB: Starting shutdown...
100619  6:08:33  InnoDB: Shutdown completed; log sequence number 0 2465238
100619  6:08:33 [Note]
100619 06:08:33 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

This posting saved my life: http://shebangme.blogspot.com/2010/04/mysql-error-message-file-had-only-480.html

WOW! This sucked! I had to find the exact MySql version I was running, in my case mysql-5.1.48-linux-x86_64-glibc23 and then unpack this and get share/mysql/english/errmsg.sys uploaded to my server, then run mysql_install_db, then mysqld start to get the server running. This took me the better part of 4 hours to track this down.

VN:F [1.9.1_1087]
Rating: 10.0/10 (2 votes cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)
  • Share/Bookmark

Creating a mysqldump of a MySql database with on-the-fly gzip compression

I am always amazed at some of the small things that I think would be easy to find a solution for, seem so ellusive.

Today, I needed to run a quick mysqldump of a 100MB database, and I needed to compress it on the fly to gzip so I did not end up with 2 files on my disc. Just save room and time.

mysqldump -u myusername -h localhost -p dbname | gzip -9 > dbname.sql.gz

Then I get prompted for the username’s password, and there I have it!

VN:F [1.9.1_1087]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)
  • Share/Bookmark

WordPress upgrade to 3.0

I am still so happy that WordPress is still so easy to upgrade. I did mine today in 5 minutes as stated.

I wish all my upgrades where this easy.

VN:F [1.9.1_1087]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)
  • Share/Bookmark

JVM and Tomcat 6 Tuning new Grails application with legacy Java webservice

Recently I ran into issues where a web application running on Tomcat 6.0 was crashing due to load spikes in requests. What I noticed in the diagrams below, was there was no issue with CPU or Memory, but rather issues with GC cycles and high Thread count/spike causing the Tomcat instance to become unresponsive and not take anymore requests.

I will note, I noticed the Grails and Springframework was using about 5% to 10% more memory over my legacy JSP only application, but did not affect this testing as I was maxed at around 1.1GM of memory usage for 560 concurrent requests. The normal load will only be around 75 to 125 concurrent requests.

What I needed to do is get the JVM to perform better, and have Tomcat manage threads better. Read the rest of this entry »

VN:F [1.9.1_1087]
Rating: 9.0/10 (1 vote cast)
VN:F [1.9.1_1087]
Rating: +1 (from 1 vote)
  • Share/Bookmark