How to install mod_proxy_hcheck module/extension for apache2 - apache2

How to install mod_proxy check module/extension for apache2 ? I want to use all the latest mod_proxy ProxyPass parameters. Currently it is throwing compilation error saying
AH00526: Syntax error on line 8 of /etc/apache2/conf-extra/httpd-proxy-balancer.conf:
BalancerMember unknown Worker parameter
Action 'configtest' failed.
The Apache error log may have more information.

I was able to do it by executing
a2enmod proxy_hcheck

Related

Unable to run setup:upgrade command- Scandipwa

Installing scandipwa after cache changes to varinsh cache.
I'm Facing an error while running setup:upgrade command.
Error flushing Varnish server. Host: "scandi.pwa". PURGE response code: 500 message: Internal Server Error
using apache. Can we fix this on apache without using nginx?
Thanks

Starting jetty fail in ubuntu 14

I install the solr-jetty package in a Ubuntu 14 container running in a cloud9 workspace.
To install the package I run the following command:
sudo apt-get install solr-jetty
The installation doesn't return any error.
Then I try to start solr with the following command:
sudo service jetty start
But I receive the following error:
* Starting Jetty servlet engine. jetty
* Jetty servlet engine started, reachable on http://host-solr-3694477:8983/. jetty
...fail!
In the log file of jetty I get the following message:
failed setting default capabilities.
set_caps(CAPS) failed for user 'jetty'
Service exit with a return value of 4
How can I resolve this issue?
To resolve the problem I had to change the user that run jetty from jetty to root.
This can be configured by editing the /etc/default/jetty file.
I think it is not the more correct solution because it can add security problems. If anyone have a better solution ...
Docker user here, same problem, but - this worked for me (and this is as unadvised as changing the user to 'root', suggested above):
https://docs.docker.com/engine/reference/run/#/runtime-privilege-and-linux-capabilities
Set the following on your 'docker run' command when creating a container:
--privileged=true
I'm just using docker for development, so not overly concerned yet with the security implications of this.

Issue with solr-jetty with a fresh re-installation of CKAN, Jetty and Solr

I am trying to install CKAN on my Ubuntu 14.04 server, but I ran into some errors that I can't fix.
I tried to do a fresh installation after I removed everything from my computer. I am getting some errors. When I try to run:
sudo apt-get remove jetty, I get:
*Stopping Jetty servlet engine (was reachable on
http://myComputer-ubuntu:8983/).
jetty start-stop-daemon: user 'solr' not found
start-stop-daemon: user 'solr' not found
invoke-rc.d: initscript jetty, action "stop" failed.
dpkg: error processing package jetty (--remove): subprocess installed
pre-removal script returned error exit status 2
*Starting Jetty servlet engine. jetty start-stop-daemon: user 'solr'
not found *(already running).
[ OK ]
Errors were encountered while processing:
jetty
E: Sub-process /usr/bin/dpkg returned an error code (1)
Any ideas how to fix this?
Edit:
After trying sudo apt-get purge --auto-remove jetty
I get this error:
The following packages have unmet dependencies:
jetty : Depends:
libjetty-java (>= 6.1.26-1ubuntu1.1) but it is not installed
Depends: jsvc but it is not installed
Depends: apache2-utils
How on earth can i completely remove Jetty!!??!!
Edit2:
When trying sudo apt-get remove jetty:
I get a message saying jetty is not installed, but at the same time it is giving my an error that jetty's dependencies are not met!
I have been experiencing the same error messages on Ubuntu 14 and I've just figured out what it was.
The issue was with the line endings of /etc/default/jetty. It turned out that the file had been edited on Windows and had line endings of CRLF, once I updated the file to LF and re-ran it the issue was solved.
The quickest way to test this is to revert back to Jetty's original config by running sudo mv /etc/default/jetty /tmp/ and then run sudo service jetty restart. If you have the same issue as me, jetty will restart properly.

Solr: 404 error with getting admin page

I've installed Solr on my Ubuntu to this path
/opt/solr/solr-4.10.2
After installing I started Solr:
sudo bin/solr start from /opt/solr/solr-4.10.2 directory
As I can understand it started successfully
Waiting to see Solr listening on port 8983 [/]
Started Solr server on port 8983 (pid=8385). Happy searching!
But when I try to get to admin page
http://localhost:8983/solr
I got 404 error:
HTTP ERROR: 404
Problem accessing /solr. Reason:
Not Found
Powered by Jetty://
Do you have any suggestion what's going wrong and where to look in order to fix this problem?
Since this error can be caused by a lot of things, you need to access the log file and debug the execution.
First of all, open your Node log file, located in /opt/solr/solr-4.10.2/node1/log and look for something weird (Shift+F for Errors).
Generally, this error occurs when you have a mismatch between the Solr required Java JDK and your current Java JDK.
When I had this problem, I found in the log file the following error message java.lang.UnsupportedClassVersionError: org/apache/solr/servlet/SolrDispatchFilter : Unsupported major.minor version 51.0 and realized the problem was the java version.
To solve this, try to change the current JDK, using the command sudo update-alternatives --config javac.
If the error still occurs, try to uninstall all unused JDK's, because Solr is getting the wrong path.
The final solution to this issue is to open the file /opt/solr/solr-4.10.2/solar.in.sh and edit the SOLR_JAVA_HOME, writing the right JDK path (e.g /usr/lib/jvm/java-1.7.0)
Disclosure: the secret is look in the log file and figure out what is causing the issue.
Cheers.
try:
http://localhost:8983/solr/index.html
[solr's web.xml]
<servlet>
<servlet-name>LoadAdminUI</servlet-name>
<servlet-class>org.apache.solr.servlet.LoadAdminUiServlet</servlet-class>

How can I disable apache2 error logging?

In /etc/apache2/apache2.conf I have uncommented the following line:
# ErrorLog ${APACHE_LOG_DIR}/error.log
Which resulted in the following:
serv:/var/log/apache2# /etc/init.d/apache2 restart
Restarting web server: apache2 ... waiting (2)No such file or directory: apache2: could not open error log file /etc/apache2/logs/error_log.
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
failed!
How can I disable error logging of virtual hosts that contain no ErrorLog/CustomLog directive?
As you can see apache can not open log file. In this case you must change
/etc/apache2/apache2.conf
with
/etc/apache2/${APACHE_LOG_DIR}/error.log
This resolution it can be see in stating apache ubuntu forum.
Try starting apache using the following command
service apache2 start

Resources