﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
2280	"nginx: [emerg] mkdir() ""/var/tmp/nginx/body"" failed (2: No such file or directory)"	delleceste@…		"After configuring and building nginx 1.21.1 with the following configure options:

./configure --prefix=/usr/local/nginx-1.21.1 --conf-path=/etc/nginx --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-log-path=/var/log/nginx/http.log --http-client-body-temp-path=/var/tmp/nginx/body --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi --http-scgi-temp-path=/var/tmp/nginx/scgi --add-dynamic-module=/home/giacomo/devel/nchan --with-http_ssl_module --with-debug

=================================================================

$ cat /etc/systemd/system/nginx.service

[Unit]
Description=The NGINX HTTP and reverse proxy server
After=syslog.target network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target

[Service]
Type=forking
PIDFile=/usr/local/nginx/logs/nginx.pid
ExecStart=/usr/local/nginx-1.21.1/sbin/nginx -c /etc/nginx/nginx.conf
ExecReload=/usr/local/nginx-1.21.1/sbin/nginx -s reload
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true

[Install]
WantedBy=multi-user.target

===================== end .service ======================

$ sudo systemctl start nginx

[giacomo@woody nginx-1.21.4]$ sudo systemctl status nginx
× nginx.service - The NGINX HTTP and reverse proxy server
     Loaded: loaded (/etc/systemd/system/nginx.service; disabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Thu 2021-11-11 14:43:28 CET; 1s ago
    Process: 25072 ExecStart=/usr/local/nginx-1.21.1/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)
        CPU: 15ms

Nov 11 14:43:28 woody systemd[1]: Starting The NGINX HTTP and reverse proxy server...
Nov 11 14:43:28 woody nginx[25072]: nginx: [warn] could not build optimal types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucke>
Nov 11 14:43:28 woody nginx[25072]: nginx: [emerg] mkdir() ""/var/tmp/nginx/body"" failed (2: No such file or directory)
Nov 11 14:43:28 woody systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Nov 11 14:43:28 woody systemd[1]: nginx.service: Failed with result 'exit-code'.
Nov 11 14:43:28 woody systemd[1]: Failed to start The NGINX HTTP and reverse proxy server.


====>   nginx: [emerg] mkdir() ""/var/tmp/nginx/body"" failed (2: No such file or directory)

====>    sudo mkdir -p /var/tmp/nginx/body   [ OK ]

$ sudo systemctl start nginx    [ fails with the same error ]

a) setting /var/tmp/nginx/body   world readable writable executable: same error
b) removing  /var/tmp/nginx/body (leaving only)  /var/tmp/nginx/: same error

This blocks our development, forcing us to install nginx under /opt

Thanks.

"	defect	closed	major		documentation	1.19.x	invalid			"Linux woody 5.14.16-arch1-1 #1 SMP PREEMPT Tue, 02 Nov 2021 22:22:59 +0000 x86_64 GNU/Linux
Arch Linux"	"nginx version: nginx/1.21.4
built by gcc 11.1.0 (GCC) 
built with OpenSSL 1.1.1l  24 Aug 2021
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx-1.21.1 --conf-path=/etc/nginx --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-log-path=/var/log/nginx/http.log --http-client-body-temp-path=/var/tmp/nginx/body --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi --http-scgi-temp-path=/var/tmp/nginx/scgi --add-dynamic-module=/home/giacomo/devel/nchan --with-http_ssl_module --with-debug
"
