I have downloaded mod_jk-1.2.28-httpd-2.2.X.so for Apache 2.2 running on CentOS, and set up as per http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html. When I try to start httpd it fails with the following error:
"Starting httpd: httpd: Syntax error on line 993 of /etc/httpd/conf/httpd.conf: Syntax error on line 2 of /opt/apache-tomcat-6.0.26/conf/jk/mod_jk.conf-auto: Cannot load /etc/httpd/modules/mod_jk-1.2.28-httpd-2.2.X.so into server: /etc/httpd/modules/mod_jk-1.2.28-httpd-2.2.X.so: wrong ELF class: ELFCLASS32"
Does that mean that mod_jk-1.2.28-httpd-2.2.X.so has not been properly compiled?. What can I do about that?
Thanks
Peter
It means that you have a 32-bit module, but are not running a 32-bit httpd. Install the proper gcc package from the repositories and rebuild the module.
To fix, I installed the Tomcat Connector using yum:
yum search mod_jk
mod_jk-ap20.x86_64 : Tomcat mod_jk connector for Apache 2.0.x
mod_jk-ap22.x86_64 : Tomcat mod_jk connector for Apache 2.x
yum install mod_jk
Related
I have a flask app that used to run with python3.5 on apache2.
I am now trying to change it to run on 3.6 (i have sone type hinting in my code that is only supported on 3.6).
I have installed the module for python3.6, but when tried to restart apache and run my app, it fails.
When running
mod_wsgi-express module-location
I have the python3.5 version
/usr/local/lib/python3.5/dist-packages/mod_wsgi/server/mod_wsgi-py35.cpython-35m-x86_64-linux-gnu.so
The same file also existis on my server in python3.6 dir.
I also changed my $PATH to run python3.6 as a default for python.
How can I tell apache to run on python3.6 and not on 3.5?
WOHA! It's working!
I uninstalled the mod_wsgi (sudo apt get remove libapache2-mod-wsgi).
Then, Installed the module via pip specifically to python3.6 (python3.6 -m pip install mod_wsgi), but at this point the apache still ran python3.5.I added to the apache configuration file (in ubunutu 16.4 the file is located at: /etc/apache2/apache2.conf and /usr/local/lib64/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so for RHEL/CentOS 7) the followings:
LoadModule wsgi_module "/usr/local/lib/python3.6/dist-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so"
and
WSGIPythonHome "/usr" and that did the trick.
I weeped a lot of tears over this issue, finding the apache2.conf file etc, so hopefully this will be helpful to anyone.
The LoadModule solution worked for me. However, I found it easiest to first ensure
a2dismod wsgi as provided by the default apache2 module. I spent 3 days looking at various solutions and answers and reviewing Graham's WSGI guide.
What I did in my case is was to remove python 3.6 from Django env and re-install python 3.5 and it worked.
I am trying to install CKAN from package on ubuntu 14.04 using the latest docs.
So while setting up solr when I execute the command:
sudo service jetty restart
I get this on my terminal:
* Starting Jetty servlet engine. jetty
* /var/run/jetty.pid exists, but jetty was not running. Ignoring /var/run/jetty.pid
/etc/init.d/jetty: 274: /etc/init.d/jetty: /usr/sbin/rotatelogs: not found
* Jetty servlet engine started, reachable on http://ammar-HP-ProBook-450-G4:8983/. jetty [fail]
Hence I cannot see a solr welcome page on localhost:8983/solr/
Help Please...
I'm not sure why its used a different hostname to localhost, but it sounds it is running on this slightly different address and you can simply configure CKAN to use it:
solr_url=http://ammar-HP-ProBook-450-G4:8983/solr
I am trying to install CKAN on my local computer using Ubuntu 14.04 LTS.
I followed the instructions for installing from source found here and I try to check if solr is running by visiting http://localhost:8983/solr/.
I can see that Jetty is running because when I visit http://localhost:8983 I see that it is up.
I added the jdk as follows:
JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-amd64
I am getting a 500 error when i try to open the solr page:
HTTP ERROR 500
Problem accessing /solr/index.jsp. Reason:
JSP support not configured
Powered by Jetty://
Any ideas? Should I redo the whole thing from the start?
Edit/Update
I just couldn't do anything with this installation. The bigger problem was that installation files were meshed up! I tried to install tomcat/solr instead of jetty/solr and things went sour. So I just created a VM and did a fresh install there. For anyone interested I did a tomcat/solr installation following this and a CKAN installation following this (with out of course the solr instructions). Also, for some reason the CKAN installation has commented out the solr URL, so even if it is right, I had to delete the comment.
A fix has been documented by #mstantoncook here [2939] & [1651] How to solr-jetty JSP support
Note the last comment, sudo service jetty restart
It's a Jetty BUG on Ubuntu 14.04!
There is nothing wrong with Ckan itself.
Actually, there is a bug in the libjetty-extra-java package (version 6.1.26 and newer) in Ubuntu 14.04. The bug was introduced after Jetty (in Ubuntu) has changed it's dependences from libtomcat6-java to libtomcat7-java.
You can get more info about this bug in Ubuntu Launchpad: Bug #1508562 "Broken symlinks for JSP support in libjetty-extra-java version 6.1.26-1ubuntu1.1".
The bug is already fixed on Debian, and I'm hope it will be solved in Ubuntu 14.04 soon.
There are workarounds that may work for your case
I proposed some workarounds in this bug report, and since they can be useful for the Ckan users, I'll also replicate them here.
All of them consist on use both jetty and libtomcat7-java, but adding/replacing some classes (code ported from libtomcat6, in put in the jsp-2.1-6.0.2.jar file) to the Jetty classpath.
I don't know if they have some problem. Use them at your own risk!
Workaround 1 - Install the fix package proposed by vshn
I found this workaround here: https://github.com/ckan/ckan/pull/2966
In short:
wget https://launchpad.net/~vshn/+archive/ubuntu/solr/+files/solr-jetty-jsp-fix_1.0.2_all.deb
dpkg -i solr-jetty-jsp-fix_1.0.2_all.deb
service jetty restart
This will install a JSP jar that works (the file will be named jsp-2.1-6.0.2.jar, but it contains classes ported from libtomcat6).
Workaround 2 - Manually install the JSP jar
Download the same JAR file that the DEB package above would install.
wget https://bugs.launchpad.net/ubuntu/+source/jetty/+bug/1508562/+attachment/4785985/+files/jsp-2.1-6.0.2.jar
Now, move it to a proper location inside the Jetty config dir. I did it this way:
mkdir /etc/jetty/extra-jars
mv jsp-2.1-6.0.2.jar /etc/jetty/extra-jars
And add a line like this one in the Jetty start.config file:
echo "/etc/jetty/extra-jars/jsp-2.1-6.0.2.jar" >> /etc/jetty/start.config
And:
service jetty restart
Correct solution
The correct solution is to wait for the Ubuntu Team solution. However, while waiting for this fix, you can use any of the previous workarounds (I prefer the last one).
I hope they help you!
Try this steps:
sudo mv jsp-2.1-6.0.2.jar /usr/share/jetty/lib/.
change own:
sudo chown root:root /usr/share/jetty/lib/jsp-2.1-6.0.2.jar
finally restart jetty:
sudo service jetty restart
I followed this steps and now I can see localhost:8983/solr and localhost/solr/admin
In Ubuntu 14.04 this can be fixed with:
cd /tmp
wget https://launchpad.net/~vshn/+archive/ubuntu/solr/+files/solr-jetty-jsp-fix_1.0.2_all.deb
sudo dpkg -i solr-jetty-jsp-fix_1.0.2_all.deb
sudo service jetty restart
Following http://docs.ckan.org/en/ckan-1.6/solr-setup.html#single-solr-instance
(this one a bit old, but worked perfect for me )
You will have to edit /etc/profile and add this line to the end such as this to the end (adjusting the path for your machine’s jdk install:
JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64/ (or other version)
then
export JAVA_HOME
sudo service jetty start
I'm installing ckan onto ubuntu server 14.04 from source following this guide: http://docs.ckan.org/en/latest/maintaining/installing/install-from-source.html
The problem I'm encountering is that when I try to access solr locally I get the following error:
ERROR 500: org/apache/tomcat/util/descriptor/LocalResolver.
I've googled and tried changing libtomcatlib-6 to a previous version but the downgrade won't take (following this here apt-get says that the version wasn't found). Anyone have any ideas?
If you get the following error message when opening the Solr page in your browser:
java.lang.NoClassDefFoundError: org/apache/tomcat/util/descriptor/LocalResolver
Then run these commands:
sudo sh -c 'echo /usr/share/java/tomcat-coyote.jar >> /etc/jetty/start.config'
sudo service jetty restart
Then reload the page and you should see the Solr admin interface.
(I'm assuming you installed Solr with Jetty as per the source install instructions, i.e. sudo apt-get install solr-jetty openjdk-6-jdk. The NoClassDefFoundError is because of a problem with Ubuntu 14.04's jetty package.)
CKAN doesn't support Ubuntu 14.04 yet, there are a number of issues; https://github.com/ckan/ckan/labels/14.04 Install on Ubuntu 12.04. Having said that, there is a pull request here with working source install instructions for 14.04: https://github.com/ckan/ckan/pull/2020
I have Apache 2.1.14 installed and running in production - due to a new requirement, I need to start using the module mod_proxy_ajp.
Running the './httpd -l' script does not show the compiled module 'mod_proxy_ajp'.
Is there a way I can enable mod_proxy_ajp withough having to recompile the Apache instance?
Thanks.
sudo a2enmod proxy_ajp