← Back to team overview

graphite-dev team mailing list archive

Re: [Question #662391]: Target WSGI script '/opt/graphite/conf/graphite.wsgi' cannot be loaded as Python module

 

Question #662391 on Graphite changed:
https://answers.launchpad.net/graphite/+question/662391

    Status: Needs information => Open

jgoldsmithuo gave more information on the question:
Hi @Denis @Piotr, thank you for the responses to this, much appreciated.
I take onboard both your comments and agree. I'm from a sysadmin
background, more than dev, and been through so many installs over time
as I'm sure we all have. @Denis, yes you're right some additional info
on Centos/Redhat type installs would definitely benefit many admin guys.
They are the type of guys who normally get asked to setup PoC
environments to demo, and my experience is many companies as far as
linux platforms go, mainly use Centos or Redhat. Ubuntu is what I would
use at home to try our stuff.   I understand your views on rpm/repos for
centos/redhat, I agree with you it definitely is a minefield.

The good news it's working now, the bad news is I don't really know what
fixed it.  @Denis I followed yor  series of steps and it was still
coming up with the same error, but you're both right it's some kind of
mismatch in versions, and also both right again, this is where the bulk
of many install issues arise.  One thing I did not do from your steps
the first time around  is this command:

PYTHONPATH=/opt/graphite/webapp django-admin.py collect-static \        (no minus in collectstatic)
      --noinput --settings=graphite.settings

I rebooted.

I remove the mod_wsgi and installed it again,  yum erase, then install,
I also installed a pip install mod_wsgi

I tried the apachectl start, it gave me this error: [Sun Dec 31
08:14:31.748199 2017] [so:warn] [pid 5801] AH01574: module wsgi_module
is already loaded, skipping

so I commented out this in the vhosts file.
#<IfModule !wsgi_module.c>
#    LoadModule wsgi_module modules/mod_wsgi.so
#</IfModule>


I also had to change the vhosts file to allow /opt/graphite/ permissions from that level, otherwise it was coming up with client permission for various files.
AH01630: client denied by server configuration: /opt/graphite/static/js/composer_widgets.js, referer: http://x/composer?   this was even tho all files under /opt/graphite were chown -R apache:apache,  the default setting in vhosts example file /opt/graphite/conf/  does not seem to be enough permissions

@Piotr,  I have not used readthedocs format docs many times, from the
main graphiteapp site there's a install link on the top right, if you
click that I assumed that was generic install procedure for all
versions, then right at the bottom, I saw the little drop down, where
you can pick your version. I'll know for next time. I think also your
0.9.16 would have worked fine, for some reason it's in built thing that
I must get on the latest version, which is why I went down the pip
install route.

@Piotr, @Denis, thank you for the assistance. When I build this out for
prod, I will definitely look at making any needed mods via PR's.

-- 
You received this question notification because your team graphite-dev
is an answer contact for Graphite.