virtkick / http-master

versatile front end http service with reverse proxy
MIT License
139 stars 17 forks source link

http-master crashes if ssl directory contains files it can't read #118

Closed mateuszkwiatkowski closed 8 years ago

mateuszkwiatkowski commented 8 years ago

I uploaded new SSL certificate to SSL directory but forgot about proper files permissions. We monitor SSL directory with inotifywatch(1) and http-master was restarted automatically. Unfortunatelly it crashed because of missing read permission:

Jan 07 08:00:22 localhost http-proxy[19782]: /opt/http-proxy/src/node_modules/http-master/src/certScanner.js:195
Jan 07 08:00:22 localhost http-proxy[19782]: if(statData.isDirectory()) {
Jan 07 08:00:22 localhost http-proxy[19782]: ^
Jan 07 08:00:22 localhost http-proxy[19782]: TypeError: Cannot read property 'isDirectory' of undefined
Jan 07 08:00:22 localhost http-proxy[19782]: at /opt/http-proxy/src/node_modules/http-master/src/certScanner.js:195:26
Jan 07 08:00:22 localhost http-proxy[19782]: at FSReqWrap.oncomplete (fs.js:82:15)