nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

[emerg] getpwnam("nginx") failed

Open alkanna opened this issue 6 years ago • 8 comments

Getting this error at nginx start, it breaks websocket support apparently. Need to manually run useradd nginx in the container to fix the issue.

alkanna avatar May 07 '20 14:05 alkanna

So the container starts, even though you saw that error? I'm not seeing it in any of my containers.

Can you mention your docker host operating system?

jc21 avatar May 20 '20 12:05 jc21

Also had this issue. Installed in unraid as a docker service.

/etc/nginx/conf.d/include # nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] getpwnam("nginx") failed
nginx: configuration file /etc/nginx/nginx.conf test failed

Had to run useradd -s /bin/false nginx

jonatino avatar Aug 28 '20 15:08 jonatino

Uninstalled and reinstalled it on Unraid and the same problem happened twice.

It's weird because the control panel loads fine, but none of my proxy hosts worked until I created that user.

jonatino avatar Aug 28 '20 21:08 jonatino

hello, I solved with: useradd -r nginx nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful

dextre1480 avatar Mar 01 '21 08:03 dextre1480

hello, I solved with: useradd -r nginx nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful

This worked for me

ikechukwukalu avatar Nov 03 '21 17:11 ikechukwukalu

thanks @jonatino useradd -s /bin/false nginx its work on me too.

0xzight avatar May 06 '22 10:05 0xzight

solved with run useradd -s /bin/false nginx thanks @jonatino

abuabdirohman4 avatar Jul 11 '22 09:07 abuabdirohman4

alpine use adduser instead useradd

smilad avatar May 23 '23 06:05 smilad