Kong 2.8.x warning on Startup w Postgres: resty.openssl.auxiliary.nginx is using plain FFI and it's only intended to be used in development #12880
-
We build Kong Gateway from nginx/openresty source and luarocks kong and we are running into a bit of logs that bother me since moving from C* to Postgres. First of all, the output of Kong context during all the startup/runtime contains this: 2024/04/18 21:25:23 [warn] 43#0: *4 [lua] nginx.lua:300: get_ngx_ssl_from_socket_ctx(): note resty.openssl.auxiliary.nginx is using plain FFI and it's only intended to be used in development, consider using lua-resty-openssl.aux-module in production., context: ngx.timer In Kong 2.8.1 series we install pgmoon like so in a later luarocks install command post build: I believe Kong put out their own modified version of pgmoon fork too but I don't see it used in the OSS kong builds in the 2.8.1 version so maybe that is not the direction I need to look. The meat of how we build Kong is: RUN cd /sg-kong-build-tools/openresty-build-tools #Symlink to luarocks executable and nginx executable #Install Kong via luarocks #Get the Kong executable resty script #Hit permissions issue first build getting into /user/local/kong so trying this Originally made an enterprise ticket asking about that error to which I got some helpful info that may clear issue up for me: local NO_C_MODULE_WARNING_MSG_SHOWN = false local function get_ngx_ssl_from_req() To remedy the above condition, I expect you'll need to install the following: https://github.com/fffonion/lua-resty-openssl-aux-module Based on the documentation there, once it is installed, lua-resty-openssl will automatically pick up on it and the error should no longer occur Maybe fffonion has some familiarity around this scenario? Our Kong runtime even with the warning seems to be doing fine and dandy talking to a postgres 14 cluster over TLS 1.2 regardless. But do wanna follow best practice and hopefully get this warning put away and documented here if any other OSS users come across this warning. Going back to days of 2.8.1 builds I see: Which has flag if Kong is an enterprise build then use dynamic module in the compile steps. Does this mean that non-enterprise builds will always throw this flag? Maybe I am missing where OSS Kong fixed the warning? Anyone weigh in on how I can fix this issue in OSS? Does it have to happen at compile time or is there a simple luarocks install I can add post compile that will resolve that warning? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Looking forward to eventually refactoring this beast to using the bazel build flows once we move to Kong 3.x series but for now getting that warning resolved is a priority while still on Kong 2.8.x |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Looks like that seems to have fixed it from throwing that error output!
|
Beta Was this translation helpful? Give feedback.
I think this would be the secret sauce? Any feedback is appreciated.
Usually w the mod security module I did not have to run the make installs post add-module like the docs of this lib recommend, but following per docs, otherwise I would have added the make install lines closer to its source pull down for better read visibility.
Also still not sure why it wasn't part of the main OSS build based on the flag I mentioned in the other build process? Seems like this lib would have been needed for OSS too to avoid these warnings unless there is a different patching spot or something I didn't see going down for 2.8.1 .