NGINX fails to ask for PEM password on start

Build

  • Ubuntu 16
  • nginx version: nginx/1.10.0 (Ubuntu)

Problem
Amongst the common commands you will find online to start Nginx are:

Using a service
sudo systemctl restart nginx

Call the binary directly (assuming it located in /etc/init.d/) with start/stop/restart
/etc/init.d/nginx start

Even if you specify the configuration file using the -c option, it always throws an error.

However, it appears (for me) that neither of these options prompt a user for their PEM password if they have configured SSL or TLS certificates.

Solution
After a lot of digging you will find that calling the script directly without (start/stop/restart) prompts the user for the PEM password.
/etc/init.d/nginx

References
https://forum.nginx.org/read.php?2,262900,262900

Glassfish Error – java.lang.ClassCastException: org.glassfish.grizzly.config.ContextRootInfo cannot be cast to org.apache.catalina.Context

This error appeared for me because I set a default web module previously to a different enterprise application archive (ear) project while trying to run a new one in the development environment.

The solution for me was to empty the Default Web Module field shown below and restart the server. After you do that you can deploy your application successfully.

Glassfish Configuration