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

After migrating from linuxserver, ghcr.io/netbootxyz/netbootxyz:0.7.1-nbxyz1 doesn't seem to work #60

Open
halkeye opened this issue Mar 30, 2024 · 3 comments

Comments

@halkeye
Copy link

halkeye commented Mar 30, 2024

$ supervisorctl status
unix:///run/supervisord.sock no such file

Would recommend adding file=/run/supervisord.sock or moving your customizations to /etc/supervisor.d/container.ini or something, so it picks up defaults so status can work

Eventually i found /supervisord.log

2024-03-30 17:54:44,375 INFO Set uid to user 0 succeeded
2024-03-30 17:54:44,392 INFO supervisord started with pid 14
2024-03-30 17:54:45,395 INFO spawned: 'syslog-ng' with pid 15
2024-03-30 17:54:45,396 INFO spawned: 'nginx' with pid 16
2024-03-30 17:54:45,398 INFO spawned: 'webapp' with pid 17
2024-03-30 17:54:45,399 INFO spawned: 'in.tftpd' with pid 18
2024-03-30 17:54:45,401 INFO spawned: 'messages-log' with pid 19
2024-03-30 17:54:45,444 WARN exited: messages-log (exit status 1; not expected)
2024-03-30 17:54:45,450 WARN exited: nginx (exit status 1; not expected)
2024-03-30 17:54:46,452 INFO success: syslog-ng entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-03-30 17:54:46,453 INFO spawned: 'nginx' with pid 28
2024-03-30 17:54:46,453 INFO success: webapp entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-03-30 17:54:46,453 INFO success: in.tftpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-03-30 17:54:46,455 INFO spawned: 'messages-log' with pid 29
2024-03-30 17:54:46,477 WARN exited: nginx (exit status 1; not expected)
2024-03-30 17:54:47,528 INFO success: messages-log entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-03-30 17:54:48,531 INFO spawned: 'nginx' with pid 30
2024-03-30 17:54:48,549 WARN exited: nginx (exit status 1; not expected)
2024-03-30 17:54:49,550 INFO gave up: nginx entered FATAL state, too many start retries too quickly
2024-03-30 18:06:11,755 INFO Set uid to user 0 succeeded
2024-03-30 18:06:11,776 INFO supervisord started with pid 14
2024-03-30 18:06:12,778 INFO spawned: 'syslog-ng' with pid 15
2024-03-30 18:06:12,780 INFO spawned: 'nginx' with pid 16
2024-03-30 18:06:12,781 INFO spawned: 'webapp' with pid 17
2024-03-30 18:06:12,783 INFO spawned: 'in.tftpd' with pid 18
2024-03-30 18:06:12,784 INFO spawned: 'messages-log' with pid 19
2024-03-30 18:06:12,814 WARN exited: nginx (exit status 1; not expected)
2024-03-30 18:06:13,827 INFO success: syslog-ng entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-03-30 18:06:13,828 INFO spawned: 'nginx' with pid 28
2024-03-30 18:06:13,829 INFO success: webapp entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-03-30 18:06:13,829 INFO success: in.tftpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-03-30 18:06:13,829 INFO success: messages-log entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-03-30 18:06:13,845 WARN exited: nginx (exit status 1; not expected)
2024-03-30 18:06:15,848 INFO spawned: 'nginx' with pid 29
2024-03-30 18:06:15,865 WARN exited: nginx (exit status 1; not expected)
2024-03-30 18:06:16,866 INFO gave up: nginx entered FATAL state, too many start retries too quickly

So would recommend running nginx in foreground mode, with supervisor logging to stdout which will help people in the future

netbootxyz:/# cat /var/log/nginx/error.log
2024/03/30 17:54:45 [emerg] 16#16: getpwnam("abc") failed in /config/nginx/nginx.conf:1
2024/03/30 17:54:46 [emerg] 28#28: getpwnam("abc") failed in /config/nginx/nginx.conf:1
2024/03/30 17:54:48 [emerg] 30#30: getpwnam("abc") failed in /config/nginx/nginx.conf:1
2024/03/30 18:06:12 [emerg] 16#16: getpwnam("abc") failed in /config/nginx/nginx.conf:1
2024/03/30 18:06:13 [emerg] 28#28: getpwnam("abc") failed in /config/nginx/nginx.conf:1
2024/03/30 18:06:15 [emerg] 29#29: getpwnam("abc") failed in /config/nginx/nginx.conf:1

This is where i started to get confused. Looks like user doesn't match users in passwd

netbootxyz:/# getent passwd | tail -n 2
nginx:x:100:101:nginx:/var/lib/nginx:/sbin/nologin
nbxyz:x:911:1001::/config:/bin/false

okay, so it should be nbxyz not abc

cat /config/nginx/nginx.conf
user abc;
worker_processes 4;
pid /run/nginx.pid;
include /etc/nginx/modules/*.conf;

events {
        worker_connections 768;
}

http {
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        client_max_body_size 0;
        include /etc/nginx/mime.types;
        default_type application/octet-stream;
        access_log /config/log/nginx/access.log;
        error_log /config/log/nginx/error.log;
        gzip on;
        gzip_disable "msie6";
        include /config/nginx/site-confs/*;

}
daemon off;

That doesn't seem to match https://github.com/netbootxyz/docker-netbootxyz/blob/master/root/defaults/nginx.conf, which was committed 3 years ago.

I checked the dockerhub version

@halkeye
Copy link
Author

halkeye commented Mar 30, 2024

okay, so there's 4 nginx files

netbootxyz:/# find -name nginx.conf
./etc/nginx/nginx.conf
./app/root/defaults/nginx.conf <-- i think this is the right one
./config/nginx/nginx.conf
./defaults/nginx.conf

@halkeye
Copy link
Author

halkeye commented Mar 30, 2024

oh! my /config came from my old linuxserver install, I didn't realize it had nginx configs in it, and that the container copied them over if they didn't exist. Is there expectation that people want to modify them?

@halkeye
Copy link
Author

halkeye commented Mar 30, 2024

Okay, I guess this issue can be closed, it does work, just confusing that /config/nginx needed to be deleted and reset

@halkeye halkeye changed the title ghcr.io/netbootxyz/netbootxyz:0.7.1-nbxyz1 doesn't seem to work After migrating from linuxserver, ghcr.io/netbootxyz/netbootxyz:0.7.1-nbxyz1 doesn't seem to work Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant