Install issues with Ubuntu 14 and 16
PlanetRylos opened this issue · 6 comments
Hello, I have been trying to get this application up and running for three days and have failed at every corner. I can get the DEV up and running but it is slow and does not deal with multiple users well so I decided to create the production portal. I have never felt like such a failure as I just can't get this working after three straight days of rebuilding from scratch several times looking for any configuration or install issues. It took me only one day to download the tools and create my own Pebble watch face using Python but this is driving me nuts. I am not sure what on earth I am doing wrong.
Some things I have noticed during installation,
-
The uwsgi_params file originally installs in the /home/iso/run folder. I have both changed the path of the nginx fir file to the installed directory and have tried to copy it to the fir/run directory that is owned by www-data. I also changed the ownership of the copied file in the fir/run folder to www-data. Neither seem to make a difference as the nginx error.log shows no errors with either configuration.
-
ALLOWED_HOSTS in production uses single quotes while in base it uses double quotes. I have tried both for each to see if it made a difference.
-
I tried to originally install on Ubuntu 16 but I can't get the fir_uwsgi.service to load properly and fails every time so I abandoned 16 for 14.
-
I am not using the virtual instance of virtualenv env-FIR. Strangely however I am in the DEV. I might try to use this in prod but I was trying to simplify my install. At this point I have nothing to loose.
-
No matter how I install this per the Prod instructions, in the end I get an internal server error. My configurations are as follows:
######## production.py ###########
ALLOWED_HOSTS = ['localhost', '127.0.0.1'] (I have also tried this with just LH or just 127)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'fir',
'USER': 'fir',
'PASSWORD': 'complicatedpassword',
'HOST': '', (I have tried with LH or 127 or nothing at all)
'PORT': '8000', (I have tried with nothing or with a port designation)
}
}
######## base.py ################
ALLOWED_HOSTS = ["localhost", "127.0.0.1"] (I have also tried this with just LH or just 127)
######## fir.conf ###############
description "FIR - Django uWSGI"
start on runlevel [2345]
stop on runlevel [!2345]
setuid www-data
setgid www-data
respawn
exec uwsgi --socket /home/iso/FIR/fir/run/fir.sock --chdir /home/iso/FIR/fir/ --module fir.wsgi
######## fir #################
upstream fir {
server unix:///home/iso/FIR/fir/run/fir.sock;
}
server {
server_name 127.0.0.1; (i have also tried localhost)
location / {
uwsgi_pass fir;
include /home/iso/FIR/fir/run/uwsgi_params;
}
location /static/ {
alias /home/iso/FIR/fir/static/;
}
}
Hi,
Can you explain the difference between dev and prod for you ? What do you mean by slow ?
Ubuntu 16 uses SystemD and not upstart this is why the upstart scripts don't work on ubuntu 16. You'll have to write your own systemD script to use it. We don't provide such script at this date.
Can you provide detailed errors you have in production (see logs) to see if we can help you ?
Thanks
Thanks for the response.
DEV seems to have loading issues for any user that did not originate the content; the data just spins and spins and never loads. The users can find the info under OLD only, even if an incident was just created. It was enough of an issue that I figured Prod would be a more robust solution as it incorporates an actual backend database. I also could not get DEV to load in a browser outside of the box it was installed on which makes it useless in our environment. I'm sure there is a way to do it, I just got frustrated with other issues so I jumped ship for prod.
I can not seem to find any errors in the logs. Everything looks fine which is frustrating trying to track the issue. My best guess is that there is a path issue somewhere. I will dig up the logs and add them here asap.
When you start the webserver in dev using ./manage.py runserver and access localhost:8000 in your browser do you see any error message in the shell ?
SO I am a giant idiot. I had a feeling that the uWSGI server was not starting properly. I now have the server running but my logins are not working. The fir or the superuser I created is not working. It least I have something to go on now. Thanks for pointing me in the right direction. My toddler is keeping me from getting more work done on this right now but I will revisit this later today.
I will update you once I have time to play with this.
Thanks!
Ok I close this issue. Please check that you followed correctly the documentation.
If you have any error message don't hesitate to create another issue.
Thx
Will do. Thanks.