yaoweibin / nginx_ajp_module Goto Github PK
View Code? Open in Web Editor NEWsupport AJP protocol proxy with Nginx
Home Page: http://github.com/yaoweibin/nginx_ajp_module
support AJP protocol proxy with Nginx
Home Page: http://github.com/yaoweibin/nginx_ajp_module
求解决!
Hi,
I have a lot of warning messages like this with nginx 1.8:
ngx_http_upstream_send_request_body: bad state(3) while reading response header from upstream
Any idea?
Thanks
Hi~
We are use nginx(1.6.2), nginx_ajp_module(https://github.com/yaoweibin/nginx_ajp_module/archive/master.zip) and apache_tomcat(6.0.35).
5 machines for nginx, and 16 instances for tomcat.
The configuration of nginx is as bellow :
nginx.conf :
events {
worker_connections 20000;
}
upstream tomcat_worker_multi {
server 192.168.100.100:8009;
server 192.168.100.100:8019;
server 192.168.100.100:8029;
server 192.168.100.100:8039;
check interval=3000 rise=2 fall=5 timeout=100 type=ajp;
}
keepalive_timeout 0;
location / {
ajp_keep_conn on;
ajp_pass tomcat_worker_multi;
}
We've got lots of error messages in error.log as bellow :
[error] 15148#0: *25812196 connect() failed (110: Connection timed out) while connecting to upstream, client: xx.xx.xx.xx, server: localhost, request: "GET /foo HTTP/1.1", upstream: "ajp://192.168.100.100:8009", host: "api.foo.com"
[error] 15148#0: *25812196 connect() failed (110: Connection timed out) while connecting to upstream, client: xx.xx.xx.xx, server: localhost, request: "GET /foo HTTP/1.1", upstream: "ajp://192.168.100.100:8019", host: "api.foo.com"
[error] 15148#0: *25812196 connect() failed (110: Connection timed out) while connecting to upstream, client: xx.xx.xx.xx, server: localhost, request: "GET /foo HTTP/1.1", upstream: "ajp://192.168.100.100:8029", host: "api.foo.com"
...
...
Also, manual of ajp_module like this :
default: ajp_connect_timeout 60s;
This directive assigns a timeout for the connection to the upstream server. It is necessary to keep in mind that this time out cannot be more than 75 seconds.
we don't configure a specific value of ajp_connect_timeout, and I'm thinking the value is 60s.
Do you have idea why we've got a error messages?
When access a web page from Nginx + AJP, my browser can't display the content of the web page.
I found the below failure in error.log:
2011/04/06 10:23:01 [debug] 17578#0: *18 ngx_http_ajp_process_header: state(3)
2011/04/06 10:23:01 [debug] 17578#0: *18 ngx_http_ajp_process_header: parse response, pos:0842F0B8, last:0842F13D
2011/04/06 10:23:01 [debug] 17578#0: *18 ngx_http_ajp_input_filter: state(5)
2011/04/06 10:23:01 [debug] 17578#0: *18 ngx_http_ajp_input_filter: state(7)
2011/04/06 10:23:01 [crit] 17578#0: *18 open() "/root/download/nginx-0.8.54/addons/nginx_ajp_module/test/t/servroot/ajp_temp/1/00/0000000001" failed (13: Permission denied) while reading upstream, client: 127.0.0.1, server: localhost, request: "GET /test/index.html HTTP/1.1", upstream: "ajp://10.34.63.188:8009", host: "localhost:1984"
Condition:
The Nginx prefix is /root/download/nginx-0.8.54/addons/nginx_ajp_module/test/t/servroot/, and I run nginx as root role.
The owner of prefix and ajp_tmep directory is as following, which isn't a problem.
drwxr-xr-x 11 root root 4096 Apr 6 11:55 servroot
drwx------ 2 nobody root 4096 Apr 6 14:21 ajp_temp
The debug info in strace cmd:
[pid 18438] open("/root/download/nginx-0.8.54/addons/nginx_ajp_module/test/t/servroot/ajp_temp/1/00/0000000001", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = -1 EACCES (Permission denied)
I have wondering why this permission problem occur.
假设nginx.conf部分配置如下:
upstream tomcats {
server 10.150.12.190:9009;
keepalive 1024;
}
upstream backup{
server 10.150.12.190:8009;
keepalive 1024;
}
server {
listen 6000 backlog=1024;
server_name test.163.com;
client_max_body_size 128m;
location @fallback {
expires -1;
ajp_keep_conn on;
ajp_pass backup;
}
location /{
ajp_keep_conn on;
ajp_pass tomcats;
error_page 502 503 504 @fallback;
}
}
用户访问如下:
curl -v 'http://10.150.12.190:6000/test.jsp' -d 'ddd'
nginx会先访问10.150.12.190:9009,出现50x错误的时候,走error_page,继续访问10.150.12.190:8009,但由于nginx ajp模块对body的数据中的buffer指针做了如下修改:
b_out->file_last = b_in->file_pos = b_in->file_last;
b_in->file_pos += max_size - size;
b_out->last = b_in->pos = b_in->last;
b_in->pos += max_size - size;
导致问题如下:
1)无法把post数据传递过去
2)由于指针做了修改,易崩溃
./nginx_ajp -c /usr/local/nginx/conf/nginx.conf_ajp_2014
Aborted
其它proxy,都不会修改body缓冲区的指针的,所以不会出现类似nginx ajp的问题
I have a problem. How can I solve this problem.
My old server running successfully apache2+tomcat. Below config in my apache. Now I change nginx+tomcat. But JkUnmount command is not nginx.
My javascript files and some alias is working only nginx.
JkMount /* worker1
Please assist me on this and advice me.
Thank you
Hi
I'm trying to build this module against nginx 1.10.2
Hunk #1 succeeded at 5417 (offset 1378 lines).
Hunk #2 succeeded at 5514 (offset 1384 lines).
Hunk #3 succeeded at 5531 (offset 1362 lines).
Hunk #4 succeeded at 5565 (offset 1362 lines).
Hunk #5 FAILED at 4221.
Hunk #6 succeeded at 5627 (offset 1361 lines).
1 out of 6 hunks FAILED -- saving rejects to file src/http/ngx_http_upstream.c.rej
patching file src/http/ngx_http_upstream.h
Any ideas?
Hi all,
Is possible protect the AJP connection with a secret, as well as carefully reviewing network binding and firewall configuration to ensure incoming connections are only allowed from trusted hosts?
I mean, like this:
Tested while adding ajp as a third party module to the nginx ebuild in gentoo. Output:
NGX_DEPS="src/core/nginx.h src/core/ngx_config.h src/core/ngx_core.h src/core/ngx_log.h src/core/ngx_palloc.h src/core/ngx_array.h src/core/ngx_list.h src/core/ngx_hash.h src/core/ngx_buf.h src/core/ngx_queue.h src/core/ngx_string.h src/core/ngx_parse.h src/core/ngx_inet.h src/core/ngx_file.h src/core/ngx_crc.h src/core/ngx_crc32.h src/core/ngx_murmurhash.h src/core/ngx_md5.h src/core/ngx_sha1.h src/core/ngx_rbtree.h src/core/ngx_radix_tree.h src/core/ngx_slab.h src/core/ngx_times.h src/core/ngx_shmtx.h src/core/ngx_connection.h src/core/ngx_cycle.h src/core/ngx_conf_file.h src/core/ngx_resolver.h src/core/ngx_open_file_cache.h src/core/ngx_crypt.h src/event/ngx_event.h src/event/ngx_event_timer.h src/event/ngx_event_posted.h src/event/ngx_event_busy_lock.h src/event/ngx_event_connect.h src/event/ngx_event_pipe.h src/os/unix/ngx_time.h src/os/unix/ngx_errno.h src/os/unix/ngx_alloc.h src/os/unix/ngx_files.h src/os/unix/ngx_channel.h src/os/unix/ngx_shmem.h src/os/unix/ngx_process.h src/os/unix/ngx_setaffinity.h src/os/unix/ngx_setproctitle.h src/os/unix/ngx_atomic.h src/os/unix/ngx_gcc_atomic_x86.h src/os/unix/ngx_thread.h src/os/unix/ngx_socket.h src/os/unix/ngx_os.h src/os/unix/ngx_user.h src/os/unix/ngx_process_cycle.h src/os/unix/ngx_linux_config.h src/os/unix/ngx_linux.h src/event/ngx_event_openssl.h src/core/ngx_regex.h objs/ngx_auto_config.h src/http/ngx_http.h src/http/ngx_http_request.h src/http/ngx_http_config.h src/http/ngx_http_core_module.h src/http/ngx_http_cache.h src/http/ngx_http_variables.h src/http/ngx_http_script.h src/http/ngx_http_upstream.h src/http/ngx_http_upstream_round_robin.h src/http/ngx_http_busy_lock.h src/http/modules/ngx_http_ssi_filter_module.h src/http/ngx_http_spdy.h src/http/ngx_http_spdy_module.h src/http/modules/ngx_http_ssl_module.h src/http/modules/perl/ngx_http_perl_module.h" \
perl Makefile.PL \
LIB= \
PREFIX=/usr \
INSTALLDIRS=vendor \
INSTALLSITEMAN3DIR=
/var/tmp/portage/www-servers/nginx-1.5.11/work/nginx_ajp_module-0.2.6/ngx_http_upstream_jvm_route_module.c: In function 'ngx_http_upstream_init_jvm_route_rr':
/var/tmp/portage/www-servers/nginx-1.5.11/work/nginx_ajp_module-0.2.6/ngx_http_upstream_jvm_route_module.c:384:51: error: 'ngx_http_upstream_server_t' has no member named 'srun_id'
peers->peer[n].srun_id = server[i].srun_id;
^
/var/tmp/portage/www-servers/nginx-1.5.11/work/nginx_ajp_module-0.2.6/ngx_http_upstream_jvm_route_module.c:386:52: error: 'ngx_http_upstream_server_t' has no member named 'max_busy'
peers->peer[n].max_busy = server[i].max_busy;
^
/var/tmp/portage/www-servers/nginx-1.5.11/work/nginx_ajp_module-0.2.6/ngx_http_upstream_jvm_route_module.c:447:52: error: 'ngx_http_upstream_server_t' has no member named 'srun_id'
backup->peer[n].srun_id = server[i].srun_id;
^
/var/tmp/portage/www-servers/nginx-1.5.11/work/nginx_ajp_module-0.2.6/ngx_http_upstream_jvm_route_module.c:449:53: error: 'ngx_http_upstream_server_t' has no member named 'max_busy'
backup->peer[n].max_busy = server[i].max_busy;
^
/var/tmp/portage/www-servers/nginx-1.5.11/work/nginx_ajp_module-0.2.6/ngx_http_upstream_jvm_route_module.c: In function 'ngx_http_upstream_jvm_route':
/var/tmp/portage/www-servers/nginx-1.5.11/work/nginx_ajp_module-0.2.6/ngx_http_upstream_jvm_route_module.c:1253:11: error: 'NGX_HTTP_UPSTREAM_SRUN_ID' undeclared (first use in this function)
| NGX_HTTP_UPSTREAM_SRUN_ID
^
/var/tmp/portage/www-servers/nginx-1.5.11/work/nginx_ajp_module-0.2.6/ngx_http_upstream_jvm_route_module.c:1253:11: note: each undeclared identifier is reported only once for each function it appears in
objs/Makefile:2114: recipe for target 'objs/addon/nginx_ajp_module-0.2.6/ngx_http_upstream_jvm_route_module.o' failed
make[1]: *** [objs/addon/nginx_ajp_module-0.2.6/ngx_http_upstream_jvm_route_module.o] Error 1
/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c: In function ‘ngx_http_ajp_store’:
/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:467:30: error: comparison between pointer and integer [-Werror]
if (alcf->upstream.cache != NGX_CONF_UNSET_PTR
^
/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:468:33: error: comparison between pointer and integer [-Werror]
&& alcf->upstream.cache != NULL)
^
/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c: In function ‘ngx_http_ajp_cache’:
/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:540:30: error: comparison between pointer and integer [-Werror]
if (alcf->upstream.cache != NGX_CONF_UNSET_PTR) {
^
/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:545:30: error: assignment makes integer from pointer without a cast [-Werror]
alcf->upstream.cache = NULL;
^
/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:553:26: error: assignment makes integer from pointer without a cast [-Werror]
alcf->upstream.cache = ngx_shared_memory_add(cf, &value[1], 0,
^
/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:555:30: error: comparison between pointer and integer [-Werror]
if (alcf->upstream.cache == NULL) {
^
/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c: In function ‘ngx_http_ajp_create_loc_conf’:
/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:669:26: error: assignment makes integer from pointer without a cast [-Werror]
conf->upstream.cache = NGX_CONF_UNSET_PTR;
^
In file included from src/core/ngx_core.h:76:0,
from /home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:3:
/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c: In function ‘ngx_http_ajp_merge_loc_conf’:
src/core/ngx_conf_file.h:252:14: error: comparison between pointer and integer [-Werror]
if (conf == NGX_CONF_UNSET_PTR) {
^
/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:867:5: note: in expansion of macro ‘ngx_conf_merge_ptr_value’
ngx_conf_merge_ptr_value(conf->upstream.cache,
^
src/core/ngx_conf_file.h:253:22: error: comparison between pointer and integer [-Werror]
conf = (prev == NGX_CONF_UNSET_PTR) ? default : prev;
^
/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:867:5: note: in expansion of macro ‘ngx_conf_merge_ptr_value’
ngx_conf_merge_ptr_value(conf->upstream.cache,
^
src/core/ngx_conf_file.h:253:55: error: pointer/integer type mismatch in conditional expression [-Werror]
conf = (prev == NGX_CONF_UNSET_PTR) ? default : prev;
^
/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:867:5: note: in expansion of macro ‘ngx_conf_merge_ptr_value’
ngx_conf_merge_ptr_value(conf->upstream.cache,
^
src/core/ngx_conf_file.h:253:14: error: assignment makes integer from pointer without a cast [-Werror]
conf = (prev == NGX_CONF_UNSET_PTR) ? default : prev;
^
/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:867:5: note: in expansion of macro ‘ngx_conf_merge_ptr_value’
ngx_conf_merge_ptr_value(conf->upstream.cache,
^
/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:870:53: error: invalid type argument of ‘->’ (have ‘int’)
if (conf->upstream.cache && conf->upstream.cache->data == NULL) {
^
/home/niemi/MLserver/nginx_ajp_module-master/ngx_http_ajp_module.c:873:18: error: assignment makes pointer from integer without a cast [-Werror]
shm_zone = conf->upstream.cache;
^
cc1: all warnings being treated as errors
make[1]: *** [objs/addon/nginx_ajp_module-master/ngx_http_ajp_module.o] Error 1
objs/Makefile:1140: recipe for target 'objs/addon/nginx_ajp_module-master/ngx_http_ajp_module.o' failed
make[1]: Leaving directory '/home/niemi/MLserver/nginx-1.7.10'
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2
When using a load balancer in front of nginx, the real protocol is actually set in a request header X-Forwarded-Proto.
Adding "ajp_scheme_header X-Forwarded-Proto" to the ajp module conf could change the actual value of the scheme passed to tomcat, so all URL created inside the web application will be correct.
Our setup:
Problem:
The problem was that users using firefox 40 could not authenticate to our service and were stuck in one of the redirects served by tomcat. The problem was tracked to an invalid ajp message sent to tomcat which silently keeled over. Furthermore it was tracked to ngx_http_ajp.c
to
if ((sc = sc_for_req_header(&header[i])) != UNKNOWN_METHOD) {
if (ajp_msg_append_uint16(msg, (uint16_t)sc)) {
ngx_log_error(NGX_LOG_ERR, log, 0,
"ajp_marshal_into_msgb: "
"Error appending the header name");
return AJP_EOVERFLOW;
}
}
else {
if (ajp_msg_append_string(msg, &header[i].key)) {
ngx_log_error(NGX_LOG_ERR, log, 0,
"ajp_marshal_into_msgb: "
"Error appending the header name");
return AJP_EOVERFLOW;
}
}
where headers like REMOTE_USER, AUTH_TYPE had the same hashes?! as some of the request_known_headers_t and the keys were not added to the message. That is clearly incorrect. Tomcat refused to decode the message and silently returned 500.
The is_ssl bit seems to be setted too late in ngx_http_ajc.c, so for ajp server the is_ssl is off and the wrong protocol is used. Follow a patch which fix the problem.
In ChangeLog you could add: Maurizio Boriani [email protected] for Zucchetti S.p.A.
413a414,417
>
> #if (NGX_HTTP_SSL)
> is_ssl = r->http_connection->ssl;
> #endif
534,537d537
< #if (NGX_HTTP_SSL)
< is_ssl = r->http_connection->ssl;
< #endif
<
webloginc中找不到srun_id,怎么使用jvm_route 呢?
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -O2 -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I ./nginx_ajp_module/modules -I ./nginx_ajp_module -I objs -I src/http -I src/http/modules -I src/http/modules/perl -I src/mail \ -o objs/addon/nginx_ajp_module/ngx_http_ajp_handler.o \ ./nginx_ajp_module/ngx_http_ajp_handler.c ./nginx_ajp_module/ngx_http_ajp_handler.c: In function ‘ngx_http_ajp_handler’: ./nginx_ajp_module/ngx_http_ajp_handler.c:105: error: ‘ngx_event_pipe_t’ has no member named ‘keepalive’ ./nginx_ajp_module/ngx_http_ajp_handler.c: In function ‘ngx_http_ajp_end_response’: ./nginx_ajp_module/ngx_http_ajp_handler.c:1024: error: ‘ngx_event_pipe_t’ has no member named ‘keepalive’ make[1]: *** [objs/addon/nginx_ajp_module/ngx_http_ajp_handler.o] Error 1
Hello,
im trying build nginx with nginx_ajp_module but its runs no good.
My system:
CentOS 6.4 Final (64bits)
Kernel: 2.6.32-358.2.1.el6.x86_64
gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
GNU Make 3.81
SSL Packages: openssl-devel-1.0.0-27.el6_4.2.x86_64 and openssl-1.0.0-27.el6_4.2.x86_64
Download module and apply patch
/usr/src/nginx/nginx-1.2.0# patch -p1 < /usr/src/nginx/nginx_ajp_module-master/ajp.patch
Configure line:
./configure --add-module=/usr/src/nginx/nginx_ajp_module-master --sbin-path=/usr/local/sbin --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --with-http_stub_status_module --with-http_ssl_module
./configure output:
...
configuring additional modules
adding module in /usr/src/nginx/nginx_ajp_module-master
checking for nginx_ajp_module ... found
Configuration summary
using system PCRE library
using system OpenSSL library
md5: using OpenSSL library
sha1: using OpenSSL library
using system zlib library
nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/sbin"
nginx configuration prefix: "/etc/nginx"
nginx configuration file: "/etc/nginx/nginx.conf"
nginx pid file: "/var/run/nginx.pid"
nginx error log file: "/var/log/nginx/error.log"
nginx http access log file: "/var/log/nginx/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"
All seems good after run configure command. When i try run make, its show a error.
Output message:
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/src/nginx/nginx_ajp_module-master/modules -I /usr/src/nginx/nginx_ajp_module-master -I objs -I src/http -I src/http/modules -I src/mail
-o objs/addon/nginx_ajp_module-master/ngx_http_ajp.o
/usr/src/nginx/nginx_ajp_module-master/ngx_http_ajp.c
/usr/src/nginx/nginx_ajp_module-master/ngx_http_ajp.c: In function ‘ajp_marshal_into_msgb’:
/usr/src/nginx/nginx_ajp_module-master/ngx_http_ajp.c:535: error: ‘ngx_http_connection_t’ has no member named ‘ssl’
make[1]: *** [objs/addon/nginx_ajp_module-master/ngx_http_ajp.o] Error 1
make[1]: Leaving directory `/usr/src/nginx/nginx-1.2.0'
make: *** [build] Error 2
Any idea?
I'm using Nginx 1.8.0 with this module to proxy requests to JBoss-AS over AJP. When I upload a file I get this error in the Nginx logs, "upstream sent unexpected AJP type: 6 while reading upstream" and this error in the JBoss-AS log, "JBWEB002011: Socket read failed". I thought it was related to ajp_max_data_packet_size based on testing files above and under 8K. I tried changing the setting and even defining it to 8k, but it seems to crash the Nginx worker. Also, if I look at a packet capture, the data is truncated at the 8k boundary. E-mail me at [email protected] to obtain the packet capture.
I'm attempting to use this module to talk to a backend AJP endpoint (Jetty) and so far so good with using a location
block with ajp_pass
and other associated options. However, I'm wanting to cache responses in Nginx using ajp_cache
, much like you can with proxy_cache
, and I'm experiencing the server closing the connection when requesting cached resources.
This happens for subsequent requests for an individual cached resource or URL. The first request for a given URL will succeed and be correctly returned to the client, but subsequent requests for the same resource cause the server to close the connection with no data (or headers) being sent. A manual inspection of the file structure shows that it appears the cache is being filled with requested resources. Clearing the cache manually allows the first request to a given URL to work again, but the same behaviour reoccurs with subsequent requests failing.
My example configuration, which naively caches all images and JS resources for an AJP backend looks like this:
http {
...
ajp_cache_path /var/cache/nginx/ajp_cache levels=1:2
keys_zone=ajp_cache:60m
inactive=100m;
...
}
server {
listen 80 default_server;
listen 443 ssl default_server;
location / {
location ~ ^/.*\.(gif|jpg|png|js)$ {
ajp_cache ajp_cache;
ajp_cache_key "$host$request_uri";
ajp_cache_valid any 1d;
ajp_read_timeout 90s;
ajp_ignore_headers "Set-Cookie";
ajp_hide_header Server;
ajp_pass localhost:8009;
}
ajp_read_timeout 90s;
ajp_hide_header Server;
ajp_pass localhost:8009;
}
As a side note, responses that are always ignored for caching (eg responses with a Set-Cookie
header by default), continue to be served - though this is probably because no attempt at caching or reading them from cache is attempted.
I'm using this plugin with Nginx 1.6.0. Nginx compiles correctly, though that's not to say there's been some incompatibility or difference introduced recently with the caching code in the Nginx's core.
[[email protected] ~/workspace/tengine-1.4.3$]patch -p1 < /root/workspace/nginx_ajp_module-0.2.5/ajp.patch
patching file src/event/ngx_event_pipe.c
Hunk #1 succeeded at 311 (offset 6 lines).
patching file src/event/ngx_event_pipe.h
Hunk #1 succeeded at 57 (offset -1 lines).
patching file src/http/ngx_http_upstream.c
Hunk #1 succeeded at 4115 (offset 266 lines).
Hunk #2 FAILED at 3942.
Hunk #3 FAILED at 3981.
Hunk #4 succeeded at 4282 (offset 267 lines).
Hunk #5 succeeded at 4315 (offset 267 lines).
Hunk #6 FAILED at 4093.
3 out of 6 hunks FAILED -- saving rejects to file src/http/ngx_http_upstream.c.rej
patching file src/http/ngx_http_upstream.h
Hunk #1 FAILED at 85.
Hunk #2 FAILED at 97.
2 out of 2 hunks FAILED -- saving rejects to file src/http/ngx_http_upstream.h.rej
i am compiling ajp_module_master with nginx 1.4.7 but while compiling i am not able to find path
means for compiling we use command ./configure --add-module=path to ajp_module_master
in path which path should i give bcoz i m new to this topic i m not able to do this
please reply if anyone knows the solution
thanks
Hi,
When I use Nginx+ajp_module+tomcat and Apache+mod_jk+tomcat, I found two problems. What's the reason? Can you help?
(1) There are too many TIME_WAIT between nginx and tomcat
The TIME_WAIT/Total connection is 13890/16030
When I use the Apache+mod_jk+tomcat, the TIME_WAIT/Total is 92/952.
(2) The %CPU of tomcat in Nginx is higher than that of tomcat in apache. -- This is the main problem.
The tomcat in Apache used all the maxThreads(512), but tomcat in Nginx only uses 125 threads, via "ps -efL | grep catalina "
The configuration of tomcats in these two situatin are the same, and the concurrency is also the same. The configuration of ajp module is as follow:
ajp_connect_timeout 10;
ajp_read_timeout 10;
upstream loadbalancer {
server 127.0.0.1:8001;
server 127.0.0.1:8002;
server 127.0.0.1:8003;
#keepalive 6400;
}
Whether i enable keepalive in upstream directive or not, the two problem exists all the same.
The ajp_module version is 0.2.5, the latest version.
Can you give me some clues to reslove these problems? Thank you!
I am using Nginx with tomcat on windows. Unable to upload files more than 4 GB and the Nginx error log shows the following error "WSASend() failed (10053: An established connection was aborted by the software in your host machine) while sending request body again to upstream".
Please update if anyone has the solution for this.
In the Nginx error logs I'm seeing occasional error messages about bad AJP headers being received. The log line looks like this:
2011/03/31 00:49:08 [error] 10953#0: *37200 ngx_http_ajp_input_filter: bad header
ajp_msg_dump(): "bad header", start:0000000001407220, pos:0000000001407220, last:0000000001407227
dump packet:
00 41 42 00 02 05 01
I've looked through the code and I believe I see the problem:
It would be nice to have directive ajp_set_header like proxy_set_header http://wiki.nginx.org/NginxHttpProxyModule#proxy_set_header
当后端系统(比如tomcat服务器)繁忙时,nginx会报502错误,如果原请求是post请求,出现502错误后,假设再次重定向到后端(比如tomcat)的的50x.html(这种场景不常见,只是假设),就会把不该发送的post数据发送过去
下面我们以http proxy为例说明原因:
当nginx internel direct到50x.html的时候,会调用ngx_http_proxy_create_request,会执行如下代码(中间我加了log)
1209 if (plcf->body_set == NULL && plcf->upstream.pass_request_body) {
1210
1211 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
1212 "pass req body:%V", &r->uri);
1213
1214 body = u->request_bufs;
1215 u->request_bufs = cl;
1216
1217 while (body) {
1218 b = ngx_alloc_buf(r->pool);
1219 if (b == NULL) {
1220 return NGX_ERROR;
1221 }
1222
1223 ngx_memcpy(b, body->buf, sizeof(ngx_buf_t));
1224
1225 cl->next = ngx_alloc_chain_link(r->pool);
1226 if (cl->next == NULL) {
1227 return NGX_ERROR;
1228 }
1229
1230 cl = cl->next;
1231 cl->buf = b;
1232
1233 body = body->next;
1234 if (ngx_strcmp(r->uri.data, "/50x.html") == 0) {
1235 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
1236 "body has content, heihei:%V", &r->uri);
1237
1238 }
这种问题对于其它代理模块均有问题。
对于ajp模块,这样设置,则会导致nginx直接崩溃
error_page 502 503 504 =200 /50x.html;
location /{
ajp_pass tomcats;
}
Using the latest version of this code, Nginx 1.8.0 seg faults on startup when the following is present within the configuration, noting this used to work with Nginx 1.6.3:
ajp_cache_path /var/cache/nginx/ajp_cache levels=1:2
keys_zone=ajp_cache:60m
inactive=100m;
Using gdb to get a backtrace shows:
Program received signal SIGSEGV, Segmentation fault.
ngx_array_push (a=0x0) at src/core/ngx_array.c:54
54 if (a->nelts == a->nalloc) {
(gdb) bt
#0 ngx_array_push (a=0x0) at src/core/ngx_array.c:54
#1 0x000000000045f907 in ngx_http_file_cache_set_slot (cf=0x7fffffffe0d0,
cmd=0x6fe450, conf=0x0) at src/http/ngx_http_file_cache.c:2432
#2 0x000000000041a486 in ngx_conf_handler (cf=0x7fffffffe0d0, filename=0x0)
at src/core/ngx_conf_file.c:391
#3 ngx_conf_parse (cf=0x7fffffffe0d0, filename=0x0)
at src/core/ngx_conf_file.c:247
#4 0x0000000000435c9a in ngx_http_block (cf=0x7fffffffe0d0,
cmd=<value optimized out>, conf=<value optimized out>)
at src/http/ngx_http.c:240
#5 0x000000000041a486 in ngx_conf_handler (cf=0x7fffffffe0d0,
filename=0x730f58) at src/core/ngx_conf_file.c:391
#6 ngx_conf_parse (cf=0x7fffffffe0d0, filename=0x730f58)
at src/core/ngx_conf_file.c:247
#7 0x0000000000417cf6 in ngx_init_cycle (old_cycle=0x7fffffffe180)
at src/core/ngx_cycle.c:264
#8 0x0000000000409196 in main (argc=<value optimized out>,
argv=<value optimized out>) at src/core/nginx.c:345
Hello
I suppose i'am not the only one who wants RPM release of your module :)
"configure, make, make all" for RHEL-like systems is a pain.
Are you planning to build RPM? Or write manual how to build RPM for your module
There's been some refactoring of the upstream module data types (well, more than that), which makes the build fail:
nginx_ajp_module-0.3.0/ngx_http_ajp_module.c:870:53: error: invalid type argument of '->' (have 'int')
if (conf->upstream.cache && conf->upstream.cache->data == NULL) {
I have a dictionary.
When the url contains special chars, there is a problem e.g.
Normal nginx proxy module the url like this:
http://dictzone.com/magyar-nemet-szotar/beskatuly%C3%A1z
With the ajp module the result is (with an error result):
http://dictzone.com/magyar-nemet-szotar/beskatuly%C3%A3%C2%A3%C3%A2%C2%A3%C3%A3%C2%A2%C3%A2%C2%A3%C3%A3%C2%A3%C3%A2%C2%A2%C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 301 0 "http://dictzone.com/nemet-magyar-szotar/einordnen"
81.183.236.20 - - [10/Jun/2011:22:33:15 +0200] "GET /magyar-nemet-szotar/beskatuly%C3%A3%C2%A1z HTTP/1.1" 301 0 "http://dictzone.com/nemet-magyar-szotar/einor
81.183.236.20 - - [10/Jun/2011:22:33:15 +0200] "GET /magyar-nemet-szotar/beskatuly%C3%A3%C2%A3%C3%A2%C2%A1z HTTP/1.1" 301 0 "http://dictzone.com/nemet-magyar-
81.183.236.20 - - [10/Jun/2011:22:33:15 +0200] "GET /magyar-nemet-szotar/beskatuly%C3%A3%C2%A3%C3%A2%C2%A3%C3%A3%C2%A2%C3%A2%C2%A1z HTTP/1.1" 301 0 "http://di
81.183.236.20 - - [10/Jun/2011:22:33:15 +0200] "GET /magyar-nemet-szotar/beskatuly%C3%A3%C2%A3%C3%A2%C2%A3%C3%A3%C2%A2%C3%A2%C2%A3%C3%A3%C2%A3%C3%A2%C2%A2%C3%
81.183.236.20 - - [10/Jun/2011:22:33:15 +0200] "GET /magyar-nemet-szotar/beskatuly%C3%A3%C2%A3%C3%A2%C2%A3%C3%A3%C2%A2%C3%A2%C2%A3%C3%A3%C2%A3%C3%A2%C2%A2%C3%
81.183.236.20 - - [10/Jun/2011:22:33:15 +0200] "GET /magyar-nemet-szotar/beskatuly%C3%A3%C2%A3%C3%A2%C2%A3%C3%A3%C2%A2%C3%A2%C2%A3%C3%A3%C2%A3%C3%A2%C2%A2%C3%
81.183.236.20 - - [10/Jun/2011:22:33:16 +0200] "GET /magyar-nemet-szotar/beskatuly%C3%A3%C2%A3%C3%A2%C2%A3%C3%A3%C2%A2%C3%A2%C2%A3%C3%A3%C2%A3%C3%A2%C2%A2%C3%
81.183.236.20 - - [10/Jun/2011:22:33:16 +0200] "GET /magyar-nemet-szotar/beskatuly%C3%A3%C2%A3%C3%A2%C2%A3%C3%A3%C2%A2%C3%A2%C2%A3%C3%A3%C2%A3%C3%A2%C2%A2%C3%
81.183.236.20 - - [10/Jun/2011:22:33:16 +0200] "GET /magyar-nemet-szotar/beskatuly%C3%A3%C2%A3%C3%A2%C2%A3%C3%A3%C2%A2%C3%A2%C2%A3%C3%A3%C2%A3%C3%A2%C2%A2%C3%
The error log:
2011/06/10 22:33:16 [error] 22244#0: *76 ngx_http_ajp_process_header: too small buffer for the ajp packet.
while reading response header from upstream, client: 81.183.236.20, server: dictzone.com, request: "GET /magyar-nemet-szotar/beskatuly%C3%A3%C2%A3%C3%A2%C2%A
[[email protected] ~/workspace/tengine-1.4.3$]patch -p1 < /root/workspace/nginx_ajp_module-0.2.5/ajp.patch
patching file src/event/ngx_event_pipe.c
Hunk #1 succeeded at 311 (offset 6 lines).
patching file src/event/ngx_event_pipe.h
Hunk #1 succeeded at 57 (offset -1 lines).
patching file src/http/ngx_http_upstream.c
Hunk #1 succeeded at 4115 (offset 266 lines).
Hunk #2 FAILED at 3942.
Hunk #3 FAILED at 3981.
Hunk #4 succeeded at 4282 (offset 267 lines).
Hunk #5 succeeded at 4315 (offset 267 lines).
Hunk #6 FAILED at 4093.
3 out of 6 hunks FAILED -- saving rejects to file src/http/ngx_http_upstream.c.rej
patching file src/http/ngx_http_upstream.h
Hunk #1 FAILED at 85.
Hunk #2 FAILED at 97.
2 out of 2 hunks FAILED -- saving rejects to file src/http/ngx_http_upstream.h.rej
How can we send additional HTTP headers to a backend Tomcat server from within nginx, over AJP?
We have an nginx in front of our Tomcat servers and for some /location
s we need to add some headers like X-Forwarded-For
, X-Forwarded-Proto
etc. The Tomcat application will read the headers with request.getHeader()
.
No matter what we try though, we can't seem to pass the extra headers to our Tomcat servers. What's the nginx configuration needed to pass the additional headers? Is this even possible with the nginx_ajp_module?
Note that I don't want to pass HTTP headers from the browser to Tomcat, I want to "enrich" the headers from inside nginx before passing the request to Tomcat.
Is it currently possible to send arbitrary request attributes via this module? In particular, I'm curious as to whether it is possible to set environment variables in this fashion. For example, for mod_proxy_ajp
for Apache, environment variables prefixed with AJP_
see this prefix stripped and are sent through as AJP request attributes (see https://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html#env). I'm curious as to how this can be done with Nginx as an auth module for Apache that I'm atttempting to replicate in Nginx relies on working in this fashion.
From http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html:
Beyond this list of basic attributes, any number of other attributes can be sent via the req_attribute code (0x0A). A pair of strings to represent the attribute name and value are sent immediately after each instance of that code. Environment values are passed in via this method.
Thoughts?
nginx_ajp_module/ngx_http_ajp_handler.c:93: error: ‘ngx_event_pipe_t’ has no member named ‘keepalive’
I try to compile from nginx source nginx-0.8.53 with nginx_ajp_module and get this error
Which version of nginx has ngx_event_pipe_t definition with keepalive ?
Are there any dependencies from other modules? If so, which additional modules are needed?
Hi,
I am trying to compile this AJP module with the latest nginx 1.4.1 but unfortunately it fails. Here is my configure parameters:
./configure --prefix=/opt/nginx-spdy --user=www-data --group=www-data --with-http_spdy_module --with-http_ssl_module --with-openssl=/opt/source/openssl-1.0.1e --with-http_stub_status_module --with-http_realip_module --with-http_gzip_static_module --add-module=/opt/source/nginx_ajp_module
and here is the make output just before it fails:
...
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I /opt/source/nginx_ajp_module/modules -I /opt/source/nginx_ajp_module -I /opt/source/openssl-1.0.1e/.openssl/include -I objs -I src/http -I src/http/modules -I src/mail
-o objs/addon/nginx_ajp_module/ngx_http_ajp_handler.o
/opt/source/nginx_ajp_module/ngx_http_ajp_handler.c
/opt/source/nginx_ajp_module/ngx_http_ajp_handler.c: In function ‘ngx_http_ajp_handler’:
/opt/source/nginx_ajp_module/ngx_http_ajp_handler.c:105: error: ‘ngx_event_pipe_t’ has no member named ‘keepalive’
/opt/source/nginx_ajp_module/ngx_http_ajp_handler.c: In function ‘ngx_http_ajp_end_response’:
/opt/source/nginx_ajp_module/ngx_http_ajp_handler.c:1024: error: ‘ngx_event_pipe_t’ has no member named ‘keepalive’
make[1]: *** [objs/addon/nginx_ajp_module/ngx_http_ajp_handler.o] Error 1
make[1]: Leaving directory `/opt/source/nginx-1.4.1'
make: *** [build] Error 2
Any ideas what's wrong here?
Thanks
H.N.
Hi,
Might you be so kind as to tell me why you removed jvm_route module ?
That was the #1 benefit of the nginx_ajp_module..
Compiler complains with:
nginx_ajp_module/ngx_http_ajp.c:140:29: Fehler: »ngx_http_request_t« {alias »struct ngx_http_request_s«} hat kein Element namens »space_in_uri«; meinten Sie »plus_in_uri«?
if (r->quoted_uri || r->space_in_uri || r->internal) {
^~~~~~~~~~~~
plus_in_uri
Hello if you have some time would it be possible to add support for loading this great module as a dynamic module as is supported in the new nginx 1.9.11?
https://www.nginx.com/blog/dynamic-modules-nginx-1-9-11/
https://www.nginx.com/resources/wiki/extending/converting/
I'm having a similar issue to #35
AJP: 0.3.0 (and 0.2.6 actually I tried to see if it was an issue with the latest release)
Nginx: 1.8.0
PCRE: 7.8
CentOS: 6.6
./configure --add-module=/root/nginx_ajp_module-0.3.0/ --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_spdy_module --with-cc-opt='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
...
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I src/core -I src/event -I src/event/modules -I src/os/unix -I /root/nginx_ajp_module-0.2.6//modules -I /root/nginx_ajp_module-0.2.6/ -I objs -I src/http -I src/http/modules -I src/mail
-o objs/addon/nginx_ajp_module-0.2.6/ngx_http_ajp.o
/root/nginx_ajp_module-0.2.6//ngx_http_ajp.c
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I src/core -I src/event -I src/event/modules -I src/os/unix -I /root/nginx_ajp_module-0.2.6//modules -I /root/nginx_ajp_module-0.2.6/ -I objs -I src/http -I src/http/modules -I src/mail
-o objs/addon/nginx_ajp_module-0.2.6/ngx_http_ajp_module.o
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c
cc1: warnings being treated as errors
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c: In function ‘ngx_http_ajp_store’:
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:468: error: comparison between pointer and integer
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:468: error: comparison between pointer and integer
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c: In function ‘ngx_http_ajp_cache’:
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:541: error: comparison between pointer and integer
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:546: error: assignment makes integer from pointer without a cast
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:555: error: assignment makes integer from pointer without a cast
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:556: error: comparison between pointer and integer
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c: In function ‘ngx_http_ajp_create_loc_conf’:
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:670: error: assignment makes integer from pointer without a cast
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c: In function ‘ngx_http_ajp_merge_loc_conf’:
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:869: error: comparison between pointer and integer
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:869: error: comparison between pointer and integer
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:869: error: pointer/integer type mismatch in conditional expression
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:869: error: assignment makes integer from pointer without a cast
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:872: error: invalid type argument of ‘->’ (have ‘int’)
/root/nginx_ajp_module-0.2.6//ngx_http_ajp_module.c:875: error: assignment makes pointer from integer without a cast
make[1]: *** [objs/addon/nginx_ajp_module-0.2.6/ngx_http_ajp_module.o] Error 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.