intel / asynch_mode_nginx

Other
210 stars 61 forks source link

Nginx startup error when config "ssl_engine " #47

Closed tangha2x closed 3 years ago

tangha2x commented 3 years ago

When I start nginx, it say:

nginx: [emerg] ENGINE_by_id("qatengine") failed nginx: [emerg] ssl engine send ctrl failed nginx: [emerg] ssl engine set failed

And my nginx config file:

worker_processes 88;

load_module modules/ngx_ssl_engine_qat_module.so;

events { use epoll; worker_connections 8192; multi_accept on; accept_mutex on; }

ssl_engine { use_engine qatengine; default_algorithms RSA,EC,DH,PKEY_CRYPTO; qat_engine { qat_sw_fallback on; qat_offload_mode async; qat_notify_mode poll; qat_poll_mode heuristic; qat_shutting_down_release on; } }

tangha2x commented 3 years ago

sbin/nginx -V

nginx version: nginx/1.18.0 built by gcc 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC) built with OpenSSL 3.0.0-beta1 17 Jun 2021 TLS SNI support enabled configure arguments: --prefix=/usr/src/asynch_nginx --with-http_ssl_module --add-dynamic-module=modules/nginx_qatzip_module --add-dynamic-module=modules/nginx_qat_module/ --with-cc-opt='-DNGX_SECURE_MEM -I/usr/src/OpenSSL/include -I/usr/src/QAT_drivers/quickassist/include -I/usr/src/QAT_drivers/quickassist/include/dc -I/usr/src/QATzip/include -Wno-error=deprecated-declarations' --with-ld-opt='-Wl,-rpath=/usr/src/OpenSSL/lib -L/usr/src/OpenSSL/lib -L/usr/src/QATzip/src -lqatzip -lz'

zhangp8x commented 3 years ago

@tangha2x

Engine compile failure. please refer to https://github.com/intel/asynch_mode_nginx/tree/master/test/performance_bkm & https://github.com/intel/QAT_Engine

tangha2x commented 3 years ago

openssl engine -t -c -vvvv qatengine

(qatengine) Reference implementation of QAT crypto engine(qat_sw) v0.6.6 [id-aes128-GCM, id-aes192-GCM, id-aes256-GCM] [ available ] ENABLE_EXTERNAL_POLLING: Enables the external polling interface to the engine. (input flags): NO_INPUT POLL: Polls the engine for any completed requests (input flags): NO_INPUT ENABLE_HEURISTIC_POLLING: Enable the heuristic polling mode (input flags): NO_INPUT GET_NUM_REQUESTS_IN_FLIGHT: Get the number of in-flight requests (input flags): NUMERIC INIT_ENGINE: Initializes the engine if not already initialized (input flags): NO_INPUT

Due to different installation methods, there is no OpenSSL/lib directory in my OpenSSL DIR, so I mkdir OpenSSL/lib, then copy libc.so, libssl.so and qatengine.so into the OpenSSL/lib

zhangp8x commented 3 years ago

Release v0.4.5 contains bug fix.

This release was tested against:

OpenSSL-1.1.1j QAT engine v0.6.4 QATzip v1.0.3 QAT driver 4.13.0

Please use https://github.com/intel/asynch_mode_nginx/releases/tag/v0.4.5 to install dependency package.

tangha2x commented 3 years ago

It looks my QAT driver maybe incorrect, I use version is "1.7.*", BTW where can I get the version "QAT driver 4.13.0", thank you!

zhangp8x commented 3 years ago

@tangha2x You're welcome, issue will be closed, any problem please new a issue.