Echo sub request not working

Hi,

I am new to Nginx, so know very little about it.

My requirement is I need to make a service call but along with proxy
passing
that request, I need to make call to another service/servlet. For this I
decided to use Echo module to use the echo_subrequest_async option.

However the subrequest is not working and even simple echo print is not
working. Where does echo “hello” supposed to go? to the client side (my
guess)

Below is my configuration (some notes):

  1. Both the servers are java servers which are running on my local box
  2. my os is mac osx version 10.9.5
    3, I compile nginx 1.6.2 from source and with modules pcre and http echo

sudo /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.6.2
built by clang 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
configure arguments: --with-pcre=/Users/amchauhan/project/pcre-8.35
–add-module=/Users/amchauhan/project/echo-nginx-module-0.57
–with-cc-opt=-Wno-deprecated-declarations

nginx config

events {
worker_connections 1024;
}

http {

server {
listen 80;
server_name localhost;

 location /mywebapp {
    default_type "text/plain";
    echo "in webapp call, should not happen";
    echo_flush;
    proxy_pass http://localhost:8080/mywebapp/;
 }

 location /messaging-service {
    default_type "text/plain";
    echo "in the messaging service call";
    echo_flush;
    echo_subrequest_async  GET '/mywebapp/second';
    proxy_pass http://localhost:8090/messaging-service/;
 }

 location /mywebapp/second {
    echo "Going to keep sesson alive !!";
    echo_flush;
    proxy_pass http://localhost:8080/mywebapp/second/;
}

}

}

Posted at Nginx Forum:

When I say both the servers running on my local machine it means servers
running on localhost:8080 and localhost:8090. Both are java tomcat
servers.

Posted at Nginx Forum:

Can anyone help me with this?

Posted at Nginx Forum: