tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier (tomcat) ...@ice-sa.com>
Subject Re: Webapp not working
Date Sat, 14 Apr 2018 18:13:45 GMT
On 14.04.2018 17:59, Loai Abdallatif wrote:
> Hi Andre
>
> thanks for your response.
>
> 1- the logs belong to tomcat servers (
> appserver01.domain._access_log.2018-04-14.txt
> )
> 2+3- Im using Debian 8.10,  Apache/2.4.10 (Debian)   , : mod_jk/1.2.43 ,
> Tomcat : 8.5.29
> 4- I have one app in worker0 and its working, but the apps in worker1 and
> worker2 doesnt work
> 5- I got the same error when accessing the web server ( 192.168.1.210/Core)
> and when accessing the tomcat server 192.168.1.211:8081/Core

Then you need to look at the tomcat error log (not the access log) for the workers who 
don't work, because it looks as if the applications is those tomcats are not deployed.
When you start a tomcat instance, it will provide a detailed log trace of any application

it tries to start, and tell you clearly if it cannot start one. (But tomcat will start 
anyway, even without that application).

By the way, you do really have 3 separate tomcat instances as "workers", right ?


>
>
> On Sat, Apr 14, 2018 at 6:33 PM, André Warnier (tomcat) <aw@ice-sa.com>
> wrote:
>
>> On 14.04.2018 17:02, Loai Abdallatif wrote:
>>
>>> HI every one
>>>
>>> Im using apache mod-jk with tomcat , i have three workers ( worker0-2) and
>>> each one has app.
>>> I have obtaining webabb called Core from development team. I have placed
>>> it
>>> into webapps directory of worker1 . but unfortunatly I got two errors
>>> related to 302, 404, any one can help.
>>>
>>> the error is below:
>>>
>>> 192.168.1.17 - - [14/Apr/2018:19:42:27 +0300] "GET /Core/ HTTP/1.1" 404
>>> 1083 "-" "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like
>>> Gecko) Chrome/49.0.2623.112 Safari/537.36"
>>> 192.168.1.17 - - [14/Apr/2018:19:47:08 +0300] "GET /Core HTTP/1.1" 302 -
>>> "-" "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko)
>>> Chrome/49.0.2623.112 Safari/537.36"
>>> 192.168.1.17 - - [14/Apr/2018:19:47:08 +0300] "GET /Core/ HTTP/1.1" 404
>>> 1083 "-" "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like
>>> Gecko) Chrome/49.0.2623.112 Safari/537.36"
>>> 192.168.1.17 - - [14/Apr/2018:19:51:52 +0300] "GET /Core/ HTTP/1.1" 404
>>> 1083 "-" "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like
>>> Gecko) Chrome/49.0.2623.112 Safari/537.36"
>>> 192.168.1.17 - - [14/Apr/2018:19:52:04 +0300] "GET /Core HTTP/1.1" 302 -
>>> "-" "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko)
>>> Chrome/49.0.2623.112 Safari/537.36"
>>> 192.168.1.17 - - [14/Apr/2018:19:52:04 +0300] "GET /Core/ HTTP/1.1" 404
>>> 1083 "-" "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like
>>> Gecko) Chrome/49.0.2623.112 Safari/537.36"
>>> 192.168.1.17 - - [14/Apr/2018:19:52:04 +0300] "GET /favicon.ico HTTP/1.1"
>>> 404 1085 "http://192.168.1.211:8081/Core/" "Mozilla/5.0 (Windows NT 6.0)
>>> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36"
>>>
>>>
>> 1) Is that log above the Apache httpd access log, or the Tomcat access log
>> ?
>> 2) in any case, you should have a look at the tomcat logs
>> 3) you should also communicate the OS under which this is running, and as
>> a minimum, the version of Apache httpd, and the version of tomcat. Since
>> you are using mod_jk, the version of mod_jk would help also (you can find
>> it in the first line printed by Apache httpd in it's error log).
>> 4) As about the only thing that can be said at this time, with the limited
>> data above, is this :
>> if you have 3 workers, in the standard configuration, the Apache
>> httpd-side mod_jk module will rotate ("round-robin", one request at a time)
>> between these workers, to process browser requests. If you have only one
>> application under tomcat, it should be installed *on each of the tomcats*,
>> not just on one. If the application is installed only on one worker, then 2
>> requests out of every 3 will fail.
>> 5) also :
>> - HTTP status code 302 is not an error, it is a "redirect". It happens
>> because the client is requesting "/Core" instead of "/Core/".  Apache httpd
>> automatically sends this redirect to "/Core/", like to tell the browser
>> that it should speak correctly.
>> The next request that you see above after the 302, is a correct request
>> for "/Core/", but it fails (with a 404 "not found" response) because Apache
>> httpd (or tomcat) does not find the resource corresponding to "/Core/".
>> That may be for 2 reasons :
>> a) your mod_jk configuration is incorrect, and Apache httpd does not know
>> that it should forward this request to tomcat.  Httpd them tries to serve
>> it locally, but it does not have a resource named "/Core/" either, so it
>> returns the 404.
>> or
>> b) the request is correctly forwarded by httpd to *one of the tomcat
>> workers*, but that worker does not have any application matching "/Core/",
>> so it returns a 404 to Apache, which returns it to the browser.
>> The 404 return pages of Apache httpd and tomcat have a different style, so
>> you should be able to see in the browser which one you are getting.
>>
>> But again, look at the error logs first, both at the Apache httpd level,
>> and the tomcat level.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>


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


Mime
View raw message