Forums

DNS issues and 502 - loadbalancer problems

I'm getting some unusual errors at the moment. I can't restart my server as I get this error when I click reload:

Sorry, there was a problem. You many need to check your DNS setup. If it keeps happening, please send us feedback.

And the main site is giving 502-loadbalancer and 504-timeout errors.

Never mind back now.

We had a short outage on one of our webservers last night, it should have lasted less than 5 minutes. Thanks for confirming it all came back OK!

I am still facing this error

You're facing the error because you've specified Python 3.4 for your webapp and you're running it from a Python 2.7 virtualenv.

But I haven't installed python in virtualenv. And I haven't specified anything in virtualenv.

Your webapp specifies a virtualenv and that virtualenv is for Python 2.7. Your webapp also specifies that it's a Python 3.4 webapp. The disagreement is why your webapp is not starting.

Can I change the web app version to 2.7? Because when I am creating web app using manual configuration it doesn't ask for the version of python and directly use 3.4. Let me know how I can resolve it.

OK, I've set it to Python 2.7. It should be OK now.

Now I'm having this problem http://i60.tinypic.com/14pmia.png

Looks like you have the wrong version of Django installed in your virtualenv.

So what should I do? Which version I need to install it over there?

do you know what version the webapp source code that you wrote is supposed to run on? you should install that version...

I have did the same. So why it is giving me this error? I don't guess this is a version error.

Hi maharshi, are you sure you are getting a dns error? After reloading your webapp I see an import error instead.

Yes, now after solving by glenn it has sorted out the dns error but started with import error.

if you look at the error message it tells you the exact line and file that is error-ing.

Hey Conrad, I have got the exact line but it is having only import error. It is working fine with the same thing in my localhost

aha- this is because your webapp is run with the current working directory being your homedir. You have a folder with the same name also called skigit in your homdir, which doesn't have views.py etc in it.

But I made a web app named as skigit and then put down my files over there, can you please share the what solution I can do? The code is working completely fine in localhost.

the problem you're facing is because you have two folders called "skigit", which are both on the sys.path, so Python is loading the wrong one.

/home/maharshi/skigit
/home/maharshi/mysite/skigit

the one you want is the second one (I assume). So your should delete or rename the first one.

Done with that but now it is giving error for allauth. I have checked there is directory and file as well

Have you installed django-allauth into your virtualenv?