Hi to all,

I have a problem trying to connect IIS 6.0 with Tomcat 5.5.9 using the
1.2.14 version of the isapi_redirect.dll file.

(Yes, I know, I should really better connect it to Apache, and if I
could I am sure I wouldn't have lost so many hours on this... Excuse
me for this off-topic angriness.)

Tomcat is working fine, I have installed the connector with the .exe
binary installer version, and the ISAPI filter is shown to work ok in
IIS. However, if I want to look at a Tomcat serving page, I get a 404
response and the IIS log doesn't show any GET /jakarta/isapi_redirect.dll.

With help from the log file, I can see that the ISAPI filter is
called, it seems to work fine until the call to HttpExtensionProc part
of the filter, which is not made.

This is the trace log of the not-working installation :

[trace] jk_shm_open::jk_shm.c (69): enter
[debug] jk_shm_open::jk_shm.c (91): Initialized shared memory size=66560 
free=65536 addr=0x19f0048
[trace] jk_shm_open::jk_shm.c (94): exit
[debug] init_jk::jk_isapi_plugin.c (1136): Using registry.
[debug] init_jk::jk_isapi_plugin.c (1139): Using log file C:\Program 
Files\Apache Software Foundation\Jakarta Isapi 
Redirector\log\isapi_redirect2.log.
[debug] init_jk::jk_isapi_plugin.c (1140): Using log level 0.
[debug] init_jk::jk_isapi_plugin.c (1141): Using extension uri 
/jakarta/isapi_redirect.dll.
[debug] init_jk::jk_isapi_plugin.c (1142): Using worker file C:\Program 
Files\Apache Software Foundation\Jakarta Isapi 
Redirector\conf\workers.properties.
[debug] init_jk::jk_isapi_plugin.c (1143): Using worker mount file C:\Program 
Files\Apache Software Foundation\Jakarta Isapi 
Redirector\conf\uriworkermap.properties.
[debug] init_jk::jk_isapi_plugin.c (1145): Using uri select 0.
[trace] uri_worker_map_alloc::jk_uri_worker_map.c (89): enter
[trace] uri_worker_map_alloc::jk_uri_worker_map.c (105): exit
[trace] uri_worker_map_add::jk_uri_worker_map.c (190): enter
[debug] uri_worker_map_add::jk_uri_worker_map.c (260): wildchar rule 
/admin/*=worker1 was added
[trace] uri_worker_map_add::jk_uri_worker_map.c (298): exit
[trace] uri_worker_map_add::jk_uri_worker_map.c (190): enter
[debug] uri_worker_map_add::jk_uri_worker_map.c (260): wildchar rule 
/manager/*=worker1 was added
[trace] uri_worker_map_add::jk_uri_worker_map.c (298): exit
[trace] uri_worker_map_add::jk_uri_worker_map.c (190): enter
[debug] uri_worker_map_add::jk_uri_worker_map.c (260): wildchar rule 
/jsp-examples/*=worker1 was added
[trace] uri_worker_map_add::jk_uri_worker_map.c (298): exit
[trace] uri_worker_map_add::jk_uri_worker_map.c (190): enter
[debug] uri_worker_map_add::jk_uri_worker_map.c (260): wildchar rule 
/servlets-examples/*=worker1 was added
[trace] uri_worker_map_add::jk_uri_worker_map.c (298): exit
[trace] uri_worker_map_add::jk_uri_worker_map.c (190): enter
[debug] uri_worker_map_add::jk_uri_worker_map.c (260): wildchar rule 
/cocoon*=worker1 was added
[trace] uri_worker_map_add::jk_uri_worker_map.c (298): exit
[trace] uri_worker_map_add::jk_uri_worker_map.c (190): enter
[debug] uri_worker_map_add::jk_uri_worker_map.c (268): exact rule 
/jkmanager=jkstatus was added
[trace] uri_worker_map_add::jk_uri_worker_map.c (298): exit
[trace] wc_open::jk_worker.c (49): enter
[trace] build_worker_map::jk_worker.c (230): enter
[debug] build_worker_map::jk_worker.c (236): creating worker worker1
[trace] wc_create_worker::jk_worker.c (121): enter
[debug] wc_create_worker::jk_worker.c (141): about to create instance worker1 
of ajp13
[trace] ajp13_worker_factory::jk_ajp13_worker.c (83): enter
[trace] ajp13_worker_factory::jk_ajp13_worker.c (117): exit
[debug] wc_create_worker::jk_worker.c (154): about to validate and init worker1
[trace] validate::jk_ajp13_worker.c (34): enter
[trace] ajp_validate::jk_ajp_common.c (1783): enter
[debug] ajp_validate::jk_ajp_common.c (1806): worker worker1 contact is 
'localhost:8009'
[trace] ajp_validate::jk_ajp_common.c (1812): exit
[trace] validate::jk_ajp13_worker.c (36): exit
[trace] init::jk_ajp13_worker.c (47): enter
[trace] ajp_init::jk_ajp_common.c (1879): enter
[debug] ajp_init::jk_ajp_common.c (1895): setting socket keepalive to 0
[debug] ajp_init::jk_ajp_common.c (1934): setting socket timeout to -1
[debug] ajp_init::jk_ajp_common.c (1938): setting socket buffer size to 0
[debug] ajp_init::jk_ajp_common.c (1942): setting connection recycle timeout to 0
[debug] ajp_init::jk_ajp_common.c (1946): setting cache timeout to 0
[debug] ajp_init::jk_ajp_common.c (1950): setting connect timeout to 0
[debug] ajp_init::jk_ajp_common.c (1954): setting reply timeout to 0
[debug] ajp_init::jk_ajp_common.c (1958): setting prepost timeout to 0
[debug] ajp_init::jk_ajp_common.c (1962): setting recovery opts to 0
[debug] ajp_init::jk_ajp_common.c (1966): setting number of retries to 3
[trace] ajp_create_endpoint_cache::jk_ajp_common.c (1835): enter
[debug] ajp_create_endpoint_cache::jk_ajp_common.c (1843): setting connection 
cache size to 10
[trace] ajp_create_endpoint_cache::jk_ajp_common.c (1867): exit
[trace] ajp_init::jk_ajp_common.c (1999): exit
[trace] init::jk_ajp13_worker.c (53): exit
[trace] wc_create_worker::jk_worker.c (192): exit
[debug] build_worker_map::jk_worker.c (248): removing old worker1 worker
[trace] build_worker_map::jk_worker.c (264): exit
[trace] wc_open::jk_worker.c (83): exit
[debug] HttpFilterProc::jk_isapi_plugin.c (697): Detected IIS >= 5.0
[debug] HttpFilterProc::jk_isapi_plugin.c (748): Filter started
[debug] HttpFilterProc::jk_isapi_plugin.c (814): Virtual Host redirection of 
/localhost/jkmanager
[trace] map_uri_to_worker::jk_uri_worker_map.c (422): enter
[debug] map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI 
'/localhost/jkmanager' from 6 maps
[debug] map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context 
URI '/servlets-examples/*'
[debug] map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context 
URI '/jsp-examples/*'
[debug] map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context 
URI '/jkmanager'
[debug] map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context 
URI '/manager/*'
[debug] map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context 
URI '/admin/*'
[debug] map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context 
URI '/cocoon*'
[trace] map_uri_to_worker::jk_uri_worker_map.c (496): exit
[debug] HttpFilterProc::jk_isapi_plugin.c (821): Default redirection of 
/jkmanager
[trace] map_uri_to_worker::jk_uri_worker_map.c (422): enter
[debug] map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI 
'/jkmanager' from 6 maps
[debug] map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context 
URI '/servlets-examples/*'
[debug] map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context 
URI '/jsp-examples/*'
[debug] map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context 
URI '/jkmanager'
[debug] map_uri_to_worker::jk_uri_worker_map.c (486): Found an exact match 
jkstatus -> /jkmanager
[trace] map_uri_to_worker::jk_uri_worker_map.c (489): exit
[debug] HttpFilterProc::jk_isapi_plugin.c (831): check if [/jkmanager] is 
points to the web-inf directory
[debug] HttpFilterProc::jk_isapi_plugin.c (849): [/jkmanager] is a servlet url 
- should redirect to jkstatus
[debug] HttpFilterProc::jk_isapi_plugin.c (748): Filter started
[debug] HttpFilterProc::jk_isapi_plugin.c (814): Virtual Host redirection of 
/localhost/favicon.ico
[trace] map_uri_to_worker::jk_uri_worker_map.c (422): enter

[...]

As you see, after the "[/jkmanager] is a servlet url - should redirect
to jkstatus" line, nothing is done. Looking at the filter source code,
I think the problem comes from the following part of jk_isapi_plugin.c
(lines 894-923) :

[...]

/* Move Translate: header to a temporary header so
 * that the extension proc will be called.
 * This allows the servlet to handle 'Translate: f'.
 */
if (GetHeader
    (pfc, "Translate:", (LPVOID) Translate,
     (LPDWORD) & szTranslate) && Translate != NULL
    && szTranslate > 0) {
    if (!AddHeader
        (pfc, TOMCAT_TRANSLATE_HEADER_NAME, Translate)) {
        jk_log(logger, JK_LOG_ERROR,
               "error while adding Tomcat-Translate headers");
        return SF_STATUS_REQ_ERROR;
    }
    SetHeader(pfc, "Translate:", NULL);
}
if (!pfc->pFilterContext) {
    isapi_log_data_t *ld = (isapi_log_data_t *)pfc->AllocMem(pfc, 
sizeof(isapi_log_data_t), 0);
    if (!ld) {
        jk_log(logger, JK_LOG_ERROR,
               "error while allocating memory");
        SetLastError(ERROR_NOT_ENOUGH_MEMORY);
        return SF_STATUS_REQ_ERROR;
    }
    memset(ld, 0, sizeof(isapi_log_data_t));
    strcpy(ld->uri, forwardURI);
    if (query && strlen(query) > 0)
        strcpy(ld->query, query);
    pfc->pFilterContext = ld;
}

[...]

But I have not enough knowledge to tell more...

Do you have any idea of why the link is not made between the ISAPI
filter and Tomcat ? Is it linked to the fact that I have several web
sites under the same IIS installation ?

Any help would be greatly appreciated.

Thanks in advance,
-- 
Julien Barnier
Centre d'édition numérique scientifique du CNRS
ENS Lettres et Sciences humaines, Lyon
Tél : 04 37 37 62 59

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to