After installing the newly released DSM 6.0 beta for Synology NAS, I was unable to reach the DSM again. My Chrome browser showed “Connection refused”. Not really a good start for beta testing new software. 
Luckily SSH is still up. Since DSM running on nginx, it’s straightforward to look for some error log in the nginx error log.
|
$ cat /var/log/nginx/error.log |
shows following log records
|
2015/10/14 21:08:31 [emerg] 9040#9040: PEM_read_bio_X509_AUX("/usr/syno/etc/ssl/ssl.chain.crt/server.crt") failed (SSL: error:0906D066:PEM routines:PEM_read_bio:bad end line) |
in the file /usr/syno/etc/ssl/ssl.chain.crt/server.crt
I found a weird certificate formatting
|
... ImqVevbi0ntIdiu3OBL0NuuHNw7N1kKkXTBIZnswp3mxOVSqDrEchULLW8fyawVX lBOEu1QErxKSjwvlkQ== -----END CERTIFICATE----------BEGIN CERTIFICATE----- MIIF2TCCA8GgAwIBAgIHFxU9nqs/vzANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQG ... |
There’s a missing newline between the chained certificate. Put a new line between the certificate and restart nginx.
|
... ImqVevbi0ntIdiu3OBL0NuuHNw7N1kKkXTBIZnswp3mxOVSqDrEchULLW8fyawVX lBOEu1QErxKSjwvlkQ== -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIIF2TCCA8GgAwIBAgIHFxU9nqs/vzANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQG ... |
and restart nginx
|
$ synoservicecfg --restart nginx |
Tadaaaa… DSM is available again.