Dear all, We have a strange problem with mod_jk on my linux box (centos45 - 64bit). We use mod_jk 1.2.25 with apache 2.0.52 (default config) and on my clients I got an error msg like this:
> System.InvalidOperationException: > Client found response content type of 'text/plain; charset=UTF-8', but > expected 'text/xml' Our configuration is like this (all systems running Centos45 x86_64): Webserver with mod_jk -> Appserver with jboss 4.2 -> DB server Our clients are posting data to a soap service (axis) running on jboss and expect an answer in text/xml like this: #### Response: [ HTTP/1.1 200 OK Date: Tue, 30 Oct 2007 10:54:59 GMT Server: Apache/2.0.52 (CentOS) X-Powered-By: Servlet 2.4; JBoss-4.2.0.CR1 (build: SVNTag=JBoss_4_2_0_CR1 date=200703051212)/Tomcat-5.5 Connection: close Content-Type: text/xml;charset=UTF-8 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body /></soap:Envelope> ] #### but we very often got back this (sometimes the first 3 times the answer is text/xml and ok but then switches to text/plain ... so it switches always and the only workaround with this config is to restart the webserver and do it again) #### Response: [ HTTP/1.1 200 OK Date: Tue, 30 Oct 2007 16:44:55 GMT Server: Apache/2.0.52 (CentOS) Vary: Accept-Encoding,User-Agent Connection: close Content-Type: text/plain; charset=UTF-8 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body /></soap:Envelope> ] ##### We tried also to test it on a windows box (and mod_jk 1.2.22) with the same results: ##### Response: [ HTTP/1.1 200 OK Date: Tue, 30 Oct 2007 10:54:59 GMT Server: Apache/2.2.4 (Win32) mod_jk/1.2.22 X-Powered-By: Servlet 2.4; JBoss-4.2.0.CR1 (build: SVNTag=JBoss_4_2_0_CR1 date=200703051212)/Tomcat-5.5 Connection: close Content-Type: text/xml;charset=UTF-8 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body /></soap:Envelope> ] #### and switches to this response: #### Response: [ HTTP/1.1 200 OK Date: Tue, 30 Oct 2007 10:55:32 GMT Server: Apache/2.2.4 (Win32) mod_jk/1.2.22 Connection: close Content-Type: text/plain <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body /></soap:Envelope> ] #### Our client systems can only proper work with a response as 'content-type text/xml' The only solution we found to do is use mod_jk 1.2.19 - It also works always when we go directly to jboss-tomcat port 8080 - We found also this case description in the archive http://www.mail-archive.com/[EMAIL PROTECTED]/msg20475.html . Do anyone have a solution to use it with mod_jk 1.2.25 ? Thx and greetz, david A sample config from mod_jk is below: mod-jk.conf ##### # Jakarta Tomcat Connector # # Load mod_jk module # Specify the filename of the mod_jk lib LoadModule jk_module modules/mod_jk.so # Where to find workers.properties JkWorkersFile conf/workers.properties # Where to put jk logs JkLogFile logs/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 indicates to send SSK KEY SIZE JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat JkRequestLogFormat "%w %V %T" # Mount your applications # JkMount /application/* loadbalancer # You can use external file for mount points. # It will be checked for updates each 60 seconds. # The format of the file is: /url=worker # /examples/*=loadbalancer JkMountFile conf/uriworkermap.properties # Add shared memory. # This directive is present with 1.2.10 and # later versions of mod_jk, and is needed for # for load balancing to work properly JkShmFile /var/cache/httpd/jk.shm # Add jkstatus for managing runtime data <Location /jkstatus/> JkMount status Order deny,allow Deny from all Allow from 127.0.0.1 </Location> uriworkermap.properties #### # Simple worker configuration file # Mount the Servlet context to the ajp13 worker /jmx-console=node1 /jmx-console/*=node1 /web-console=node1 /web-console/*=node1 /MCWeb=node1 /MCWeb/*=node1 /MC=node1 /MC/*=node1 workers.properties #### # Define list of workers that will be used # for mapping requests worker.list=node1,status # Define Node1 # modify the host as your host IP or DNS name. worker.node1.port=8009 ## used for jboss ## worker.node1.host=10.16.45.12 worker.node1.type=ajp13 worker.node1.socket_timeout=10 worker.node1.socket_keepalive=False # Status worker for managing load balancer worker.status.type=status --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]