Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > tomcat and apache: mod_jserv.so

tomcat and apache: mod_jserv.so
Thread Tools
pdebbas
Guest
Status:
Reply With Quote
Oct 18, 2000, 05:29 AM
 
i have managed to configure tomcat on os x pb. it works fine on port 8080. but setting it up to run with apache, needs a module called

mod_jserv.so

since i can't find it in the apache module directory or elsewhere on my computer, i wanted to compile it with apxs. but again apxs does not come with apache on mac os x pb.

who can help me here?
     
Fresh-Faced Recruit
Join Date: Oct 2000
Status: Offline
Reply With Quote
Oct 18, 2000, 09:13 PM
 
I have tried to compile the jserv module with apxs and no luck. for some reason after it compiles the mod_jserv.so file is not generated. an autochange.so file is created-- but I don't know what the correlation is. BTW I recompiled apache with no problem and did the osx beta layout, I am going to do a more standard layout to see if that works.

Jonathan
     
Junior Member
Join Date: Feb 2000
Location: Chicago, IL
Status: Offline
Reply With Quote
Oct 18, 2000, 09:23 PM
 
Yep. Had the same problem. apxs must come with the dev tools (I didn't take note before and after, but I have it). If you need it download with free membership to the AppleDeveloperConnection.

I've even tried some binaries of mod_jserv in addition to the home-compiled one. I used to get a mod_jserv.so when I was compiling and had Apache 1.3.12, but when I installed 1.3.14, and it no longer works. With the binary (regardless of how it was generated) Apache was unable to load it on startup and quit - error unknown in the Console.
     
Junior Member
Join Date: Feb 2000
Location: Chicago, IL
Status: Offline
Reply With Quote
Oct 18, 2000, 09:43 PM
 
heres the shell response I get to the apxs command:

apxs -c *.c -o mod_jserv.so

cc -DDARWIN -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -arch i386 -arch ppc -DSHARED_MODULE -I/System/Library/Frameworks/Apache.framework/Versions/1.3/Headers -c autochange.c
cc: cannot read specs file.
apxs:Break: Command failed with rc=1
     
Junior Member
Join Date: Feb 2000
Location: Chicago, IL
Status: Offline
Reply With Quote
Oct 18, 2000, 11:44 PM
 
Has anyone tried building jserv into apache rather than using the DSO?
     
pdebbas
Guest
Status:
Reply With Quote
Oct 19, 2000, 02:21 AM
 
there is an error in the documentation. to compile you need to enter
apxs -c mod_jserv.c jserv*.c

nevertheless i get some warnings, and after adding in httpd.conf the include tomcat-apche.conf apache tries to load mod_jserv.so and i get the follwoing error:
API module structure 'jserv_module' in file mod_jserv.so is garbled - perhaps this is not an Apache module DSO?

if anybody got further, please tell me.
thanx
     
Junior Member
Join Date: Feb 2000
Location: Chicago, IL
Status: Offline
Reply With Quote
Oct 22, 2000, 12:07 PM
 
I noticed in further documentation mention that there is a different DSO mod when using the more recent versions of Tomcat. Its called mod_jk.so. Documentation mentions that it is simpler than the mod_jserv version, but it probably is only compatible with the 3.2 and newer Tomcat distributions. http://jakarta.apache.org/tomcat/jak..._jk-howto.html
     
rouet
Guest
Status:
Reply With Quote
Oct 24, 2000, 03:56 AM
 
Originally posted by mcdoken:
I noticed in further documentation mention that there is a different DSO mod when using the more recent versions of Tomcat. Its called mod_jk.so. Documentation mentions that it is simpler than the mod_jserv version, but it probably is only compatible with the 3.2 and newer Tomcat distributions. http://jakarta.apache.org/tomcat/jak..._jk-howto.html
To compile mod_jk.so on MacOS X, you have to modify source code.
I modified 2 files "jk_util.c" and "jk_jni_worker.c" and I create a Makefile.
If someone is interested, I can send him these files.
     
Fresh-Faced Recruit
Join Date: Jun 2000
Location: Oslo, Norway
Status: Offline
Reply With Quote
Oct 24, 2000, 10:13 AM
 
Originally posted by rouet:
To compile mod_jk.so on MacOS X, you have to modify source code.
I modified 2 files "jk_util.c" and "jk_jni_worker.c" and I create a Makefile.
If someone is interested, I can send him these files.
I'm interested. How do I get in touch with you?

It would also have been cool if you submitted these patches to jakarta.apache.org, so that they'd find their way into the official distribution of Tomcat.



[This message has been edited by scotty (edited 10-24-2000).]
     
rouet
Guest
Status:
Reply With Quote
Oct 25, 2000, 02:22 AM
 
If you press on the icon just above, you will see my email.

I will contact Jakarta.

------------------
JR
     
Junior Member
Join Date: Feb 2000
Location: Chicago, IL
Status: Offline
Reply With Quote
Oct 25, 2000, 11:45 PM
 
I haven't tried this yet, but it looks like it might do the trick.
http://www.omnigroup.com/mailman/arc...er/004046.html
     
Fresh-Faced Recruit
Join Date: Oct 1999
Status: Offline
Reply With Quote
Oct 26, 2000, 03:06 PM
 
check out [link]http://www.jspformacs.com/[link], too
     
Fresh-Faced Recruit
Join Date: Oct 2000
Status: Offline
Reply With Quote
Oct 26, 2000, 07:40 PM
 
we haven't been able to get it complied either.

check out the itools demo at tenon.com

BTW: thanks to mat vaughn's installers we were able to get php and mysql talking to each other in 20 minutes.

a month since we launched and we still haven't got all the jsp stuff working.

you should look at php too.
     
Fresh-Faced Recruit
Join Date: Jun 2000
Location: Oslo, Norway
Status: Offline
Reply With Quote
Oct 30, 2000, 04:39 AM
 
Originally posted by jspformacs.com:
we haven't been able to get it complied either.
I finally got mod_jk.so to compile. Rouen sent me his modification, which didn't work for me, but the link mcdoken posted earlier in this thread worked well.

The strange thing is that the JSP compile time is _very_ slow when mod_jk is used together with Tomcat 3.2. The upside is that mod_jk also can be used with the slightly older Tomcat 3.1, and JSP compile times gets acceptable.

Scotty
     
Fresh-Faced Recruit
Join Date: Oct 2000
Location: Wichita
Status: Offline
Reply With Quote
Oct 31, 2000, 08:09 AM
 
Apache works by itself - Thanks Apple.
Tomcat works when going to port 8080 - Thanks jspformacs.com.

I downloaded the source for Tomcat and compiled the mod_jserv.so module (developer pkg installed, compiled with little complaint), placed it with the other Apache modules and made sure that everything pointed to it just fine. Apache refused to start when it was directed to the tomcat-apache.conf so I ran the configtest and got this message:

[localhost:/usr/sbin] root# apachectl configtest
dyld: /usr/sbin/apache multiple definitions of symbol _main
/usr/sbin/apache definition of _main
/System/Library/Apache/Modules/mod_jserv.so definition of _main

Any clues? Thanks! I haven't tried mod_jk yet. Is that a better direction?

Brad
     
Fresh-Faced Recruit
Join Date: Jun 2000
Location: Oslo, Norway
Status: Offline
Reply With Quote
Oct 31, 2000, 10:29 AM
 
Originally posted by Siegfreid:
I haven't tried mod_jk yet. Is that a better direction?
mod_jk uses a newer protocol for communication between the servlet engine and the web server, which is supposed to be faster and provide better scalability. mod_jk can also be used with Apache 2.0 and Netscape servers, and gives users the possibility to run the servlet engine in the same process as the web server itself. This is supposed to be very fast.

mod_jserv is written for use with Apache 1.2/1.3 only.

These differences don't matter much to me personally. I chose mod_jk because that was the module I got to compile.

[This message has been edited by scotty (edited 10-31-2000).]
     
Fresh-Faced Recruit
Join Date: Oct 2000
Location: Wichita
Status: Offline
Reply With Quote
Nov 1, 2000, 11:39 AM
 
OK, now I'm trying to make mod_jk. I've done the edits as shown at:
http://www.omnigroup.com/mailman/arc...er/004912.html

I'm getting this message:

[localhost:src/native/apache1.3] root# make -f Makefile.freebsd mod_jk.so
make: *** No rule to make target `mod_jk.so'. Stop.

I copied the file Makefile.freebsd as shown at omnigroup.

I'm not familiar with make files. Has anyone else successfully compiled with that makefile?

Thanks,

Brad
     
Fresh-Faced Recruit
Join Date: Jun 2000
Location: Oslo, Norway
Status: Offline
Reply With Quote
Nov 2, 2000, 06:08 AM
 
Originally posted by Siegfreid:

[localhost:src/native/apache1.3] root# make -f Makefile.freebsd mod_jk.so
make: *** No rule to make target `mod_jk.so'. Stop.

I copied the file Makefile.freebsd as shown at omnigroup.
Try
make -f Makefile.freebsd

or copy Makefile.freebsd to Makefile and just type make. That ought to do the trick.

     
Fresh-Faced Recruit
Join Date: Oct 2000
Location: Wichita
Status: Offline
Reply With Quote
Nov 2, 2000, 09:00 AM
 
AAACCKKK! I keep trying different approaches to getting this thing to compile for me with no luck. If someone has a binary of mod_jk.so is there any issue with running it on different machines? If not could someone email me a copy? This is just for internal use testing servlets.

I managed to get Ant and Tomcat working. Can't figure why I'm failing at this.

Of course MacOS X is my first attempt at actually understanding UNIX.

Thanks,

Brad
     
KewlMOTD
Guest
Status:
Reply With Quote
Dec 28, 2000, 01:20 AM
 
compiling mod_jserv.so:

apsx -c -o mod_jserv.so mod_jserv.c jserv_protocols.c jserv_mmap.c jserv_watchdog.c jserv_balance.c jserv_utils.c jserv_image.c jserv_status.c jserv_ajpv11.c jserv_ajpv12.c jserv_wrapper.c jserv_wrapper_unix.c

that's the dirty way(sorry about the quick). You can always look in the makefiles to see which files to compile. Move it to the Modules/ directory, and add an include to tomcat-apache.conf in apache.conf. Restart Apache and Tomcat, voila.

[This message has been edited by KewlMOTD (edited 12-28-2000).]
     
powert
Guest
Status:
Reply With Quote
Dec 28, 2000, 09:49 AM
 
What actually is the -DEAPI flag that is built into our /usr/sbin/apxs file?? When I recompiled some so's and overwrote the built in apache *.so when I restarted apache it complained that it needed to be compiled with this option... apparently it all has to do with mod_ssl, saw a quick one liner on it in the documentation, but I cannot find more info about it, can someone fill me in?

Tim
     
powert
Guest
Status:
Reply With Quote
Dec 28, 2000, 11:13 AM
 
OK so I've made it compile and create the so, but the point is that it only works when you fully specify the correct order of the c files.

Why do I get all that gunk output on my terminal as it compiles? Some compatibility issue with the Apache apple 1.3 headers and the Jserv headers.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:48 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2