Quantcast
Channel: GlassFish Related Items on Java.net
Viewing all articles
Browse latest Browse all 1091

Glassfish and mod_jk not working / 404 error

$
0
0

I need help making mod_jk work with Glassfish.

I am running CentOS 6 on a GoDaddy virtual dedicated server. GoDaddy included the Parallels Plesk Panel to manage the server. I have installed the Glassfish 3.1.2.2 server and the Joomla 3.0.2 content management system. I am running Apache/2.2.15.

I have deployed Java applications on Glassfish and can access them with URI's that include
the server's port number:

http://www.eonsahead.com:8080/dynamic/landscape
http://www.eonsahead.com:8080/cellularautomata

I would like to be able to access them with URI's that look like this:

http://www.eonsahead.com/landscape
http://www.eonsahead.com/dynamic/cellularautomata

To do this, I followed instructions that I found in Amy Roh's posting on java.net.

I downloaded and compiled mod_jk and moved mod_jk.so to /etc/httpd/modules.

I edited /etc/httpd/conf/workers.properties so that it looks like this:

worker.list=worker1
worker.worker1.port=8009
worker.worker1.host=localhost
worker.worker1.type=ajp13
#worker.list=ajp13
#worker.ajp13.port=9008
#worker.ajp13.host=localhost
#worker.ajp13.type=ajp13

I created /etc/httpd/conf.d/glassfish.conf. It looks like this:

# where to find workers.properties
#JkWorkersFile /etc/httpd/conf/workers.properties
# where to put jk logs
JkLogFile /var/log/httpd/mod_jk.log
# set the jk log level [debug/error/info]
JkLogLevel info
# select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# jkRequestLogFormat set the request format
jkRequestLogFormat "%w %V %T"
# send everything for context /dynamic to worker named worker1 (ajp13)
jkMount /dynamic/* worker1
jkMount /landscape worker1

I have commented out the JkWorkersFile directive here because Apache
allows this directive only once and I found it already contained in:

/usr/local/psa/admin/conf/generated/13439510590.54764400_server.include

That file contains this:

<IfModule mod_jk.c>
   JkWorkersFile "/etc/httpd/conf/workers.properties"
   JkLogFile /var/log/httpd/mod_jk.log
   JkLogLevel info

It points to my workers.properties file.

I created a jk-enabled network listener like this:

asadmin create-network-listener --protocol http-listener-1 --listenerport 8009 --jkenabled true jk-connector

I restarted Apache and Glassfish.

I can see the jk-connector network listener listed on the Glassfish administrator's console.

I also can see it this way:

$ netstat -a | grep 8009 
tcp        0      0 *:8009                      *:*                         LISTEN 

When I try to access my Java applications, I see a "404 Category not found" error
on Joomla.

I "sudo tail /var/log/httpd/error_log" and see this:

[Tue Dec 11 09:14:30 2012] [notice] mod_python: using mutex_directory /tmp 
[Tue Dec 11 09:14:30 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Dec 11 09:14:30 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Dec 11 09:14:30 2012] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Tue Dec 11 09:14:30 2012] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Tue Dec 11 09:14:30 2012] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fcgid/2.3.6 mod_jk/1.2.37 mod_python/3.3.1 Python/2.6.6 mod_ssl/2.2.15 OpenSSL/1.0.0-fips mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Tue Dec 11 09:14:30 2012] [error] avahi_entry_group_add_service_strlst("lists") failed: Invalid host name
[Tue Dec 11 09:14:30 2012] [error] avahi_entry_group_add_service_strlst("lists") failed: Invalid host name
[Tue Dec 11 09:14:30 2012] [error] avahi_entry_group_add_service_strlst("default-184_168_117_170") failed: Invalid host name
[Tue Dec 11 09:14:30 2012] [error] avahi_entry_group_add_service_strlst("default") failed: Invalid host name

The time and date correspond to the time at which I restarted httpd.

I type "sudo tail /var/log/httpd/mod_jk.log" and see this:

[Tue Dec 11 09:14:30 2012] [15762:47150044530336] [info] init_jk::mod_jk.c (3365): mod_jk/1.2.37 initialized
[Tue Dec 11 09:14:30 2012] [15763:47150044530336] [info] init_jk::mod_jk.c (3365): mod_jk/1.2.37 initialized

Any ideas on how I can make this work?


Viewing all articles
Browse latest Browse all 1091

Trending Articles