openresty / srcache-nginx-module

Transparent subrequest-based caching layout for arbitrary nginx locations.
http://wiki.nginx.org/NginxHttpSRCacheModule
476 stars 105 forks source link

Test cases failing on rhel 7.6 ppc64le - Errors host not found in upstream "agentzh.org" #81

Closed SantoshMagdum closed 5 years ago

SantoshMagdum commented 5 years ago

Hi All,

I had build the nginx binary on rhel 7.6 ppc64le (version 1.17.1.1rc0) from source code - https://github.com/openresty/openresty. Please note that, I had copied and used ppc64le compiled LuaJIT code while building openresty (nginx). Below command I used to compile the openresty -

./configure --with-cc-opt="-DNGX_LUA_USE_ASSERT -DNGX_LUA_ABORT_AT_PANIC" --with-http_image_filter_module --with-http_dav_module --with-http_auth_request_module --with-poll_module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module --with-http_iconv_module --with-http_drizzle_module --with-http_postgres_module --with-http_addition_module --add-module=/usr/openresty/openresty_test_modules/nginx-eval-module --add-module=/usr/openresty/openresty_test_modules/replace-filter-nginx-module

And then tried to execute the test cases for 'srcache-nginx-module' like below -

[root stream-lua-nginx-module]# pwd /usr/openresty/openresty/openresty-1.17.1.1rc0/build/srcache-nginx-module-0.31 [root stream-lua-nginx-module]# PATH=/usr/openresty/openresty/openresty-1.17.1.1rc0/build/srcache-nginx-module-0.31:$PATH prove -r t

NOTE: The 'srcache-nginx-module' version downloaded with openresty bundle is 0.31.

But I am getting below kind of repeated errors -

nginx: [emerg] host not found in upstream "agentzh.org" in /usr/openresty/openresty/openresty-1.17.1.1rc0/build/srcache-nginx-module-0.31/t/servroot/conf/nginx.conf:45
nginx: [emerg] host not found in upstream "agentzh.org" in /usr/openresty/openresty/openresty-1.17.1.1rc0/build/srcache-nginx-module-0.31/t/servroot/conf/nginx.conf:45

Please help suggest if I need to export any specific environment/setup any additional service or should try any compiler flag/somehow increase timeout value to make these test cases pass?

nginx version (compiled with libdrizzle 1.0 and radius, mariadb, postgresql services setup) -

# nginx -V
nginx version: openresty/1.17.1.1rc0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)
built with OpenSSL 1.0.2k-fips  26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt='-O2 -DNGX_LUA_USE_ASSERT -DNGX_LUA_ABORT_AT_PANIC' --add-module=../ngx_devel_kit-0.3.1rc1 --add-module=../iconv-nginx-module-0.14 --add-module=../echo-nginx-module-0.61 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2 --add-module=../set-misc-nginx-module-0.32 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.08 --add-module=../drizzle-nginx-module-0.1.11 --add-module=../ngx_postgres-1.0 --add-module=../srcache-nginx-module-0.31 --add-module=../ngx_lua-0.10.15 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.33 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.19 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.7 --add-module=../rds-json-nginx-module-0.15 --add-module=../rds-csv-nginx-module-0.09 --add-module=../ngx_stream_lua-0.0.7 --with-ld-opt=-Wl,-rpath,/usr/local/openresty/luajit/lib --with-http_image_filter_module --with-http_dav_module --with-http_auth_request_module --with-poll_module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module --with-http_addition_module --add-module=/usr/openresty/openresty_test_modules/nginx-eval-module --add-module=/usr/openresty/openresty_test_modules/replace-filter-nginx-module --with-stream --with-stream_ssl_preread_module
agentzh commented 5 years ago

Try running dig agentzh.org on your machine's command line?

SantoshMagdum commented 5 years ago

@agentzh - I see the ok response for dig tool and also received reply from agentzh.org for ping command - PING agentzh.org (188.166.239.230) 56(84) bytes of data. 64 bytes from 188.166.239.230 (188.166.239.230): icmp_seq=1 ttl=52 time=64.2 ms

Interestingly, openresty build with "--with-debug" option, errors for host agentzh.org are not coming but only below test case failure coming now -

   t/conditional-get.t ..... 19/54
   #   Failed test 'TEST 7: cache hit (I-U-S conditional GET, 412) - header Content-Length ok'
   #   at /usr/local/share/perl5/Test/Nginx/Socket.pm line 1009.
   #          got: '170'
   #     expected: '182'
   # Looks like you failed 1 test of 54.
SantoshMagdum commented 5 years ago

With the change of 'Content-Length:' from 182 to 170 the test case is passing. I shall make change and raise PR soon. Change made - Updated Content-Length: configuration to 170 from 182 in test case 7 - from file 'conditional-get.t' Content-Length: 170