----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
Do you have 2 separate httpd.conf files pointing to two separate
jserv.conf/properties files? Is the following an example of the 2nd
installation & config files? Does the first http/jserv server run ok? Did
you rename the log files for the first httpd/jserv instance (assume
working)and make sure that both servers could write to the log dir? If the
following is an example of the 2nd non working server configuration (by
server I mean http/jserv) you might have one problem......as (from what I
understand of the process) jserv.conf and jserv.properties relate to the two
communicating components...the httpd/mod_jserv component and the
servlet_engine/JVM component. Your jserv.conf below sets the default port of
one componenet to 8007 and the other files sets it to 15643. This would seem
to be a conflict?
JN
-----Original Message-----
From: John Scott [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 17, 1999 9:39 AM
To: '[EMAIL PROTECTED]'
Subject: Running Multiple Apache Installations
----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
Jserv 1.0
Apache 1.3.9
Solaris 2.7
I have two installations of Apache w/Jserv running on one server. A
prodution instance(Port 80) and a development instance(Port 8080). I was
getting a java.net.BindException error: Address already in use error
because both ajpv11 protocols were set up to use Port 8007. So I changed
one of the Port settings to 15643 as in the documentation. However, now I
am getting the following error in the jserv.log file.
Jserv.log:
[17/11/1999 12:23:46:571] (EMERGENCY) ajp11: can not connect to host
127.0.0.1:15643
[17/11/1999 12:23:46:572] (EMERGENCY) ajp11: connection fail
[17/11/1999 12:23:46:572] (ERROR) an error returned handling request via
protocol "ajpv11"
jserv.conf:
############################################################################
###
# Apache JServ Configuration File
#
############################################################################
###
# Note: this file should be appended to httpd.conf
# Tell Apache on win32 to load the Apache JServ communication module
LoadModule jserv_module libexec/mod_jserv.so
# Whether Apache must start JVM or not (On=Manual Off=Autostart)
# Syntax: ApJServManual [on/off]
# Default: "Off"
ApJServManual off
# Properties filename for Apache JServ in Automatic Mode.
# In manual mode this directive is ignored
# Syntax: ApJServProperties [filename]
# Default: "./conf/jserv.properties"
ApJServProperties /usr/local/apache/conf/jserv.properties
# Log file for this module operation relative to Apache root directory.
# Syntax: ApJServLogFile [filename]
# Default: "./logs/mod_jserv.log"
# Note: when set to "DISABLED", the log will be redirected to Apache error
log
ApJServLogFile /usr/local/apache/logs/jserv.log
# Protocol used by this host to connect to Apache JServ
# (see documentation for more details on available protocols)
# Syntax: ApJServDefaultProtocol [name]
# Default: "ajpv11"
ApJServDefaultProtocol ajpv11
# Default host on which Apache JServ is running
# Syntax: ApJServDefaultHost [hostname]
# Default: "localhost"
#ApJServDefaultHost
# Default port that Apache JServ is listening to
# Syntax: ApJServDefaultPort [number]
# Default: protocol-dependant (for ajpv11 protocol this is "8007")
ApJServDefaultPort 8007
# Passes parameter and value to specified protocol.
# Syntax: ApJServProtocolParameter [name] [parameter] [value]
# Default: NONE
# Note: Currently no protocols handle this. Introduced for future protocols.
# Apache JServ secret key file relative to Apache root directory.
# Syntax: ApJServSecretKey [filename]
# Default: "./conf/jserv.secret.key"
# Warning: if authentication is DISABLED, everyone on this machine (not just
# this module) may connect to your servlet engine and execute servlet
# bypassing web server restrictions. See the documentation for more
information
ApJServSecretKey DISABLED
# Mount point for Servlet zones
# (see documentation for more information on servlet zones)
# Syntax: ApJServMount [name] [jserv-url]
# Default: NONE
# Note: [name] is the name of the Apache URI path to mount jserv-url on
# [jserv-url] is something like "protocol://host:port/zone"
# If protocol, host or port are not specified, the values from
# "ApJServDefaultProtocol", "ApJServDefaultHost" or "ApJServDefaultPort"
# will be used.
# If zone is not specified, the zone name will be the first subdirectory of
# the called servlet.
# Example: "ApJServMount /servlets /myServlets"
# if user requests "http://host/servlets/TestServlet"
# the servlet "TestServlet" in zone "myServlets" on default host
# thru default protocol on defaul port will be requested
# Example: "ApJServMount /servlets ajpv11://localhost:8007"
# if user requests "http://host/servlets/myServlets/TestServlet"
# the servlet "TestServlet" in zone "myServlets" will be requested
# Example: "ApJServMount /servlets
ajpv11://jserv.mydomain.com:15643/myServlets"
# if user requests "http://host/servlets/TestServlet" the servlet
# "TestServlet" in zone "myServlets" on host "jserv.mydomain.com" using
# "ajpv11" protocol on port "15643" will be executed
##ApJServMount /example /example
#ApJServMount /servlet/editorial /prod
#ApJServMount /servlet /prod
ApJServMount /servlet ajpv11://localhost:15643/prod
# Whether <VirtualHost> inherits base host mount points or not
# Syntax: ApJServMountCopy [on/off]
# Default: "On"
# Note: This directive is meaninful only when virtual hosts are being used
ApJServMountCopy on
# Executes a servlet passing filename with proper extension in
PATH_TRANSLATED
# property of servlet request.
# Syntax: ApJServAction [extension] [servlet-uri]
# Defaults: NONE
# Notes: This is used for external tools such as JSP (Java Servlet Pages),
# GSP (GNU Server Pages) or Java server side include.
#ApJServAction .jsp /servlets/nl.nmg.jsp.JSPServlet
#ApJServAction .gsp /servlets/com.bitmechanics.gsp.GspServlet
#ApJServAction .jhtml /servlets/org.apache.servlet.ssi.SSI
ApJServAction .jsp /servlet/gnujsp
# Enable the Apache JServ status handler with the URL of
# "http://servername/jserv/" (note the trailing slash!)
# Change the ".your_domain.com" to match your domain to enable.
<Location /jserv/>
SetHandler jserv-status
order deny,allow
deny from all
allow from localhost 127.0.0.1
</Location>
############################## W A R N I N G
##################################
# Remember to disable or otherwise protect the execution of the Apache JServ
#
# on a production environment since this may give untrusted users to gather
#
# restricted information on your servlets and their initialization arguments
#
############################################################################
###
jserv.properties:
###################################
# Apache JServ Configuration File #
###################################
################################### WARNING
####################################
# Unlike normal java properties, JServ configurations
# have some important extentions:
#
# 1) commas are used as token separators
# 2) multiple definitions of the same key
# are concatenated in a comma separated list.
############################################################################
####
# Execution parameters
#######################
# The Java Virtual Machine interpreter
# Syntax: wrapper.bin=[filename]
# Default: "/usr/bin/java" for Unix systems
# "c:\jdk\bin\java.exe" for Win32 systems
wrapper.bin=/usr/java1.2/bin/java
# Arguments passed to java interpreter (optional)
# Syntax: wrapper.bin.parameters=[string]
# Default: NONE
# Apache JServ entry point class
# Syntax: wrapper.class=[classname]
# Default: "org.apache.jserv.JServ"
wrapper.class=org.apache.jserv.JServ
# Arguments passed to main class after the properties filename
# Syntax: wrapper.class.parameters=[string]
# Default: NONE
# Note: currently not used
# PATH environment value passed to the JVM
# Syntax: wrapper.path=[path]
# Default: "/bin:/usr/bin:/usr/local/bin" for Unix systems
# "c:\(windows-dir);c:\(windows-system-dir)" for Win32 systems
# Notes: if more than one line is supplied these will be concatenated using
# ":" or ";" (depending wether Unix or Win32) characters
# Under Win32 (windows-dir) and (windows-system-dir) will be
# automatically evaluated to match your system requirements
# CLASSPATH environment value passed to the JVM
# Syntax: wrapper.classpath=[path]
# Default: NONE (Sun's JDK/JRE already have a default classpath)
# Notes: if more than one line is supplied these will be concatenated using
# ":" or ";" (depending wether Unix or Win32) characters.
# JVM must be able to find JSDK and JServ classes and any
# utility classes used by your servlets.
#wrapper.classpath=
wrapper.classpath=/usr/local/jserv/lib/ApacheJServ.jar
wrapper.classpath=/opt/JSDK2.0/lib/jsdk.jar
wrapper.classpath=/usr/java1.2/lib/tools.jar
wrapper.classpath=/opt/oracle/product/8.0.4/network/jre11/lib/rt.jar
wrapper.classpath=/opt/oracle/product/8.0.4/jdbc/lib/classes111.zip
wrapper.classpath=/usr/local/apache/classes/cos.jar
# An environment name with value passed to the JVM
# Syntax: wrapper.env=[name]=[value]
# Default: NONE on Unix Systems
# SystemDrive and SystemRoot with appropriate values on Win32
systems
# An environment name with value copied from caller to JAVA Virtual Machine
# Syntax: wrapper.env.copy=[name]
# Default: NONE
# Copies all environment from caller to JAVA Virtual Machine
# Syntax: wrapper.env.copyall=[true,false]
# Default: false
# Protocol used for signal handling
# Syntax: wrapper.protocol=[name]
# Default: ajpv11
# General parameters
######################
# Set the port JServ will listen to.
# Syntax: port=[1024,65535] (int)
# Default: 8007
#port=8007
port=15643
# Servlet Zones parameters
###########################
# List of servlet zones JServ manages
# Syntax: zones=<servlet zone>,<servlet zone>... (Comma separated list of
String)
# Default: <empty>
zones=prod
# Configuration file for each servlet zone
# Syntax: <servlet zone name as on the zones list>.properties=<full path to
configFile> (String)
# Default: <empty>
prod.properties=/usr/local/apache/conf/prod.properties
# Security parameters
#####################
# Enable/disable the execution of org.apache.jserv.JServ as a servlet.
# This is disabled by default because it may give informations that should
# be restricted.
# Note that the execution of JServ as a servlet is filtered by mod_jserv
# by default so that both sides should be enabled to let this service work.
# This service is useful for installation and configuration since it gives
# feedback about the exact configurations JServ is set with, but it should
# be disabled when both installation and configuration processes are done.
# Syntax: security.selfservlet=[true,false] (boolean)
# Default: false
#security.selfservlet=true
# Set the maximum number of socket connections JServ may handle
simultaneously.
# (this number does not identify the maximum number of concurrent servlet
# requests: see the JServ protocol specification for more info on this)
# Syntax: security.maxConnections=(int)>1
# Default: 50
security.maxConnections=50
# List of IP addresses allowed to connect to JServ. This is a first security
# filtering to reject possibly unsecure connections and avoid the overhead
# of connection authentication.
# Syntax: security.allowedAddresses=<IP address>,<IP Address>... (Comma
separated list of IP adresses)
# Default: <empty list>
security.allowedAddresses=127.0.0.1
# Enable/disable connection authentication.
# NOTE: unauthenticated connections are a little faster since authentication
# handshake is not performed at connection creation.
# WARNING: disable authentication only if you can protect the intrusion on
# the port JServ listens on with other systems or do it at your own risk.
# Syntax: security.authentication=[true,false] (boolean)
# Default: true
security.authentication=false
# Authentication secret key.
# The secret key is passed as a file that must be kept secure and must
# be exactly the same of those used by clients to authenticate themselves.
# Syntax: security.secretKey=<secret key file> (String)
# Default: <empty>
#security.secretKey=
# Length of the randomly generated challenge string (in bytes) used to
# authenticate connections. 5 is the lowest possible choice to force a safe
# level of security and reduce connection creation overhead.
# Syntax: security.challengeSize=(int)>5
# Default: 5
security.challengeSize=5
# Logging parameters
####################
# Enable/disable JServ tracing, used for debugging and development.
# WARNING: tracing is a very costy operation in term of performance and
# its disabled by default. Note that trace logs may become really big
# since each servlet connection may generate many Kb of log.
# Syntax: log=[true,false] (boolean)
# Default: false
log=true
# Set the name of the trace/log file. To avoid possible confusion about
# the location of this file, an absolute pathname is recommended.
# On Unix, this file must have write permissions by the owner of the JVM
# process. In other words, if you are running Apache JServ in manual mode
# and Apache is running as user nobody, then the file must have its
# permissions set so that that user can write to it.
# Syntax: log.file=<log file name> (String)
# Default: NONE
#log.file=jserv.log
log.file=/usr/local/apache/logs/jserv.log
# Enable the timestamp before the log message
# Syntax: log.timestamp=[true,false] (boolean)
# Default: true
log.timestamp=true
# Use the given string as a data format
# (see java.text.SimpleDateFormat for the list of options)
# Syntax: log.dateFormat=(String)
# Default: [dd/MM/yyyy HH:mm:ss:SSS zz]
log.dateFormat=[dd/MM/yyyy HH:mm:ss:SSS zz]
# Enable/disable channels, each logging different part of the code
# self-explained by their names.
# Syntax: log.channel.<channel name>=[true,false] (boolean)
# Default: false
log.channel.servletLog=true
log.channel.init=true
log.channel.terminate=true
log.channel.serviceRequest=true
log.channel.authentication=true
log.channel.requestData=true
log.channel.responseHeaders=true
log.channel.signal=true
log.channel.exceptionTracing=true
log.channel.servletManager=true
prod.properties:
############################################################################
###
# Servlet Zone Configuration File
#
############################################################################
###
################################ W A R N I N G
################################
#
# Unlike normal Java properties, JServ configurations have some important
# extentions:
#
# 1) commas are used as token separators
# 2) multiple definitions of the same key are concatenated in a
# comma-separated list.
#
############################################################################
###
# List of Repositories
#######################
# The list of servlet repositories controlled by this servlet zone
# Syntax: repositories=[repository],[repository]...
# Default: NONE
#repositories=/usr/local/apache/servlets
repositories=/usr/local/apache/classes
repositories=/usr/local/apache/classes/gnujsp10.jar
repositories=/usr/local/apache/classes/servlet-2.0-plus.jar
# Classloader parameters
#########################
# Enable servlet class autoreloading.
# Syntax: autoreload.classes=[true,false] (boolean)
# Default: true
autoreload.classes=true
# Enable servlet resourced autoreloading (properties and other loaded
resources)
# Syntax: autoreload.file=[true,false] (boolean)
# Default: true
autoreload.file=true
# Set the number of millisecond to wait before giving up on initializing a
servlet.
# (a timeout of zero means no timeout)
# Syntax: init.timeout=(long)>0
# Default: 10000 (10 secs)
init.timeout=10000
# Set the number of millisecond to wait before giving up on destroying a
servlet.
# (a timeout of zero means no timeout)
# Syntax: destroy.timeout=(long)>0
# Default: 10000 (10 secs)
destroy.timeout=10000
# Set the number of millisecond to wait before invalidating an unused
session.
# Syntax: session.timeout=(long)>0
# Default: 1800000 (30 mins)
session.timeout=1800000
# Set how frequently (milliseconds) to check for timed-out sessions.
# Syntax: session.checkFrequency=(long)>0
# Default: 30000 (30 secs)
session.checkFrequency=30000
# SingleThreadModel Servlets parameters
########################################
# Set the initial capacity of the STM servlets pool.
# Syntax: singleThreadModelServlet.initialCapacity=(int)>1
# Default: 5
singleThreadModelServlet.initialCapacity=5
# Set the number of servlet instances should be added to the pool if found
empty.
# Syntax: singleThreadModelServlet.incrementCapacity=(int)>1
# Default: 5
singleThreadModelServlet.incrementCapacity=5
# Set the maximum capacity of the STM pool
# Syntax: singleThreadModelServlet.maximumCapacity=(int)>1
# Default: 10
singleThreadModelServlet.maximumCapacity=10
################### S E R V L E T P A R A M E T E R S
######################
################################## N O T E
####################################
# When "classname" is specified, it means a Java dot-formatter full class
name
# without the ".class". For example, a class with source file named
# "Dummy.java" with a package name "org.fool" is defined as
"org.fool.Dummy".
#
# Since each servlet may have lots of private initialization data, Apache
JServ
# allows you to store those servlet initArgs in a separate file. To do this,
# simply do not set any initArgs in this file: Apache JServ will then look
for
# a file named "[servlet classname].initargs" in the same directory of that
# class. Note that this may work with even class archives.
############################################################################
###
# Startup Servlets
###################
# Comma or space delimited list of servlets to launch on startup.
# This can either be a class name or alias.
# Syntax: servlets.startup=[classname or alias],[classname or alias],...
# Default: NONE
# servlets.startup=hello,snoop,org.fool.Dummy
# Servlet Aliases
##################
# This defines aliases from which servlets can be invoked.
# Each alias give a new instance of the servlet. This means that if a
servlet
# is invoked both by class name and by alias name, it will result in _TWO_
# instances of the servlet being created.
# Syntax: servlet.[alias].code=[classname] (String)
# Default: NONE
# servlet.snoop.code=SnoopServlet
# servlet.hello.code=org.fool.Dummy
servlet.gnujsp.code=org.gjt.jsp.JspServlet
# Global Init Parameters
#########################
# Parameters passed here are given to each of servlets. You should put
# configuration information that is common to all servlets.
#
# The value of the property is a comma delimited list of "name=value" pairs
# that are accessible to the servlet via the method getInitParameter()
# in ServletConfig.
# Syntax: servlets.default.initArgs=[name]=[value],[name]=[value],...
# Default: NONE
# servlets.default.initArgs=common.to.everybody=Hi everybody!
# Servlet Init Parameters
##########################
# These properties define init parameters for each servlet that is invoked
# by its classname.
# Syntax: servlet.[classname].initArgs=[name]=[value],[name]=[value],...
# Default: NONE
# servlet.org.fool.Dummy.initArgs=message=I'm a dummy servlet
# Aliased Servlet Init Parameters
##################################
# These properties define init parameters for each servlet that is invoked
# by its alias.
# Syntax: servlet.[alias].initArgs=[name]=[value],[name]=[value],...
# Default: NONE
# servlet.snoop.initArgs=message=I'm a snoop servlet
# servlet.hello.initArgs=message=I say hello world to everyone
servlet.gnujsp.initArgs=scratchdir=/usr/local/apache/classes
servlet.gnujsp.initArgs=debug=true
servlet.gnujsp.initArgs=checkclass=true
servlet.gnujsp.initArgs=pagebase=/usr/local/apache/htdocs
servlet.gnujsp.initArgs=compiler=builtin-javac -classpath
%classpath%:%scratchdir%:/usr/local/apache/classes/servlet-2.0-plus.jar:/usr
/local/apache/classes/gnujsp10.jar -d %scratchdir% -deprecation %source%
Thanks,
John R. Scott, Jr.
Consultant
Broadreach Consulting
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]