Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coredump if port 443 is occupied by another process ( Almalinux 9 ) #1363

Open
phpclub opened this issue Jul 19, 2024 · 4 comments
Open

Coredump if port 443 is occupied by another process ( Almalinux 9 ) #1363

phpclub opened this issue Jul 19, 2024 · 4 comments
Labels
T-Defect Bugs, crashes, hangs, and other problems X-Needs-Info Blocked until the reporter provides further information

Comments

@phpclub
Copy link

phpclub commented Jul 19, 2024

Coredump if port 443 is busy another process

unitd --version
unit version: 1.32.1
configured as ./configure --prefix=/usr --statedir=/var/lib/unit --control=unix:/var/run/unit/control.sock --runstatedir=/var/run --pid=/var/run/unit/unit.pid --logdir=/var/log --log=/var/log/unit/unit.log --tmpdir=/var/tmp --user=unit --group=unit --tests --openssl --njs --modulesdir=/usr/lib64/unit/modules --libdir=/usr/lib64 --cc-opt='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC' --ld-opt='-Wl,-z,relro -Wl,-z,now -pie'

2024/07/19 08:42:01 [alert] 16509#16511 *40 SSL_do_handshake(18) failed (258: unsupported protocol) (OpenSSL: error:0A000102:SSL routines::unsupported protoco
l)
2024/07/19 08:42:02 [alert] 16509#16511 *41 SSL_do_handshake(18) failed (396: version too low) (OpenSSL: error:0A00018C:SSL routines::version too low)
2024/07/19 09:32:51 [notice] 11531#11531 process 16509 exited with code 0
2024/07/19 09:32:51 [notice] 11531#11531 process 11533 exited with code 0
2024/07/19 09:34:39 [info] 796#796 discovery started
2024/07/19 09:34:39 [notice] 796#796 module: php 8.0.27 "/usr/lib64/unit/modules/php.unit.so"
2024/07/19 09:34:39 [info] 795#795 controller started
2024/07/19 09:34:39 [notice] 795#795 process 796 exited with code 0
2024/07/19 09:34:39 [info] 798#798 router started
2024/07/19 09:34:39 [info] 798#798 OpenSSL 3.0.7 1 Nov 2022, 30000070
2024/07/19 09:34:39 [alert] 795#795 bind("0.0.0.0:443") failed (98: Address already in use)
2024/07/19 09:34:39 [alert] 798#798 failed to apply new conf
2024/07/19 09:34:39 [alert] 797#797 failed to apply previous configuration
2024/07/19 09:34:39 [alert] 795#795 process 797 exited on signal 11 (core dumped)
2024/07/19 09:34:39 [info] 795#795 controller started
2024/07/19 09:34:39 [alert] 795#795 bind("0.0.0.0:443") failed (98: Address already in use)
2024/07/19 09:34:39 [alert] 798#798 failed to apply new conf
2024/07/19 09:34:39 [alert] 804#804 failed to apply previous configuration
2024/07/19 09:34:39 [alert] 795#795 process 804 exited on signal 11 (core dumped)
2024/07/19 09:34:39 [info] 795#795 controller started
2024/07/19 09:34:39 [alert] 795#795 bind("0.0.0.0:443") failed (98: Address already in use)
2024/07/19 09:34:39 [alert] 798#798 failed to apply new conf
2024/07/19 09:34:39 [alert] 810#810 failed to apply previous configuration
2024/07/19 09:34:39 [alert] 795#795 process 810 exited on signal 11 (core dumped)
2024/07/19 09:34:39 [info] 795#795 controller started
2024/07/19 09:34:39 [alert] 795#795 bind("0.0.0.0:443") failed (98: Address already in use)
2024/07/19 09:34:39 [alert] 798#798 failed to apply new conf
2024/07/19 09:34:39 [alert] 816#816 failed to apply previous configuration

@ac000
Copy link
Member

ac000 commented Jul 25, 2024

Can't reproduce here...

{
    "listeners": {
        "[::]:80": {
            "pass": "routes"
        },
        "[::]:443": {
            "pass": "routes",
            "tls": {
                "certificate": "bundle"
            }
        }
     },

    "routes": [
        {
            "action": {
                "share": "/srv/unit$uri"
            }
        }
    ]
}
2024/07/25 15:57:12 [info] 12590#12590 discovery started
2024/07/25 15:57:12 [info] 12589#12589 controller started
2024/07/25 15:57:12 [info] 12592#12592 router started
2024/07/25 15:57:12 [info] 12592#12592 OpenSSL 3.2.1 30 Jan 2024, 30200010
2024/07/25 15:57:12 [notice] 12589#12589 process 12590 exited with code 0
2024/07/25 15:57:12 [alert] 12589#12589 bind(\"[::]:443\") failed (98: Address already in use)
2024/07/25 15:57:12 [alert] 12592#12592 failed to apply new conf
2024/07/25 15:57:12 [alert] 12591#12591 failed to apply previous configuration

Could you provide your Unit config and a clean unit log from when you start unit?

I'm curious what's generating these mesaages

2024/07/19 08:42:01 [alert] 16509#16511 *40 SSL_do_handshake(18) failed (258: unsupported protocol) (OpenSSL: error:0A000102:SSL routines::unsupported protoco
l)
2024/07/19 08:42:02 [alert] 16509#16511 *41 SSL_do_handshake(18) failed (396: version too low) (OpenSSL: error:0A00018C:SSL routines::version too low)

@lcrilly
Copy link
Contributor

lcrilly commented Jul 25, 2024

I'm curious what's generating these messages

The *40 and *41 entries look suspiciously like the connection ID value in a github.com/nginx/nginx error log.

Makes me wonder if this is the stderr dump from a Docker container with both nginx and unit installed and running???

@phpclub
Copy link
Author

phpclub commented Aug 1, 2024

There was an application running acme-dns that listened to port 443. The bug is that unit should not crash but exit with an error in this case.
https://github.com/kohanaworld/acme-dns

@ac000
Copy link
Member

ac000 commented Aug 1, 2024

There was an application running acme-dns that listened to port 443. The bug is that unit should not crash but exit with

Correct, Unit shouldn't crash, but I was unable to reproduce this.

If you can get a backtrace from a core dump that may help... or at the very least a clean log from starting Unit and it crashing, with nothing else going on like those other messages that appeared.

@callahad callahad added T-Defect Bugs, crashes, hangs, and other problems X-Needs-Info Blocked until the reporter provides further information labels Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect Bugs, crashes, hangs, and other problems X-Needs-Info Blocked until the reporter provides further information
Projects
None yet
Development

No branches or pull requests

4 participants