-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to run the apache on my Ubuntu gives me following error #515
Comments
Most likely you are trying to read a config file using a relative path, or through a but also check other sections of that documentation, as could also be a permissions issue since code will run as Apache user. |
I have all the code placed in /home/encoded/encoded is my default directory and i am starting apache as root. Whats your suggestion towards to resolve this issue. |
I already told you what the likely problem is and that documentation link explains what you need to do. You are using a relative path to read a file. You cannot do that and expect it to work. The problem code showed by the error traceback is:
The path |
@GrahamDumpleton
|
You have some how mucked up your Apache config file. What is in encoded.conf? Ensure you haven't introduced wrong sort of quotes, or some strange unicode non visible character, eg., strange space. |
Now i am getting encoded.conf
default-ssl.conf
000-default.conf
The above files are my configuration files in /etc/spache2/sites-available. Please guide me |
Since you don't appear to be using Python virtual environments, that error suggests the user Are you setting Using a Python virtual environment with |
path : /etc/apache2/mods-available/wsgi.load |
Then you have a permission issue. What Python versions do you have on your system? What Python version/installation is your mod_wsgi module compiled against? Where is the Python version that mod_wsgi was compiled against located in the file system? Are you using SELinux or AppArmor? |
Installed python 2.7 Fatal Python error: Py_Initialize: Unable to get the locale encoding Fatal Python error: Py_Initialize: Unable to get the locale encoding |
Similar reason. When you have these problems with This is why I asked you those questions, but you didn't really answer them. Can you provide a full answer to each of the questions, otherwise can't really debug it. BTW, why are you using such an ancient Apache and mod_wsgi version. |
Python Version: 2.7 |
That isn't answering the questions fully.
You say Python 2.7, but do you only have the system Python in Is the mod_wsgi the system package? The log you deleted said you had |
I have installed python 2.7 /usr/lib/apache2/modules# ldd mod_wsgi.so |
Your mod_wsgi module is compiled for Python 3.4, not Python 2.7. If you have actually removed Python 3.4, this may be why it is failing. If mod_wsgi is a system package, uninstall it. Then, or otherwise, build mod_wsgi again from fresh source code using Python 2.7, if that is the Python version you want to use. |
For our application we want to use paython 3.4 I have installed mod_wsgi 4.6.5 and configure with Paython 3 Used following commands:
|
We get back to a question I asked before but you didn't answer. Are you using SELinux or AppArmor? The only thing I can suggest now is that SELinux is configured to block Apache from access stuff. Also ensure that you have done a complete stop/start of Apache, not just a reload, because in some case a reload, rather than a restart, will not throw out an older Python shared library loaded into Apache's memory. |
What Python versions do you have on your system? - 2.7 and 3.4 Are you using SELinux or AppArmor? - SELinux |
Did you sort this out, including pursuing whether SELinux was causing the issue as suggested? I would expect it to be more basic than that though, and still somehow mixing mod_wsgi compiled for one Python version with a virtual environment or installation based on a different version. Possibly you have multiple mod_wsgi.so files and have tried to include more than one. Only the first will be used. |
Closing as no further response and assumed information provided was sufficient to solve any issue or gave up. |
I am using python 3.4.3
[Wed Jan 22 09:51:06.124109 2020] [:error] [pid 34690:tid 139875130636160] mod_wsgi (pid=34690): Target WSGI script '/home/encoded/encoded/parts/production-indexer/wsgi' cannot be loaded as Python module.
[Wed Jan 22 09:51:06.124168 2020] [:error] [pid 34690:tid 139875130636160] mod_wsgi (pid=34690): Exception occurred processing WSGI script '/home/encoded/encoded/parts/production-indexer/wsgi'.
[Wed Jan 22 09:51:06.124194 2020] [:error] [pid 34690:tid 139875130636160] Traceback (most recent call last):
[Wed Jan 22 09:51:06.124314 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/parts/production-indexer/wsgi", line 115, in
[Wed Jan 22 09:51:06.124321 2020] [:error] [pid 34690:tid 139875130636160] application = loadapp("config:" + configfile, name="indexer")
[Wed Jan 22 09:51:06.124504 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 247, in loadapp
[Wed Jan 22 09:51:06.124511 2020] [:error] [pid 34690:tid 139875130636160] return loadobj(APP, uri, name=name, **kw)
[Wed Jan 22 09:51:06.124531 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 272, in loadobj
[Wed Jan 22 09:51:06.124553 2020] [:error] [pid 34690:tid 139875130636160] return context.create()
[Wed Jan 22 09:51:06.124570 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 710, in create
[Wed Jan 22 09:51:06.124574 2020] [:error] [pid 34690:tid 139875130636160] return self.object_type.invoke(self)
[Wed Jan 22 09:51:06.124587 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 144, in invoke
[Wed Jan 22 09:51:06.124591 2020] [:error] [pid 34690:tid 139875130636160] **context.local_conf)
[Wed Jan 22 09:51:06.124607 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/util.py", line 55, in fix_call
[Wed Jan 22 09:51:06.124611 2020] [:error] [pid 34690:tid 139875130636160] val = callable(*args, **kw)
[Wed Jan 22 09:51:06.124744 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/develop/snovault/src/snovault/elasticsearch/es_index_listener.py", line 218, in composite
[Wed Jan 22 09:51:06.124750 2020] [:error] [pid 34690:tid 139875130636160] app = loader.get_app(app_name, global_conf=global_conf)
[Wed Jan 22 09:51:06.124769 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 350, in get_app
[Wed Jan 22 09:51:06.124773 2020] [:error] [pid 34690:tid 139875130636160] name=name, global_conf=global_conf).create()
[Wed Jan 22 09:51:06.124786 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 710, in create
[Wed Jan 22 09:51:06.124790 2020] [:error] [pid 34690:tid 139875130636160] return self.object_type.invoke(self)
[Wed Jan 22 09:51:06.124803 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/loadwsgi.py", line 146, in invoke
[Wed Jan 22 09:51:06.124807 2020] [:error] [pid 34690:tid 139875130636160] return fix_call(context.object, context.global_conf, **context.local_conf)
[Wed Jan 22 09:51:06.124829 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/PasteDeploy-1.5.2-py3.4.egg/paste/deploy/util.py", line 55, in fix_call
[Wed Jan 22 09:51:06.124833 2020] [:error] [pid 34690:tid 139875130636160] val = callable(*args, **kw)
[Wed Jan 22 09:51:06.124847 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/src/encoded/init.py", line 217, in main
[Wed Jan 22 09:51:06.124851 2020] [:error] [pid 34690:tid 139875130636160] config.include('snovault')
[Wed Jan 22 09:51:06.124864 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/pyramid-1.6a2-py3.4.egg/pyramid/config/init.py", line 798, in include
[Wed Jan 22 09:51:06.124867 2020] [:error] [pid 34690:tid 139875130636160] c(configurator)
[Wed Jan 22 09:51:06.124947 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/develop/snovault/src/snovault/init.py", line 60, in includeme
[Wed Jan 22 09:51:06.124953 2020] [:error] [pid 34690:tid 139875130636160] config.include('.storage')
[Wed Jan 22 09:51:06.124970 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/pyramid-1.6a2-py3.4.egg/pyramid/config/init.py", line 798, in include
[Wed Jan 22 09:51:06.124973 2020] [:error] [pid 34690:tid 139875130636160] c(configurator)
[Wed Jan 22 09:51:06.125140 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/develop/snovault/src/snovault/storage.py", line 54, in includeme
[Wed Jan 22 09:51:06.125146 2020] [:error] [pid 34690:tid 139875130636160] store_profile_name=registry.settings.get('blob_store_profile_name')
[Wed Jan 22 09:51:06.125164 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/develop/snovault/src/snovault/storage.py", line 303, in init
[Wed Jan 22 09:51:06.125168 2020] [:error] [pid 34690:tid 139875130636160] self.store_conn = boto3.Session(profile_name=store_profile_name).client('s3')
[Wed Jan 22 09:51:06.125307 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/boto3-1.7.30-py3.4.egg/boto3/session.py", line 80, in init
[Wed Jan 22 09:51:06.125313 2020] [:error] [pid 34690:tid 139875130636160] self._setup_loader()
[Wed Jan 22 09:51:06.125329 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/boto3-1.7.30-py3.4.egg/boto3/session.py", line 120, in _setup_loader
[Wed Jan 22 09:51:06.125333 2020] [:error] [pid 34690:tid 139875130636160] self._loader = self._session.get_component('data_loader')
[Wed Jan 22 09:51:06.125528 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/botocore-1.10.30-py3.4.egg/botocore/session.py", line 726, in get_component
[Wed Jan 22 09:51:06.125534 2020] [:error] [pid 34690:tid 139875130636160] return self._components.get_component(name)
[Wed Jan 22 09:51:06.125551 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/botocore-1.10.30-py3.4.egg/botocore/session.py", line 922, in get_component
[Wed Jan 22 09:51:06.125555 2020] [:error] [pid 34690:tid 139875130636160] self._components[name] = factory()
[Wed Jan 22 09:51:06.125568 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/botocore-1.10.30-py3.4.egg/botocore/session.py", line 184, in
[Wed Jan 22 09:51:06.125571 2020] [:error] [pid 34690:tid 139875130636160] lambda: create_loader(self.get_config_variable('data_path')))
[Wed Jan 22 09:51:06.125584 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/botocore-1.10.30-py3.4.egg/botocore/session.py", line 279, in get_config_variable
[Wed Jan 22 09:51:06.125587 2020] [:error] [pid 34690:tid 139875130636160] elif self._found_in_config_file(methods, var_config):
[Wed Jan 22 09:51:06.125599 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/botocore-1.10.30-py3.4.egg/botocore/session.py", line 306, in _found_in_config_file
[Wed Jan 22 09:51:06.125609 2020] [:error] [pid 34690:tid 139875130636160] return var_config[0] in self.get_scoped_config()
[Wed Jan 22 09:51:06.125622 2020] [:error] [pid 34690:tid 139875130636160] File "/home/encoded/encoded/eggs/botocore-1.10.30-py3.4.egg/botocore/session.py", line 383, in get_scoped_config
[Wed Jan 22 09:51:06.125626 2020] [:error] [pid 34690:tid 139875130636160] raise ProfileNotFound(profile=profile_name)
[Wed Jan 22 09:51:06.125640 2020] [:error] [pid 34690:tid 139875130636160] botocore.exceptions.ProfileNotFound: The config profile (encoded-files-upload) could not be found
The text was updated successfully, but these errors were encountered: