Re: How to write a correct HTTP request to Tomcat 8.5.4 instance?

2016-09-06 Thread Klemens Muthmann


Am 05.09.2016 um 16:16 schrieb André Warnier (tomcat):
> On 05.09.2016 15:09, Klemens Muthmann wrote:
>> Am 05.09.2016 um 14:49 schrieb Tim Watts:
>>> On Mon, 2016-09-05 at 14:11 +0200, Klemens Muthmann wrote:
>>>> Hi,
>>>>
>>>> I currently need to implement an HTTP data transmission from an
>>>> Arduino
>>>> with WiFi module to a PC running a Tomcat 8.5.4 instance. The
>>>> Tomcat is
>>>> running under Ubuntu 16.04.
>>>>
>>>> The problem is that, since there are no HTTP libraries on Arduino, I
>>>> need to write the correct HTTP request myself and I got stuck. It
>>>> would
>>>> be great if someone on the list with a deeper understanding of the
>>>> HTTP
>>>> protocol would be willing to support me.
>>>> The transmitted (possibly erroneous ) request looks like:
>>>>
>>>> 
>>>> GET /push?VIN=testrun HTTP/1.1
>>>> User-Agent: Freematics
>>>> Connection: keep-alive
>>>> Host:
>>>>
>>>> 
>>>> The server runs under a local access point IP (10.42.0.1) and receives
>>>> that request correctly but throws me an EOFException from the
>>>> following
>>>> code fragment:
>>>>
>>>>   nRead = channel.read(socketBufferHandler.getReadBuffer());
>>>>  if (nRead == -1) {
>>>>  throw new EOFException();
>>>>  }
>>>>
>>>> So it seems to me that an end of file is reached before it is
>>>> expected.
>>>> Can somebody provide me with hints on how to solve that issue and
>>>> formulate a correct HTTP request to my Tomcat instance?
>>>>
>>>> The following is th log trace I receive from the server:
>>>> 
>>>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>>>> o.a.coyote.http11.Http11InputBuffer  : Received [GET
>>>> /push?VIN=testrun HTTP/1.1
>>>> User-Agent: Freematics
>>>> Connection: keep-alive
>>>> Host:
>>>>
>>>> ]
>>> Until a real expert comes along with a better answer let me just toss
>>> this out:  Are the lines in the HTTP request that the Arduino submits
>>> terminated with \r\n (and not just \n)?  Because it looks like the
>>> entire request may have been read when reading the request line.  Then
>>> when it goes to read the headers it gets an EOF.  Not 100% sure of this
>>> but it's possible.
>>>
>>>
>>>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>>>> o.a.c.authenticator.AuthenticatorBase: Security checking
>>>> request GET
>>>> /push
>>>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>>>> org.apache.catalina.realm.RealmBase  :   No applicable constraints
>>>> defined
>>>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>>>> o.a.c.authenticator.AuthenticatorBase:  Not subject to any
>>>> constraint
>>>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>>>> org.apache.tomcat.util.http.Parameters   : Set encoding to UTF-8
>>>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>>>> org.apache.tomcat.util.http.Parameters   : Decoding query null UTF-8
>>>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>>>> org.apache.tomcat.util.http.Parameters   : Start processing with input
>>>> [VIN=testrun]
>>>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>>>> o.s.b.w.f.OrderedRequestContextFilter: Bound request context to
>>>> thread: org.apache.catalina.connector.RequestFacade@75c83bc4
>>>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>>>> o.s.web.servlet.DispatcherServlet: DispatcherServlet with name
>>>> 'dispatcherServlet' processing GET request for [/push]
>>>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>>>> s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler
>>>> method for
>>>> path /push
>>>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>>>> s.w.s.m.m.a.RequestMappingHandlerMapping : Returning handler method
>>>> [public void de.cyface.obd2.controller.Obd2Controller.push()]
>>>> 2016-09-05 13:

Re: How to write a correct HTTP request to Tomcat 8.5.4 instance?

2016-09-05 Thread Klemens Muthmann
Am 05.09.2016 um 14:49 schrieb Tim Watts:
> On Mon, 2016-09-05 at 14:11 +0200, Klemens Muthmann wrote:
>> Hi,
>>
>> I currently need to implement an HTTP data transmission from an Arduino
>> with WiFi module to a PC running a Tomcat 8.5.4 instance. The Tomcat is
>> running under Ubuntu 16.04.
>>
>> The problem is that, since there are no HTTP libraries on Arduino, I
>> need to write the correct HTTP request myself and I got stuck. It would
>> be great if someone on the list with a deeper understanding of the HTTP
>> protocol would be willing to support me.
>> The transmitted (possibly erroneous ) request looks like:
>>
>> 
>> GET /push?VIN=testrun HTTP/1.1
>> User-Agent: Freematics
>> Connection: keep-alive
>> Host:
>>
>> 
>> The server runs under a local access point IP (10.42.0.1) and receives
>> that request correctly but throws me an EOFException from the following
>> code fragment:
>>
>>  nRead = channel.read(socketBufferHandler.getReadBuffer());
>> if (nRead == -1) {
>> throw new EOFException();
>> }
>>
>> So it seems to me that an end of file is reached before it is expected.
>> Can somebody provide me with hints on how to solve that issue and
>> formulate a correct HTTP request to my Tomcat instance?
>>
>> The following is th log trace I receive from the server:
>> 
>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>> o.a.coyote.http11.Http11InputBuffer  : Received [GET
>> /push?VIN=testrun HTTP/1.1
>> User-Agent: Freematics
>> Connection: keep-alive
>> Host:
>>
>> ]
> Until a real expert comes along with a better answer let me just toss
> this out:  Are the lines in the HTTP request that the Arduino submits
> terminated with \r\n (and not just \n)?  Because it looks like the
> entire request may have been read when reading the request line.  Then
> when it goes to read the headers it gets an EOF.  Not 100% sure of this
> but it's possible.
>
>
>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>> o.a.c.authenticator.AuthenticatorBase: Security checking request GET
>> /push
>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>> org.apache.catalina.realm.RealmBase  :   No applicable constraints
>> defined
>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>> o.a.c.authenticator.AuthenticatorBase:  Not subject to any constraint
>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>> org.apache.tomcat.util.http.Parameters   : Set encoding to UTF-8
>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>> org.apache.tomcat.util.http.Parameters   : Decoding query null UTF-8
>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>> org.apache.tomcat.util.http.Parameters   : Start processing with input
>> [VIN=testrun]
>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>> o.s.b.w.f.OrderedRequestContextFilter: Bound request context to
>> thread: org.apache.catalina.connector.RequestFacade@75c83bc4
>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>> o.s.web.servlet.DispatcherServlet: DispatcherServlet with name
>> 'dispatcherServlet' processing GET request for [/push]
>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>> s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for
>> path /push
>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>> s.w.s.m.m.a.RequestMappingHandlerMapping : Returning handler method
>> [public void de.cyface.obd2.controller.Obd2Controller.push()]
>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>> o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of
>> singleton bean 'obd2Controller'
>> 2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
>> o.s.web.servlet.DispatcherServlet: Last-Modified value for
>> [/push] is: -1
>> push
>> 2016-09-05 13:32:50.239 DEBUG 13143 --- [nio-8080-exec-1]
>> o.s.web.servlet.DispatcherServlet: Null ModelAndView returned to
>> DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter
>> completed request handling
>> 2016-09-05 13:32:50.239 DEBUG 13143 --- [nio-8080-exec-1]
>> o.s.web.servlet.DispatcherServlet: Successfully completed request
>> 2016-09-05 13:32:50.239 DEBUG 13143 --- [nio-8080-exec-1]
>> o.s.b.w.f.OrderedRequestContextFilter: Cleared thread-bound

How to write a correct HTTP request to Tomcat 8.5.4 instance?

2016-09-05 Thread Klemens Muthmann
Hi,

I currently need to implement an HTTP data transmission from an Arduino
with WiFi module to a PC running a Tomcat 8.5.4 instance. The Tomcat is
running under Ubuntu 16.04.

The problem is that, since there are no HTTP libraries on Arduino, I
need to write the correct HTTP request myself and I got stuck. It would
be great if someone on the list with a deeper understanding of the HTTP
protocol would be willing to support me.
The transmitted (possibly erroneous ) request looks like:


GET /push?VIN=testrun HTTP/1.1
User-Agent: Freematics
Connection: keep-alive
Host:


The server runs under a local access point IP (10.42.0.1) and receives
that request correctly but throws me an EOFException from the following
code fragment:

 nRead = channel.read(socketBufferHandler.getReadBuffer());
if (nRead == -1) {
throw new EOFException();
}

So it seems to me that an end of file is reached before it is expected.
Can somebody provide me with hints on how to solve that issue and
formulate a correct HTTP request to my Tomcat instance?

The following is th log trace I receive from the server:

2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
o.a.coyote.http11.Http11InputBuffer  : Received [GET
/push?VIN=testrun HTTP/1.1
User-Agent: Freematics
Connection: keep-alive
Host:

]
2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
o.a.c.authenticator.AuthenticatorBase: Security checking request GET
/push
2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
org.apache.catalina.realm.RealmBase  :   No applicable constraints
defined
2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
o.a.c.authenticator.AuthenticatorBase:  Not subject to any constraint
2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
org.apache.tomcat.util.http.Parameters   : Set encoding to UTF-8
2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
org.apache.tomcat.util.http.Parameters   : Decoding query null UTF-8
2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
org.apache.tomcat.util.http.Parameters   : Start processing with input
[VIN=testrun]
2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
o.s.b.w.f.OrderedRequestContextFilter: Bound request context to
thread: org.apache.catalina.connector.RequestFacade@75c83bc4
2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
o.s.web.servlet.DispatcherServlet: DispatcherServlet with name
'dispatcherServlet' processing GET request for [/push]
2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for
path /push
2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
s.w.s.m.m.a.RequestMappingHandlerMapping : Returning handler method
[public void de.cyface.obd2.controller.Obd2Controller.push()]
2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of
singleton bean 'obd2Controller'
2016-09-05 13:32:50.238 DEBUG 13143 --- [nio-8080-exec-1]
o.s.web.servlet.DispatcherServlet: Last-Modified value for
[/push] is: -1
push
2016-09-05 13:32:50.239 DEBUG 13143 --- [nio-8080-exec-1]
o.s.web.servlet.DispatcherServlet: Null ModelAndView returned to
DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter
completed request handling
2016-09-05 13:32:50.239 DEBUG 13143 --- [nio-8080-exec-1]
o.s.web.servlet.DispatcherServlet: Successfully completed request
2016-09-05 13:32:50.239 DEBUG 13143 --- [nio-8080-exec-1]
o.s.b.w.f.OrderedRequestContextFilter: Cleared thread-bound request
context: org.apache.catalina.connector.RequestFacade@75c83bc4
2016-09-05 13:32:50.239 DEBUG 13143 --- [nio-8080-exec-1]
o.apache.coyote.http11.Http11Processor   : Socket:
[org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@2940dec1:org.apache.tomcat.util.net.NioChannel@34a92297:java.nio.channels.SocketChannel[connected
local=/10.42.0.1:8080 remote=/10.42.0.72:46701]], Status in:
[OPEN_READ], State out: [OPEN]
2016-09-05 13:32:55.280 DEBUG 13143 --- [nio-8080-exec-2]
o.apache.coyote.http11.Http11Processor   : Error parsing HTTP request header

java.io.EOFException: null
at
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1222)
~[tomcat-embed-core-8.5.4.jar:8.5.4]
at
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1163)
~[tomcat-embed-core-8.5.4.jar:8.5.4]
at
org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:742)
~[tomcat-embed-core-8.5.4.jar:8.5.4]
at
org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:404)
~[tomcat-embed-core-8.5.4.jar:8.5.4]
at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:994)
~[tomcat-embed-core-8.5.4.jar:8.5.4]
at

Is there an upload limit of around 8000 bytes in tomcat 6?

2010-12-13 Thread Klemens Muthmann

Hi,

I wrote a REST webservice that accepts file uploads to the server. I 
used the Restlet framework and as long as I am running the application 
on the internal Restlet Web Server everything works fine. However as 
soon as I deploy my application as WAR to tomcat (tomcat 6.0.24) it 
seems that the server closes the connection when something between 7000 
and 8000 bytes are submitted. To illustrate this: I get the following 
logging output from my code on the server side:


DEBUG RawResourceResource - Number of bytes read:7655
DEBUG RawResourceResource - Number of bytes available: 22694

and

DEBUG RawResourceResource - Number of bytes read:7694
DEBUG RawResourceResource - Number of bytes available: 45904

The upper number is the number of bytes that arrive on the server. The 
lower one ist the number I would expect. I read in the tomcat 
documentation about buffer sizes and upload limits but none of these 
parameters is even similar in size to the value shown.


I tried to enlarge/change the following parameters of the HTTP connector 
in server.xml:

* bufferSize=10
* socketBuffer=5
* disableUploadTimeout=true
* maxPostSize=5242880
* connectionTimeout=6

Nothing of this did work.

So my question is; is anyone aware of a behaviour with tomcat where the 
server just cuts the connection after having recieved a certain amount 
of bytes and is there some config parameter that allows me to bypass 
this behaviour.


Thanks and Regards
  Klemens Muthmann

--

Dipl.-Medieninf., Klemens Muthmann
Wissenschaftlicher Mitarbeiter

Technische Universität Dresden
Fakultät Informatik
Institut für Systemarchitektur
Lehrstuhl Rechnernetze
01062 Dresden
Tel.: +49 (351) 463-38214
Fax: +49 (351) 463-38251
E-Mail: klemens.muthm...@tu-dresden.de




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Re: Is there an upload limit of around 8000 bytes in tomcat 6?

2010-12-13 Thread Klemens Muthmann

Hm. It works. Great.

However I wonder why the parameter that allows me to upload a larger 
block of ~CONTENT~ is called maxHttp~HEADER~Size.


Nevertheless. Thank you very much for your fast answer.

Am 13.12.2010 17:06, schrieb Mark Thomas:

On 13/12/2010 16:03, Klemens Muthmann wrote:

Hi,

I wrote a REST webservice that accepts file uploads to the server. I
used the Restlet framework and as long as I am running the application
on the internal Restlet Web Server everything works fine. However as
soon as I deploy my application as WAR to tomcat (tomcat 6.0.24) it
seems that the server closes the connection when something between 7000
and 8000 bytes are submitted. To illustrate this: I get the following
logging output from my code on the server side:

DEBUG RawResourceResource - Number of bytes read:7655
DEBUG RawResourceResource - Number of bytes available: 22694

and

DEBUG RawResourceResource - Number of bytes read:7694
DEBUG RawResourceResource - Number of bytes available: 45904

The upper number is the number of bytes that arrive on the server. The
lower one ist the number I would expect. I read in the tomcat
documentation about buffer sizes and upload limits but none of these
parameters is even similar in size to the value shown.

I tried to enlarge/change the following parameters of the HTTP connector
in server.xml:
* bufferSize=10
* socketBuffer=5
* disableUploadTimeout=true
* maxPostSize=5242880
* connectionTimeout=6

maxHttpHeaderSize?

Mark


Nothing of this did work.

So my question is; is anyone aware of a behaviour with tomcat where the
server just cuts the connection after having recieved a certain amount
of bytes and is there some config parameter that allows me to bypass
this behaviour.

Thanks and Regards
   Klemens Muthmann




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





--

Dipl.-Medieninf., Klemens Muthmann
Wissenschaftlicher Mitarbeiter

Technische Universität Dresden
Fakultät Informatik
Institut für Systemarchitektur
Lehrstuhl Rechnernetze
01062 Dresden
Tel.: +49 (351) 463-38214
Fax: +49 (351) 463-38251
E-Mail: klemens.muthm...@tu-dresden.de




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Re: Is there an upload limit of around 8000 bytes in tomcat 6?

2010-12-13 Thread Klemens Muthmann
Didn't know this. I thought files would be part of the message content. 
OK. Thanks for the explanation.


Am 13.12.2010 17:42, schrieb Mark Thomas:

On 13/12/2010 16:31, Klemens Muthmann wrote:

Hm. It works. Great.

However I wonder why the parameter that allows me to upload a larger
block of ~CONTENT~ is called maxHttp~HEADER~Size.

Because you are uploading data in the request headers, not in the
request body.

Mark


Nevertheless. Thank you very much for your fast answer.

Am 13.12.2010 17:06, schrieb Mark Thomas:

On 13/12/2010 16:03, Klemens Muthmann wrote:

Hi,

I wrote a REST webservice that accepts file uploads to the server. I
used the Restlet framework and as long as I am running the application
on the internal Restlet Web Server everything works fine. However as
soon as I deploy my application as WAR to tomcat (tomcat 6.0.24) it
seems that the server closes the connection when something between 7000
and 8000 bytes are submitted. To illustrate this: I get the following
logging output from my code on the server side:

DEBUG RawResourceResource - Number of bytes read:7655
DEBUG RawResourceResource - Number of bytes available: 22694

and

DEBUG RawResourceResource - Number of bytes read:7694
DEBUG RawResourceResource - Number of bytes available: 45904

The upper number is the number of bytes that arrive on the server. The
lower one ist the number I would expect. I read in the tomcat
documentation about buffer sizes and upload limits but none of these
parameters is even similar in size to the value shown.

I tried to enlarge/change the following parameters of the HTTP connector
in server.xml:
* bufferSize=10
* socketBuffer=5
* disableUploadTimeout=true
* maxPostSize=5242880
* connectionTimeout=6

maxHttpHeaderSize?

Mark


Nothing of this did work.

So my question is; is anyone aware of a behaviour with tomcat where the
server just cuts the connection after having recieved a certain amount
of bytes and is there some config parameter that allows me to bypass
this behaviour.

Thanks and Regards
Klemens Muthmann




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org







-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





--

Dipl.-Medieninf., Klemens Muthmann
Wissenschaftlicher Mitarbeiter

Technische Universität Dresden
Fakultät Informatik
Institut für Systemarchitektur
Lehrstuhl Rechnernetze
01062 Dresden
Tel.: +49 (351) 463-38214
Fax: +49 (351) 463-38251
E-Mail: klemens.muthm...@tu-dresden.de




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Re: Mod_jk 1.2.26 + tomcat 6.0.26 + apache 2.2.12 not working on ubuntu 'karmic'

2010-04-27 Thread Klemens Muthmann

Hi,

I'm a researcher not an administrator. ;) Thanks for the hint with the 
virtual hosts, chris. I never did anything with this technique (didn't 
even know apache is capable of such things) but now it works.


Regards
   Klemens

Christopher Schultz schrieb:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Klemens,

On 4/23/2010 11:21 AM, Klemens Muthmann wrote:
  

However now I need to make the tomcat applications
available over port 80 so I tried to configure mod_jk but it does not
work.



[...]

  

Currently the configuration looks like:
- There is a symbolic link to jk.load file in /etc/apache2/mods-enabled
with content:
   LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so



Does that file exist? Probably, because you have errors coming from
mod_jk below...

  

- httpd.conf is loaded in apache2.conf (after jk.load) via: Include
/etc/apache2/httpd.conf and has the following content:
   JkWorkersFile   /etc/libapache2-mod-jk/workers.properties
   JkLogFile   /var/log/apache2/mod_jk.log
   JkLogLevel  debug
   JkMount /nexus/* ajp13_worker



Where do the above lines fall in terms of VirtualHosts? Most Debian-like
packages have a main VirtualHost defined somewhere like
/etc/apache2/sites-enabled.

mod_jk allows separate mounts for each virtual host, including the
top-level one, and they don't inherit from each other by default.

Try moving the JkMount like (specifically) from where it is now into
your default VirtualHost definition.

Here's the hint that you have no JkMounts defined for your virtual host:

  

   [Fri Apr 23 15:20:05.210 2010] [23365:3585353520] [debug]
jk_translate::mod_jk.c (3038): missing uri map for 127.0.1.1:/nexus/



It's the missing uri map that tells the story. Your workers.properties
file looks fine (though the workers.tomcat_hom, workers.java_home, and
ps properties are no longer relevant and should be removed, and you
aren't actually using that loadbalancer so unless you're just testing in
non-lb mode, remove it).

Hope that helps,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvV02kACgkQ9CaO5/Lv0PDYGwCgj2mTQWirkmmUqCQwsP+ZJgUL
FjAAnRvketJTpIebGHFR8k+h6tGglqyj
=NBB0
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


  




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Mod_jk 1.2.26 + tomcat 6.0.26 + apache 2.2.12 not working on ubuntu 'karmic'

2010-04-23 Thread Klemens Muthmann

Hi

I hope this is the correct mailing list for this question. I have a 
problem setting up the configuration as described in the subject of this 
mail. I did the following:


- Installed apache2 from the ubuntu repository (synaptic states the 
version as 2.2.12-1ubuntu2.2)
- Installed mod_jk from the ubuntu repository (synaptic states the 
version as 1:1.2.26-2.1)
- Installed tomcat 2.0.26 manually (just unzipped the package from the 
download area to /opt)


Individually apache and tomcat run fine and both make several web 
applications (apache: mantis, myphpadmin and wordpress; tomcat: hudson 
and nexus) available. However now I need to make the tomcat applications 
available over port 80 so I tried to configure mod_jk but it does not 
work. I already did this successfully several years ago under Windows 
but with these Ubuntu packages I am already trying the whole day without 
any real progress.


Currently the configuration looks like:
- There is a symbolic link to jk.load file in /etc/apache2/mods-enabled 
with content:

   LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so

- httpd.conf is loaded in apache2.conf (after jk.load) via: Include 
/etc/apache2/httpd.conf and has the following content:

   JkWorkersFile   /etc/libapache2-mod-jk/workers.properties
   JkLogFile   /var/log/apache2/mod_jk.log
   JkLogLevel  debug
   JkMount /nexus/* ajp13_worker

- workers.properties is in /etc/libapache2-mod-jk
   workers.tomcat_home=/opt/tomcat26
   workers.java_home=/usr/lib/jvm/java-6-openjdk
   ps=/
   worker.list=ajp13_worker
   worker.ajp13_worker.port=8009
   worker.ajp13_worker.host=localhost
   worker.ajp13_worker.type=ajp13
   worker.ajp13_worker.lbfactor=1
   worker.loadbalancer.type=lb
   worker.loadbalancer.balance_workers=ajp13_worker

I checked the connector port in tomcats server.xml. It is the correct 
one (8009) for ajp13. But I get no access to the nexus application on 
port 80 (also tried several different URL patterns with JkMount). So I 
turned on debugging output for the mod_jk.log. There is much output, but 
I think the relevant error messages are:
   [Fri Apr 23 15:20:05.210 2010] [23365:3585353520] [debug] 
jk_translate::mod_jk.c (3038): missing uri map for 127.0.1.1:/nexus/
   [Fri Apr 23 15:20:05.210 2010] [23365:3585353520] [debug] 
jk_map_to_storage::mod_jk.c (3195): missing uri map for 127.0.1.1:/nexus/
There I am at the end of my wits. I have absolutely no idea what these 
messages mean and Google produces no helpful tipps either. Does anyone 
on this list have any ideas?


Regards
   Klemens




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org