title: Unable to start .net core API service in CentOS using NGINX and couldn't debug the error
body: <p>We are trying to run a .net core API service on linux based Cent OS using nginx server. But we ended up failing to start the application. Initially it says the respective application started but later it failed with unknown reasons. and we couldn't debug the exact root cause which lead to this error.</p>
  <p>Below are the steps and commands we used to run the service.</p>
  <p>This is the path where we created application service
  /etc/systemd/system/DSAutoWebAPI.service</p>
  <p><strong>DSAutoWebAPI.serivce configurtion</strong></p>
  <pre><code>[Unit]  
      Description=DS Auto API test application
  
      [Service]
      WorkingDirectory=/APP/publish
      ExecStart=/bin/bash /APP/publish/DSAutoWebAPI.dll
      Restart=always
      RestartSec=10 # Restart service after 10 seconds if dotnet service crashes
      SyslogIdentifier=dotnet-demo
      User=nginx
      Environment=ASPNETCORE_ENVIRONMENT=Production
  
      [Install]
      WantedBy=multi-user.target
  </code></pre>
  <p><strong>Commands used to run the application</strong></p>
  <pre><code>sudo systemctl start DSAutoWebAPI  
  systemctl daemon-reload  
  sudo systemctl status DSAutoWebAPI
  </code></pre>
  <p><strong>Error Log</strong></p>
  <pre><code>[root@machine-name system]# sudo journalctl -fu DSAutoWebAPI.service  
  -- Logs begin at Mon 2021-09-06 14:24:33 EDT. --  
  Oct 01 02:56:52 machine-name systemd[1]: Started DS Auto API test application.  
  Oct 01 02:56:52 machine-name systemd[1]: DSAutoWebAPI.service: main process exited, code=exited, status=126/n/a  
  Oct 01 02:56:52 machine-name systemd[1]: Unit DSAutoWebAPI.service entered failed state.  
  Oct 01 02:56:52 machine-name systemd[1]: DSAutoWebAPI.service failed.  
  Oct 01 02:56:52 machine-name systemd[1]: DSAutoWebAPI.service holdoff time over, scheduling restart.  
  Oct 01 02:56:52 machine-name systemd[1]: Stopped DS Auto API test application.  
  Oct 01 02:56:52 machine-name systemd[1]: start request repeated too quickly for DSAutoWebAPI.service  
  Oct 01 02:56:52 machine-name systemd[1]: Failed to start DS Auto API test application.  
  Oct 01 02:56:52 machine-name systemd[1]: Unit DSAutoWebAPI.service entered failed state.  
  Oct 01 02:56:52 machine-name systemd[1]: DSAutoWebAPI.service failed.  
  </code></pre>