nginx -> httpd -> mod_jk -> tomcat

Aleksandar Lazic al-nginx at none.at
Mon Jul 30 18:11:57 UTC 2018


On 30/07/2018 12:44, Giacomo Arru - BETA Technologies wrote:
>Hi Aleksandar, thank you for your reply.
>
>
>> For which particular feature do you need ajp?
>> I have used several tomcats with httpd with ajp but after some
>> horrible errors we switched to http connector.
>
>We wanted to use HTTP Connector, and set it up. But we couldn't manage
>to make the app work correctly: we coudn't upload files > 60k and
>tweaking nginx and tomcat configuration wouldn't help. We were unable
>to debug the problem. With AJP connector, all features work fine. The
>app is developed with Vaadin 8.

Well this sounds weird as ajp and http have a lot common parts in httpd
and tomcat.

I can help you to debug this behaviour if your are willing.

>We have no static files in our app because they already are served with a CDN.
>
>We would like test nginx with AJP connector (if somehow supported!).

Well there is one ajp module but I'm not sure how production ready it is.
https://github.com/yaoweibin/nginx_ajp_module

>client_max_body_size is set to 128m

What's the message in the error log when the upload stops/breaks?

Could you get a debug log?
https://nginx.org/en/docs/debugging_log.html

>so I think the problem occurs at http level while uploading files but I
>can't manage to debug my system.

As we don't know anything about you system it will help a lot to get
some infos about your setup.

Versions + configs:

OS:
tomcat:
httpd:
nginx:
Environment : azure, google, aws, bare metal, .... ? 

>Giacomo

Best regards
Aleks

PS: If it's OT for the list please let us know, thanks.

>Da: "Aleksandar Lazic" <al-nginx at none.at>
>A: "nginx" <nginx at nginx.org>
>Inviato: Sabato, 28 luglio 2018 18:41:59
>Oggetto: Re: nginx -> httpd -> mod_jk -> tomcat
>
>Hi.
>
>On 26/07/2018 10:06, Giacomo Arru - BETA Technologies wrote:
>>Hi everybody,
>>
>>I recently begun using proxy with nginx (same tests were made with
>>haproxy).
>
>Which one do you prefer as both are very good and have similar features.
>
>>My needs are to proxy for failover and balancing tomcat: I need to
>>serve lots of users with production app.
>>
>>While I understood that a 100% tomcat AJP1.3 compatibility is
>>achievable with apache httpd only and mod_jk, I successfully serve my
>>app with apache to a simple 80 http port (cookie path already
>>patched). So I decided to have a localhost apache httpd to proxy tomcat
>>with AJP. IT works perfectly.
>
>For which particular feature do you need ajp?
>I have used several tomcats with httpd with ajp but after some horrible
>errors we switched to http connector.
>https://tomcat.apache.org/tomcat-9.0-doc/config/http.html
>
>In case you don't need a special feature in httpd this makes also
>possible to reduce the complexity of your chain ;-)
>
>nginx (http/https/server static files) -> tomcat
>
>>Now, I need to proxy httpd with nginx, adding SSL with letsencrypt. I
>>successfuly configured the proxy and everything works but uploads: if I
>>send a file to my app, only small uploads work.
>>
>>I'd like to investigate the headers, maybe I need to transform some
>>string but I'm a completely newbie from this point of view.
>>
>>Do you have some tips on how to investigate the problem?
>
>With small you mean ~1M, that's the default setup for
>
>client_max_body_size
>https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size
>
>>Thanks,
>>
>>Giacomo Arru
>
>Best regards
>Aleks
>_______________________________________________
>nginx mailing list
>nginx at nginx.org
>http://mailman.nginx.org/mailman/listinfo/nginx
>
>-- 
>Questo messaggio stato analizzato con Libra ESVA ed risultato non infetto.
>Seguire il link qui sotto per segnalarlo come spam:

>_______________________________________________
>nginx mailing list
>nginx at nginx.org
>http://mailman.nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list