package nginx-core 1.18.0-6ubuntu14.2: nginx: [emerg] dlopen() "/usr/share/nginx/modules/ngx_stream_geoip2_module.so" failed (/usr/share/nginx/modules/ngx_stream_geoip2_module.so: undefined symbol: ngx_stream_core_module)

Bug #1992339 reported by Hagar Ahmed
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
nginx (Ubuntu)
Expired
Undecided
Unassigned
Jammy
Incomplete
Medium
Unassigned

Bug Description

i found this bug during upgrade ubuntu

ProblemType: Package
DistroRelease: Ubuntu 22.04
Package: nginx-core 1.18.0-6ubuntu14.2
ProcVersionSignature: Ubuntu 5.15.0-48.54~20.04.1-generic 5.15.53
Uname: Linux 5.15.0-48-generic x86_64
NonfreeKernelModules: aufs
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Mon Oct 10 12:45:16 2022
ErrorMessage: installed nginx-core package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2021-07-01 (465 days ago)
InstallationMedia: Ubuntu 20.04.2.0 LTS "Focal Fossa" - Release amd64 (20210209.1)
Python3Details: /usr/bin/python3.10, Python 3.10.6, python3-minimal, 3.10.6-1~22.04
PythonDetails: N/A
RebootRequiredPkgs: Error: path contained symlinks.
RelatedPackageVersions:
 dpkg 1.21.1ubuntu2.1
 apt 2.4.8
SourcePackage: nginx
Title: package nginx-core 1.18.0-6ubuntu14.2 failed to install/upgrade: installed nginx-core package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to jammy on 2022-10-10 (0 days ago)

Revision history for this message
Hagar Ahmed (hagar--ahmed) wrote :
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for taking the time to report this bug and trying to make Ubuntu better.

Checking the journal of the nginx service you will be able to see:

nginx: configuration file /etc/nginx/nginx.conf test failed

This indicates that your config file is not valid, it might have a syntax issue or some invalid field. Please re-check its content before restarting the service.

Moreover, your dpkg log shows that you have a dependency issue with your firefox-locale-en package.

Since this is likely a local configuration issue, I am marking this bug as Invalid. If you disagree please set it back to New with some reasonable explanation.

Changed in nginx (Ubuntu):
status: New → Invalid
Revision history for this message
Thomas Ward (teward) wrote :

I don't want to counter you really, Lucas, but the underlying error is here in journalctl:

nginx: [emerg] dlopen() "/usr/share/nginx/modules/ngx_stream_geoip2_module.so" failed (/usr/share/nginx/modules/ngx_stream_geoip2_module.so: undefined symbol: ngx_stream_core_module) in /etc/nginx/modules-enabled

This is a known issue, and seen in Debian as well, but we'd have to do a no change rebuild in updates to make this rebuild and recompile, it's something that we need to work on and figure out 'best approach'.

Changed in nginx (Ubuntu):
status: Invalid → Confirmed
Changed in nginx (Ubuntu Jammy):
status: New → Confirmed
Changed in nginx (Ubuntu):
status: Confirmed → Incomplete
Changed in nginx (Ubuntu Jammy):
importance: Undecided → Medium
summary: - package nginx-core 1.18.0-6ubuntu14.2 failed to install/upgrade:
- installed nginx-core package post-installation script subprocess
- returned error exit status 1
+ package nginx-core 1.18.0-6ubuntu14.2: nginx: [emerg] dlopen()
+ "/usr/share/nginx/modules/ngx_stream_geoip2_module.so" failed
+ (/usr/share/nginx/modules/ngx_stream_geoip2_module.so: undefined symbol:
+ ngx_stream_core_module)
Revision history for this message
Thomas Ward (teward) wrote :

I just did a default install of NGINX on a 20.04 environment and did an upgrade to 22.04 and can't replicate this.

What architecture are you on? Is this a VM? Is this WSL? Can you share your config (and sanitize things like base hostnames, etc. out of things) so we can have a test example for us to do testing?

Changed in nginx (Ubuntu Jammy):
status: Confirmed → Incomplete
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for nginx (Ubuntu) because there has been no activity for 60 days.]

Changed in nginx (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for nginx (Ubuntu Jammy) because there has been no activity for 60 days.]

Changed in nginx (Ubuntu Jammy):
status: Incomplete → Expired
Revision history for this message
Jim Willeke (jwilleke) wrote :

Me Too.

nginx -t
nginx: [emerg] dlopen() "/usr/share/nginx/modules/ngx_stream_geoip2_module.so" failed (/usr/share/nginx/modules/ngx_stream_geoip2_module.so: undefined symbol: ngx_stream_core_module) in /etc/nginx/modules-enabled/70-mod-stream-geoip2.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed

nginx -v
nginx version: nginx/1.18.0 (Ubuntu)

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy

Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

I'm going through some old bugs.

I'm also unable to reproduce this. If we could get some more information such as what your /etc/nginx/nginx.conf looks like, that may be helpful in reproduction.

Looking online I see a few different reports which seem similar, where each have differing solutions. For example [0] has a solution of removing old nginx modules. This isn't ideal but could be useful. If this is the case and easily reproducible it should be handled by us in the maintainer scripts. Other similar looking bugs[1] have solutions such as manually linking missing modules.

It's hard to tell exactly what's going on without being able to reproduce it. Therefore, I'm setting the bug to incomplete since it is not easily reproducible and not getting much traction.

Please comment if this bug should be looked into more, and provide information such as your /etc/nginx/nginx.conf.

[0] - https://serverfault.com/questions/909523/nginx-ngx-http-geoip-module-so-error-on-nginx-t
[1] - https://github.com/oerdnj/deb.sury.org/issues/1437

Changed in nginx (Ubuntu Jammy):
status: Expired → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.