kukuciao
Intern
Intern
  • UID8275
  • Fans0
  • Follows0
  • Posts2
Reads:18298Replies:3

Deployment Django on Simple appplication server

Created#
More Posted time:Nov 15, 2019 11:02 AM
Hi
I'm very new in using django on SAS, I been having problem finding solution or guide for my predictment, I was able to set Django following the community guide https://www.alibabacloud.com/blog/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04_594319?spm=a2c5t.11065253.1996646101.searchclickresult.2bcb5ec8VXDHtq


but when deploy, the server display timeout. can some one point out any other resources or guide?


Thank you

afzaalvirgoboy
Assistant Engineer
Assistant Engineer
  • UID6091
  • Fans0
  • Follows0
  • Posts41
1st Reply#
Posted time:Nov 17, 2019 5:13 AM
Hi,


What sort of time do you see? If this is a network time out, then I guess the problem is with the network, make sure you can access the endpoints.


One more thing, please try to access the hosted resource from within the VM itself, sometimes the service is down inside the VM too. Please try these and let me know what you get.

kukuciao
Intern
Intern
  • UID8275
  • Fans0
  • Follows0
  • Posts2
2nd Reply#
Posted time:Nov 17, 2019 12:46 PM
Hi afzaalvirgoboy,
I getting 502 Gateway error, If I type my public ip address following by port number (8000) the issue is connection time out. I need a way to debug what causing the issue. as for access hosted resources does it mean access through FTP or VNC?


I appreciate your time


Thanks

afzaalvirgoboy
Assistant Engineer
Assistant Engineer
  • UID6091
  • Fans0
  • Follows0
  • Posts41
3rd Reply#
Posted time:Nov 22, 2019 17:50 PM
Hi,


Well, I understand there can be several problems for this gateway issue as well as the timeout (which might just mean that the port 8000 is not listening for any traffic).


What I meant to ask was, login to the SAS server (using RDP, SSH or Rescue Connect), and then access the app within the VM for SAS service. You mentioned that you followed an article that needs to execute some commands to install and configure services; that is why I am assuming that you have access to the terminal.


One of the tools that can be used to send a request and load a page on the VM is "lynx", it is a terminal-based web browser. Try downloading this, and access the service using the localhost and the port number to see if that works.


Here is one of my articles that would help you in understanding how to host and debug the services on SAS; https://dev.to/afzaalahmadzeeshan/how-to-host-a-node-js-web-app-on-ubuntu-18-04-using-alibaba-cloud-simple-application-server-43hm.
Guest