Closed ghost closed 9 years ago
@Tintinabula Looking at the error message and the source code of File::Path which is reporting the error, it seems like that:
/storage/builds/h2o
/storage/builds/h2o
is not accessible by the running user of H2O (e.g. the user set by user
)Are these assumptions correct? If that is the case, please either change the current working directory to somewhere else (that is accessible by the running user), or change the permissions of the directory so that it becomes accessible by the running user.
EDIT: The relevant parts of File::Path is File/Path.pm line 218 and line 249. In line 218 the library is calling getcwd
that returns /storage/builds/h2o
, and in line 248 it is failing to obtain the information of the directory by lstat
.
@kazuho , this ticket can be closed. I understand now.
The assumptions were correct. H2O is built on the development machines and the compiled code is moved to the production machines in /storage/builds/h2o . The /storage/builds/h2o directory is owned by root with 700 permission. After running "make install", the H2O daemon is started and /storage/builds/h2o is still in the directory tree, but not readable by the H2O daemon user. The root only permissions caused the "cannot stat initial working directory" error.
The fix in our situation is to install the H2O binary and tools and remove the source build directory, /storage/builds/h2o . H2O starts without issue and the OCSP tools does not report any errors.
starting new worker 86222
[INFO] raised RLIMIT_NOFILE to 203904
h2o server (pid:86222) is ready to serve requests
fetch-ocsp-response (using OpenSSL 1.0.1l-freebsd 15 Jan 2015)
sending OCSP request to http://ocsp.comodoca.com
/ssl_keys/example.org_ssl.crt: good
This Update: Apr 13 04:10:41 2015 GMT
Next Update: Apr 17 04:10:41 2015 GMT
verifying the response signature
verify OK (used: -VAfile /tmp/8SKZXrZikR/issuer.crt)
[OCSP Stapling] successfully updated the response for certificate file:/ssl_keys/example.org_ssl.crt
fetch-ocsp-response (using OpenSSL 1.0.1l-freebsd 15 Jan 2015)
sending OCSP request to http://ocsp.comodoca.com
/ssl_keys/example.org_ssl.crt: good
This Update: Apr 14 14:04:04 2015 GMT
Next Update: Apr 18 14:04:04 2015 GMT
verifying the response signature
verify OK (used: -VAfile /tmp/qN7EK1lxlO/issuer.crt)
[OCSP Stapling] successfully updated the response for certificate file:/ssl_keys/example.org_ssl.crt
:+1:
We build H2O on a source development machine and move the binaries to a production test machine. Since the source build directory is not on the production test boxes the OCSP script prints a "cannot stat initial working directory" error. Using /tmp or /var/tmp as a working directory would alleviate this error.