Compiling Apache 2.0 with Mod_JK support HOWTO

Tech, Web No Comments

Compiling the mod_jk module in to the apache webserver allows for threading of jk connections and thus increases performance of your Tomcat, Jboss, or other AJP based web application. It will also increase the amount of connections you can serve at once. This is why I suggest compiling the module in.

With that said, I have ran in to what seems like a common problem with the instructions provided on the mod_jk website for compiling the module in. I have found the solution through much reading of the make log.

If you go to the mod_jk site page for how to compile the module in (found here - bottom of page) here is what it says:

Connector source is found in /home/tomcat-connectors-1.2.26-src
apache source is found in /home/httpd-2.0.63
[user@host] ~ $ cd /home/tomcat-connectors-1.2.26-src/native
[user@host] ~ $ ./configure –with-apache=${HTTPD_SRC}
[user@host] ~ $ make
[user@host] ~ $ make install
[user@host] ~ $ cd/home/httpd-2.0.63
[user@host] ~ $ sh buildconf
[user@host] ~ $ configure … –with-mod_jk
[user@host] ~ $ make
[user@host] ~ $ make install

This will result in an error in the first make step. When you configure the connector it goes in to the apache source and tries to grab a file that does not exist. Then when you run make, all of the referenced files generated by the configure script based off of the missing file are not there and it results in an error.

~snip~
mod_jk.c:3105: error: dereferencing pointer to incomplete type
mod_jk.c:3107: warning: assignment makes pointer from integer without a cast
mod_jk.c:3109: error: storage size of 'finfo' isn't known
mod_jk.c:3112: error: dereferencing pointer to incomplete type
mod_jk.c:3115: error: dereferencing pointer to incomplete type
mod_jk.c:3117: error: dereferencing pointer to incomplete type
mod_jk.c:3118: warning: initialization makes pointer from integer without a cast
mod_jk.c:3125: error: dereferencing pointer to incomplete type
mod_jk.c:3138: error: dereferencing pointer to incomplete type
mod_jk.c:3149: error: dereferencing pointer to incomplete type
mod_jk.c: In function `jk_map_to_storage':
mod_jk.c:3162: error: dereferencing pointer to incomplete type
mod_jk.c:3162: error: dereferencing pointer to incomplete type
mod_jk.c:3164: error: dereferencing pointer to incomplete type

~snip~

This is caused because the make command is referencing things in the Makefile.aspx file in the apache 2.0 source directory. The problem is that the file has not been generated yet. The aspx file is a perl file generated when you configure the code. So there is in fact a missing step. You must configure the apache source first then follow the online how to that the tomcat people have posted.

THE SOLUTION!!! FOLLOW THESE STEPS AND YOU ARE GOLDEN!
I installed httpd-2.0.63 and tomcat-connectors-1.2.26

The paths are:
/opt/src/httpd-2.0.63
/opt/src/tomcat-connectors-1.2.26-src

Configure the apache source and generate the missing aspx file
[user@host] ~ $ cd /opt/src/httpd-2.0.63
[user@host] ~ $ ./configure –prefix=/opt/apache2

Configure and install the mod_jk connector
[user@host] ~ $ cd /opt/src/tomcat-connectors-1.2.26-src
[user@host] ~ $ ./configure –with-apache=/opt/src/httpd-2.0.63
[user@host] ~ $ make
[user@host] ~ $ make install

RE-Configure the apache source and make/install it
[user@host] ~ $ cd /opt/src/httpd-2.0.63
[user@host] ~ $ sh buildconf
[user@host] ~ $ ./configure –prefix=/opt/apache2 –with-mod_jk
[user@host] ~ $ make
[user@host] ~ $ make install

You are all set and everything should have gone without an error. Just cruise to /opt/apache2/bin and run ./apachectl start

Technorati Tags: , , , , , ,

No! I will not fix your computer!

General 1 Comment

I am so sick and tired of getting asked computer questions! I mention, one time, that I working in the computer industry and the flood of questions and requests follows!

“Can you setup my wireless on my new laptop?”
“Do you know how to setup a VPN?”
“My internet connection seems slow, can you help?”
“I keep getting popup ads on my computer, can you stop those?”
“Will you upgrade my computer for me?”
“Can you configure my outlook?”

NO!!! I Won’t. I HATE COMPUTERS! I like my job because I deal with computers that I, or someone as knowledgeable, has setup and maintained. These are UNIX servers and high dollar machines and equipment. Not your $200 Wal-Mart, spyware riddled, virus plagued, porno-top 9000 laptop piece of shit that you just bought at the flea market! Call the geek squad or something! I hear firedog doesn’t mind dealing with retards! How about this…how about you do a little reading and research on your problem using Google and you can fix it yourself. You may even learn something!

Now, don’t get me wrong, I am not trying to be an asshole about this. If, and ONLY IF, you researched your problem beforehand and you couldn’t find a solution using the magical Google search engine, then ask me and I will be more than happy to help. Show some initiative at the very least! I just hate it when people just assume that I will fix their problem without even trying to fix it on their own. If you are genuinely stuck I don’t mind lending a hand.

The Bladium - Here I come!

Fitness, Martial Arts, Rock Climbing No Comments

So I have made my decision about what gym I am going to join. The Bladium outweighs the YMCA almost two to one. My final deciding factors boiled down to two things.

First, I spoke to a few friends that are black belts in multiple martial arts styles. They all told me that going from one style of karate to another is easier than going from one art to the other. I assumed it would be harder because of being “set in your ways” so to speak.

Second, and more importantly, pay attention business owners… Customer service and staff attitude! The staff at the Downtown Berkeley YMCA were all generally unhelpful. I called there and spoke to three different people through the coarse of a week and they all didn’t care about keeping me or losing me. I would say that the staff at the YMCA had the same attitude as the staff at the Local Wal-Mart - Hate their jobs, hate their customers, and hate their managers. So Screw you YMCA! I don’t need you!

On the other hand, The Bladium’s staff were all more than helpful. Dave Gonzalez is an awesome guy. He helped me get setup as a guest member to try the place out and hooked me up with my membership. By far, the best guy there so far, is Charles. Charles works at the rock wall. He teaches and certifies belaying and he stayed late TWICE for Lisa and me! He was there a half an hour after he was supposed to get out of there to certify us. I would like to see anyone at the YMCA have that kind of dedication to their members. Hell, I wasn’t even a paying member yet! Plus, he is genuinely nice and happy. So, I say it again, SCREW YOU YMCA!

Hyperic Monitoring Availability Grey Circles

Tech 1 Comment

I setup Hyperic Monitoring on my company’s server cluster so that I could get all the awesome data about the tomcat servers and jboss servers because most of our servers are running something in java. It seemed like the better way to go than say Cacti or Nagios. I have monitoring and graphs of data. Perfect right? Wrong! This piece of software has been a nightmare from the beginning. From problems getting the server started properly to getting the agents to report proper data. The Alerts are unreliable in my opinion too. With all the initial setup problems out of the way, here is my newest problem that I fixed after asking questions on their support forum. I Googled this and couldn’t find a single thing so I thought I would share.

Here is the problem: I have 3 nodes that are identical except for hostname and ip address. All three were working fine until all of a sudden node2 quit showing metric data. Now, it reported as available as a “platform” but all services showed that damn gray circle for availability. So it seems that the agent is not sending the data. For those of you who don’t know, there are 4 states in hyperic - Green=all metrics reporting, Yellow=Some metrics are reporting, Red=appears down, and Gray=not receiving a thing for this service. Usually gray comes up when something needs to be configured. Well, out of the blue, I get all gray circles for node2 and the other 2 nodes report fine. I tried to restart the agent. I even tried re-setting the agent’s connection using the setup command. Nothing worked. Well after a day of Googling and searching their forums I found nothing about the problem. So I decided to ask the question on the forum.

The reponse I got was that I should check the system times. If the metric reports things that are timestamped ahead of the HQ server time, the HQ says “I can’t get things from the future…that makes no sense” and considers it bad data. Hence the gray circles.

So, if you have this problem in your Hyperic HQ Dashboard, try syncing all the servers’ time (I suggest setting up an NTP server locally so that all the servers are syncing to each other and not an unreliable source). Then Restart the agents and watch the magic.

Helpful links:
My Forum Thread
Hyperic’s Site

Technorati Tags: , , , ,

Shotokan vs Wado Ki Kai

Martial Arts 2 Comments

To some people Shotokan and Wado Ki Kai are recognizable but to most it just looks like random letters that are possibly asian and possibly just made up. To the majority of you that don’t know, here is an explanation..

They are both Karate styles, so yes they are Japanese words.

Shotokan is the ancient original karate style that has been around since the 1600’s and is what you see in Karate Kid and other karate movies.

Wado Ki Kai is a form of karate that was brought here in the 1970’s and translates to “To learn from all things”. This karate style utilizes the punches and power of Shotokan style with the more powerful kicking of Tae Kwon Doe. There are also elements of Jujitsu mixed in. This style is a mutt but more complete and rounded (in my humble opinion).

The Dilemma:
I want to take karate training, that part is for sure, but I have a problem of choice. I really would like to take the Shotokan karate but there are some serious factors to consider.

Wado Ki Kai is hosted very near to where I live in the Bladium sports complex. My membership would cost $90 a month for full access to the complex, this includes a rock wall and full gym. It is a short drive.

Shotokan is hosted at the Berkeley YMCA. It takes 45 minutes, in traffic, to get there and the membership dues are $112 a month. There is a pool but no rock wall and I probably wouldn’t use the gym as much because parking is a pain as well.

I would much rather study the traditional style of Shotokan than the mutt Wado Ki Kai but I am kind of leaning towards the Bladium because of the ease and rock gym. AH! I can’t decide!

Links:
http://www.wadokikai.com/ - Wado Ki Kai website
http://berkeleyska.org/ - Berkeley Shotokan website
http://www.ska.org/ - Shotokan of America website
www.bladium.com/ - Bladium website
www.baymca.com - YMCA website

Les Mills = Devil Part 2

Fitness No Comments

Today was “Body Combat” and I am soooooo feeling it! Body Combat is like Tae Bo on Steroids! A cardio workout that works your whole body too….uhg…If my muscles weren’t hurting enough already… Seriously, does ANYONE HAVE WALKER FOR ME?!

Les Mills, You Are The Devil!

Fitness No Comments

Yesterday was “BodyPump” at the gym and I can’t even begin to explain how sore I am today.

Last night I tried the hour-long class and died about 45 minutes in to it. This class is freaking intense! To make matters even worse, the class was on the second floor of the gym and after 20 minutes of squats and lunges with 15 pounds of weight on my back I thought that I would be stuck on the second floor for a few days because my legs where having trouble just holding my body up. I had to walk down the stairs with a death grip on the hand rail to keep from falling down the stairs. This morning though…oh my, my legs are screaming! I can’t begin to explain the amount of soreness that is present on the second day.. My walk to work was agonizing and I feel like my thighs are going to burst in to flames at any second! Does anyone have a walker I can borrow for a few days?

New Glasses

General No Comments

I bit the bullet and bought reading glasses and I must admit I am liking them so far. They are only like +0.50 in one eye but they rock. Here is photo: