You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Vasile GABURICI <ga...@ss.pub.ro> on 2000/05/15 02:19:22 UTC
In process plugin for AOLServer (pre-alpha)
Update on AOLServer in-process plug-in: it almost works.
I have added extensive logging to jk_jni_worker.c and jk_jnicb.c.
I can at least contribute with that to the project. But hopefully with some
more: I have extended Freddie Mendoza's jk_aol_plugin to handle any worker
type, not just ajp. There no JNI-specific code in yet.
Current status is: The JVM loads ok etc. Things are fine until a
request arrives. The request is parsed OK and sent to the Java side.
Unfortunately the callbacks in jk_jnicb.c do not get called as expected.
Then one of the following randomly happens:
1) The response hangs because neither
JNIConnectionHandler::startReasponse nor JNIConnectionHandler::write gets
called from the Java side. Logs with the beginning trimmed:
[jk_jni_worker.c (681)]: In attach_to_jvm, attached OK!
[jk_jni_worker.c (205)]: In service, calling the Java side...
[jk_jnicb.c (142)]: Into JNIConnectionHandler::readEnvironment
[jk_jnicb.c (155)]: Into JNIConnectionHandler::readEnvironment -> method: GET
[jk_jnicb.c (163)]: Into JNIConnectionHandler::readEnvironment -> req_uri: /examples
[jk_jnicb.c (180)]: Into JNIConnectionHandler::readEnvironment -> remote_addr: 192.168.0.1
[jk_jnicb.c (189)]: Into JNIConnectionHandler::readEnvironment -> remote_host: .
[jk_jnicb.c (198)]: Into JNIConnectionHandler::readEnvironment -> server_name: 192.168.0.1
[jk_jnicb.c (78)]: Into JNIConnectionHandler::getNumberOfHeaders
[jk_jnicb.c (265)]: In JNIConnectionHandler::readHeaders
[jk_jnicb.c (276)]: In JNIConnectionHandler::readHeaders Host = [jk_jnicb.c
(283)]: flamingo:8000
[jk_jnicb.c (276)]: In JNIConnectionHandler::readHeaders Accept = [jk_jnicb.c
(283)]: text/html, text/plain, audio/mod, image/*, video/*, video/mpeg, application/pgp,
application/pgp, message/partial, message/external-body, application/postscript, x-be2,
application/andrew-inset, text/richtext, text/enriched, x-sun-attachment
[jk_jnicb.c (276)]: In JNIConnectionHandler::readHeaders Accept = [jk_jnicb.c
(283)]: audio-file, postscript-file, default, mail-file, sun-deskset-message,
application/x-metamail-patch, application/applefile, text/sgml, */*;q=0.01
[jk_jnicb.c (276)]: In JNIConnectionHandler::readHeaders Accept-Encoding = [jk_jnicb.c
(283)]: gzip, compress
[jk_jnicb.c (276)]: In JNIConnectionHandler::readHeaders Accept-Language = [jk_jnicb.c
(283)]: en
[jk_jnicb.c (276)]: In JNIConnectionHandler::readHeaders User-Agent = [jk_jnicb.c
(283)]: Lynx/2.8.2rel.1 libwww-FM/2.14
That's it. It doesn't go beyond this. Using ajp12 instead of jni
work fine.
2) The response comes with no headers. It's fed to the web server
as-is and the client thinks its text/plain:
[jk_jni_worker.c (674)]: Into attach_to_jvm
[jk_jni_worker.c (681)]: In attach_to_jvm, attached OK!
[jk_jni_worker.c (205)]: In service, calling the Java side...
[jk_jnicb.c (142)]: Into JNIConnectionHandler::readEnvironment
[jk_jnicb.c (155)]: Into JNIConnectionHandler::readEnvironment -> method: GET
[jk_jnicb.c (163)]: Into JNIConnectionHandler::readEnvironment -> req_uri: /examples
[jk_jnicb.c (180)]: Into JNIConnectionHandler::readEnvironment -> remote_addr: 192.168.0.1
[jk_jnicb.c (189)]: Into JNIConnectionHandler::readEnvironment -> remote_host: .
[jk_jnicb.c (198)]: Into JNIConnectionHandler::readEnvironment -> server_name: 192.168.0.1
[jk_jnicb.c (78)]: Into JNIConnectionHandler::getNumberOfHeaders
[jk_jnicb.c (265)]: In JNIConnectionHandler::readHeaders
[jk_jnicb.c (276)]: In JNIConnectionHandler::readHeaders Host = [jk_jnicb.c
(283)]: flamingo:8000
[jk_jnicb.c (276)]: In JNIConnectionHandler::readHeaders Accept = [jk_jnicb.c
(283)]: text/html, text/plain, audio/mod, image/*, video/*, video/mpeg, application/pgp,
application/pgp, message/partial, message/external-body, application/postscript, x-be2,
application/andrew-inset, text/richtext, text/enriched, x-sun-attachment
[jk_jnicb.c (276)]: In JNIConnectionHandler::readHeaders Accept = [jk_jnicb.c
(283)]: audio-file, postscript-file, default, mail-file, sun-deskset-message,
application/x-metamail-patch, application/applefile, text/sgml, */*;q=0.01
[jk_jnicb.c (276)]: In JNIConnectionHandler::readHeaders Accept-Encoding = [jk_jnicb.c
(283)]: gzip, compress
[jk_jnicb.c (276)]: In JNIConnectionHandler::readHeaders Accept-Language = [jk_jnicb.c
(283)]: en
[jk_jnicb.c (276)]: In JNIConnectionHandler::readHeaders User-Agent = [jk_jnicb.c
(283)]: Lynx/2.8.2rel.1 libwww-FM/2.14
[jk_jnicb.c (428)]: In JNIConnectionHandler::write
[jk_jni_worker.c (213)]: In service, the Java side is OK, I'm done
[jk_jni_worker.c (228)]: Into done
[jk_jni_worker.c (691)]: In detach_from_jvm, detached ok
[jk_jni_worker.c (239)]: done, done
I presume that this is known bug, since in ws_write() of
jk_nsapi_plugin.c I found:
if(!p->request_started) {
start_response(s, 200, NULL, NULL, NULL, 0);
}
Apparently when ajp12 is used, the content also gives the headers,
but that doesn't happen with jni. Note: I worked on the 3.1 release tree.
Any ideas/comments?
TIA,
Vasile