View comments | RSS feed

Understanding web server connectors

A native web server connection module, or connector, is compiled for the specific web server, hardware architecture, and operating system. For example, JRun uses Apache modules to create the connectors for the Apache web server for each possible hardware architecture and operating system supported by JRun. You should not confuse the JRun web server connector with Sun J2EE Java Connector Architecture (JCA) connectors, which provide integration with back-end systems.

JRun connection module

You can connect one or more web servers to each JRun server. In a simple deployment environment, you connect a web server to a single JRun server, which processes your applications. The following figure shows a single web server connected to a single JRun server:

Single web server connected to a single JRun server through port 51000

When a request is made for an application resource, the connector on the web server opens a network connection to the JRun connection module (JCM) residing within the JRun server. The JCM serves as a transparent communicator and forwards the request from the connector to the JRun server. The JRun server handles the request and sends its reply back to the JCM.

JRun proxy port

You define the connection between a web server and a JRun server using a port number and an optional bind address. Each JRun server on a machine listens to a different network port for requests from a web server. This port is called the JRun proxy port or JRun control port (JCP). In the previous example, the default JRun server listens to port 51000. You must ensure that each JRun server on a computer has a unique setting for this port number. You specify this port number using the External Web Server Connection Configuration panel in the JMC.

You can also use a second parameter, interface, to define the connection between a web server and a JRun server. The interface attribute specifies the IP addresses of the native web servers from which the JRun server can receive requests. By default, the interface attribute is set to 127.0.0.1, indicating that a JRun server listens for requests from the localhost. You can use the JMC to specify these IP addresses.

Establishing a web server connector

You create a web server connector by running the Web Server Configuration tool. This tool, (which replaces the Connector Wizard used in JRun 3.x) is a Swing application that installs the connector on a web server, defining a connection between the web server and a JRun server.

To run the Web Server Configuration tool:

  1. Start the JRun server to which you are connecting. If the JRun server is part of a cluster, start all JRun servers in the cluster.
  2. Run the Web Server Configuration tool on the machine that contains the web server. Run the Web Server Configuration tool using either of the following methods:

You typically use the Web Server Configuration tool to configure a connection between the web server and JRun server running on the same computer. However, you do not have to install the web server and JRun on the same computer. The remaining discussions in this chapter provide more information on web server connector configuration options. For more information on running the Web Server Configuration tool, see Installing JRun.

Note:   If the JRun server participates in a cluster, the web server connector automatically enables load balancing and failover. For more information, see "Connector-based clustering".

The Web Server Configuration tool stores properties in configuration files on the web server's computer, as follows:

The JRun web server connector uses these settings to help it find the JRun server and know which servers to connect to. The following table describes the JRun properties in the web server configuration files:
Property
Description
bootstrap
The IP address and port on which the JRun server's proxy service is listening for connector requests. JRun must also be configured to listen on this port/address combination, the ProxyService must be activated, and the JRun server must be running.
serverstore
The name of file that contains information on JRun servers in the bootstrap cluster. The connector creates this file automatically. The default is jrunserver.store.
verbose
Creates more detailed web server log file entries for JRun-to-web server communication. Enabling this option can cause the web server's log files to fill quickly. Specify true or false; the default is false.
scriptpath
IIS only. Points to the virtual /JRunScripts directory on the web server.
errorurl
(Optional) Specifies the URL to a file containing a customized error message. This property is commented out by default.
ssl
(Optional) Specifies whether the web server connector uses SSL to communicate with the JRun server. Specify true or false. Because most web servers are already inside a firewall, you typically specify false for this property.
apialloc
Enables native OS memory allocation rather than the web server's allocator.

The serverstore property specifies the name of the file containing the machine names and JRun proxy ports for all JRun servers in a cluster. This file is named jrunserver.store by default. The proxyservers property contains a semicolon delimited list of the JRun servers in a cluster. The web server connector populates this property automatically when it starts up and detects that the bootstrap JRun server participates in a cluster. The following figure shows this process:

The connector uses jrunserver.store to find the servers in a cluster

For more information, see "Connector-based clustering".

Sample web server configuration files

To help illustrate the web server configuration file parameters, this section provides examples of web server properties when the web server is connected to JRun. These examples assume that JRun and the web server are on the same computer.

Apache configuration file

A typical httpd.conf file for an installation of JRun on the same machine as an Apache web server follows.

The LoadModule statement can be outside of any VirtualHost directives in a multihosting environment because you can reference it only once at a global level. The LoadModule statement is required as DSO is required to run the web server connector.

Also, the Apache configuration file uses Mappings instead of rulespath.

LoadModule jrun_module libexec/mod_jrun.so
<IfModule mod_jrun.c>
    JRunConfig Verbose false
    JRunConfig Apialloc false
����JRunConfig Ssl false
    JRunConfig Serverstore "/usr/apache/conf/jrunserver.store"
    JRunConfig Bootstrap 127.0.0.1:51000
    #JRunConfig Errorurl <optionally redirect to this URL on errors>
</IfModule>

IIS configuration file

For IIS, JRun uses the jrun.ini file to initialize the jrun.dll filter. A typical jrun.ini file follows:

verbose=false
scriptpath=/JRunScripts/jrun.dll
serverstore=C:/JRun4/lib/wsconfig/2/jrunserver.store
bootstrap=127.0.0.1:51000
apialloc=false
ssl=false
#errorurl=<optionally redirect to this URL on errors>

Netscape/iPlanet configuration file

A typical obj.conf file for Netscape/iPlanet web servers follows:

...
<Object name="jrun">
PathCheck fn="jrunfilter"
Service fn="jrunservice"
</Object>
...

A typical magnus.conf file for Netscape/iPlanet web servers follows:

...
Init fn="load-modules" shlib="C:/JRun4/lib/wsconfig/1/jrun_nsapi35.dll"
funcs="jruninit,jrunfilter,jrunservice"
Init fn="jruninit" serverstore="C:/JRun4/lib/wsconfig/1/jrunserver.store"
bootstrap="127.0.0.1:51000" verbose="false" apialloc="false" ssl="false"

Comments


No screen name said on Aug 26, 2003 at 8:44 AM :
What are the default and recommended values for the apialloc property?
All the examples show it at false. Is there any place that describes the pros/cons of
having this property set to true or false?
jrunrandy said on Aug 26, 2003 at 8:43 AM :
In general, you never change the apialloc setting unless Macromedia Support personnel tell you to change it.
No screen name said on Dec 17, 2003 at 11:38 AM :
JRun connector passes a request URI to JRun or the location of the actual page to JRun, or the contents of the document?
No screen name said on Jan 23, 2004 at 1:02 PM :
I guess that the "magnus.conf" stuff for iplanet/netscape is really
also "obj.conf" stuff?
jrunrandy said on Mar 10, 2004 at 7:37 AM :
See http://www.macromedia.com/support/jrun/ts/documents/apache_cipher_suite.htm for important information on the configuration requirements to retrieve cipher suite and key size attribute data when connected to an Apache web server.
No screen name said on Apr 19, 2004 at 6:19 AM :
The url above (http://www.macromedia.com/support/jrun/ts/documents/hf_71059_isapi.htm) does not work.
jrunrandy said on Apr 19, 2004 at 6:40 AM :
It looks like the URL is now http://www.macromedia.com/support/jrun/ts/documents/hf_71059_isapi01.htm
mangesh@iflex said on Dec 12, 2004 at 7:56 AM :
The updater 4 wsconfig adds following lines to httpd.conf

JRunConfig ProxyRetryInterval 45

#JRunConfig ConnectTimeout 45

JRunConfig RecvTimeout 45

#JRunConfig SendTimeout 45

I could not find any documentation explaining the above in detail, does any 1 know where I can get this Info.
8186498 said on Dec 20, 2004 at 10:01 PM :
Is it necessary to start JRun in advance before starting external web server like iPlanet 6.0?
jrunrandy said on Dec 21, 2004 at 5:32 AM :
It shouldn't matter what order you start them in.
No screen name said on Jan 21, 2005 at 5:34 AM :
Can someone from Macromedia explain the purpose, default values, and possible tunning of the following properties added by JRun Updater4?

JRunConfig ProxyRetryInterval 45
JRunConfig ConnectTimeout 45
JRunConfig RecvTimeout 45
JRunConfig SendTimeout 45

Also, are all these properties in seconds?
jrunrandy said on Jan 21, 2005 at 6:10 AM :
I can give you brief explanations:
proxyretryinterval
Specifies the number of seconds to wait before trying to reconnect to an unreachable clustered server.

connecttimeout
Specifies the number of seconds to wait on a socket connect to a JRun server.

recvtimeout
Specifies the number of seconds to wait on a socket receive to a JRun server.

sendtimeout
Specifies the number of seconds to wait on a socket send to a JRun server.

Sorry to say that I don't have an guidance on tuning. Maybe try asking on the forums: http://webforums.macromedia.com/jrun/
blackshirt said on Feb 23, 2005 at 1:30 PM :
I tried to create a manual connection to IIS without using the wsconfig tool. This does not work!
However, if I use the wsconfig tool to create the initial files, I can move those files(.dll, .ini, and .store) to a completely different folder structure and report my Jrunscripts and ISAPI filter to the new folder and .dll and all will work. Even when I remove the entry in the wsconfig tool and make sure everything still will work.
Its only on new sites and trying to do the manual connection from the start. I believe the wsconfig tool is doing setting some flag somewhere. In Jrun3.1 there use to be a connection module flag. In Jrun 4 is this flag set still used somewhere?
AWhitford said on Apr 21, 2005 at 12:45 PM :
What about Security when using a Web Service Connector? For example, when using IIS and JRun 4, the JRun Security does not seem to be prevailing (the authentication piece). How is this designed to function? Are users being authenticated twice, or just one or the other? I was wondering if I could disable IIS authentication and just use JRun authentication?
jrunrandy said on Apr 25, 2005 at 1:18 PM :
Have you read the JRun Security chapter? It starts with http://livedocs.macromedia.com/jrun/4/JRun_Administrators_Guide/authentic.htm

In particular, you might want to look at the "Integrating with an existing security mechanism" discussion: http://livedocs.macromedia.com/jrun/4/JRun_Administrators_Guide/authentic4.htm
ravi_kiran99 said on May 31, 2005 at 7:47 PM :
we have a one webserver (iplanet)-one jrun architecture. We have migrated the webserver to a new version and the jrun connection settings in obj.conf have also been migrated. Everything seems to be working fine.
Does the wsconfig.properties file need to be changed if the webserver install path changes. Is it by used by JRUN to locate the webserver at any point.
jrunrandy said on Jun 27, 2005 at 1:20 PM :
Have you tried it? I think it should work OK. My understanding is that the connector talks to JRun through a port, not by knowing the directory structure.
No screen name said on Sep 3, 2005 at 2:48 AM :
I have configured IIS6 with a ISAPI pointing to my JRun server directory (gst-war), and it runs html and jsp pages fine, but when a servlet
is called I get "Server Error Too many concurrent requests, jcp.endpoint.main.max.threads exeeded." I have been round and round but always that same error.
It runs fine on the live server, but as soon as I transfer it I always get this error.
Can anyone effectively help here?

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/jrun/4/JRun_Administrators_Guide/connectors2.htm