Tomcat Connectors (mod_jk) make error - macos

I'm trying to install Tomcat Connectors (mod_jk) on my Mac and I'm following the instructions from the following sites.
http://pablotips.blogspot.com/2015/01/compiling-modjk-on-mac-os-x-1010.html
https://www.bartbusschots.ie/s/2009/05/05/installing-mod_jk-for-apache-22-on-mac-os-x-105-leopard/
I get the following error when I run the make process.
Q.1 How can I fix this error and compile the make process?
Q.2 Will this help me serve my files from the default apache /Sites directory using Tomcat server?

find apr_lib.h
$ sudo find / -name "apr_lib.h"
add lib
LDFLAGS='-L[path]' CFLAGS='-I[path]'
$ ./configure CFLAGS='-arch x86_64' APXSLDFLAGS='-arch x86_64' LDFLAGS='-L/usr/include/apr-1' CFLAGS='-I/usr/include/apr-1' --with-apxs=/usr/sbin/apxs

When you are starting Tomcat you are seeing following error as well:
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path
The APR is Apache Tomcat Native library which allows optimal performance in production environments.
Prerequisites for installing APR
APR library
APR-util library
OpenSSL library
Download it from this link http://apr.apache.org/download.cgi and integrate to Tomcat. This will fix your problem
When you installed and integrated then when you restart Tomcat server. You will see like following:
After restarting the Tomcat service, we can get the following message
in catalina.out log if APR was installed successfully.
------------ Oct 07, 2015 8:08:54 AM org.apache.catalina.core.AprLifecycleListener init INFO: Loaded APR
based Apache Tomcat Native library 1.1.29 using APR version 1.5.2. Oct
07, 2015 8:08:54 AM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
[false], random [true].
Let me know if you need more help from my end

Related

PrestaShop 1.7.6 images not showing when friendly-URL is switched on

I have the same problem.
I've tried to do all classical methods like regenerate images, clear cache, regenerate htaccess.. but nothing works...
PS version 1.7.6.1
Linux Server Information # 1 SMP Wed Aug 14 08:29:59 EDT 2019 x86_64
Server software version: Apache
The NGINX server is not present on the hosting service and there are no errors on the web service and PHP side.
The server vendor indicates:
Problem only happens with SSL
no error on the webserver side
no error on the PHP side using the native PHP7.1 version
Any idea to solve this issue???
Thanks

Quick Start with Docker container http://{myIP}:81/ScadaLTS/ won't load

Trying to follow the quickstart overt at https://github.com/SCADA-LTS/Scada-LTS.
I got the docker container downloaded and the initial command line issued:
docker run -it -e DOCKER_HOST_IP='myIP' -p 81:8080 scadalts/scadalts/root/start.sh
this command executes and finally ends with:
INFO: Deployment of web application directory
/opt/scadalts/webapps/host-manager has finished in 88 ms Nov 25, 2018
11:17:39 PM org.apache.coyote.AbstractProtocol start INFO: Starting
ProtocolHandler ["http-bio-8080"] Nov 25, 2018 11:17:39 PM
org.apache.coyote.AbstractProtocol start INFO: Starting
ProtocolHandler ["ajp-bio-8009"] Nov 25, 2018 11:17:39 PM
org.apache.catalina.startup.Catalina start INFO: Server startup in
7812 ms
Which leads be to believe that the scadalts should now be running however when i browse over to http://myIP:81/ScadaLTS/ I am getting a 404 page.
The tomcat default page at http://myIP:81 seems to be loading.
How can i find out get more debugging information on understanding what ScadaLTS isn't loading ?
I am attempting to run this in a Windows 10 docker container.
Thank you in advance for any pointers / suggestions.
The same happened here...
You're having a 404 error cause tomcat didn't load the project.
Tomcat needs a project in the Tomcat/WebApps folder to launch or a war file extract a project from.
So in your stats it may appears that your WebApps folder does not have project copied there or there is no folder project named ScadaLTS and that's why you couldn't reach http://{myIP}:81/ScadaLTS/.
So for a solution try http://{ip}:81/ScadaBR it's possible that by default you have a project name is ScadaBR in your WebApps<-(Check the picture)
or try another Scada image if not go for it from scratch it will make you understand a lot of things :3

Unable to connect local slave to Jenkins master on AWS

I've set-up a Jenkins on AWS ec2 instance. I have a few machines with me (Ubuntu, Mac) which are supposed to be the slaves.
I've configured the nodes on my Jenkins master and I'm trying to connect the slaves using JNLP-4 protocol via random ports.
I've enabled the Security, Selected the TCP Ports for agents as Random, Enable CLI over remoting, Enable Agent -> Master Access control.
After doing all these, when I try to connect I get the following error:
Vighneshs-MBP:Downloads vighneshpai$ java -jar agent.jar -jnlpUrl https://my.host.name/computer/Mac/slave-agent.jnlp -secret cf400d1a4e0a1dcc75da2b361efafbce3321e17b935bdcf14350a36e
Oct 11, 2018 8:43:50 PM hudson.remoting.jnlp.Main createEngine
INFO: Setting up agent: Mac
Oct 11, 2018 8:43:50 PM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Oct 11, 2018 8:43:50 PM hudson.remoting.Engine startEngine
INFO: Using Remoting version: 3.25
Oct 11, 2018 8:43:50 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using /Users/vighneshpai/Downloads/remoting as a remoting work directory
Both error and output logs will be printed to /Users/vighneshpai/Downloads/remoting
Oct 11, 2018 8:43:50 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [https://my.host.name/]
Oct 11, 2018 8:43:51 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, JNLP-connect, Ping, JNLP2-connect, JNLP3-connect]
Oct 11, 2018 8:43:56 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver isPortVisible
WARNING: connect timed out
Oct 11, 2018 8:43:56 PM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: https://my.host.name/ provided port:49187 is not reachable
java.io.IOException: https://my.host.name/ provided port:49187 is not reachable
at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:286)
at hudson.remoting.Engine.innerRun(Engine.java:523)
at hudson.remoting.Engine.run(Engine.java:474)
I've also tried using a Fixed port and add the port to the allowed list of ports for Inbound access. Still not able to connect.
Same machines, without any problem connected to the Jenkins running on local machine.
What could be the problem?
Setting the property -Dhudson.TcpSlaveAgentListener.hostName in /etc/default/jenkins resolved my problem.
Changing the port to Fixed instead of random and allowing that particular port in the aws as an exception with TCP, resolved this.
If you've setup http_proxy/https_proxy in the environment variables (and it's a proxy which jenkins doesn't like)) then that too will throw this cryptic error.
Since your Jenkins AWS instance is behind a firewall your slaves won't be able to connect using your given port (49187) if the port itself is not open.
Simply;
Add a security group on AWS console, allowing connections on the port (49187 in this case) for your slave IP address(es).
p.s: If it were to be a random Jenkins machine, a simple sudo ufw allow 49187 should suffice:)
If not a firewall issue, make sure that the setting "Dhudson.TcpSlaveAgentListener.hostName" is set when running the Jenkins to the FQDN of the Jenkins master, or a partial record that the agent can reach for sure.
In our case this wasn't configured as the FQDN and the slave could not reach the record.
My issue was resolved after I performed a Jenkins server restart using the URL
https://JenkinsURL/restart
Or
https://JenkinsURL/SafeRestart

Apache Usergrid, tomcat7 403 error on database setup

I have setup usergrid following this guide.
Steps I have done include:
1. Setup Cassandra (nodetool statusshows me one healty node and I can log in with cqlsh).
2. Setup ElasticSearch (curl localhost:9200 gives me a nice .json back, everything ok.)
3. Built the usergrid app with mvn clean install and moved the built ROOT.warto CATALINA_BASE
4. Created usergrid-deployment.propertiesto CATALINA_HOME at /usr/share/tomcat7
When I start tomcat7 service everything goes ok, no errors in catalina logs. Last line is "Server Startup".
In catalina.out log I have the line:
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
Mar 08, 2016 9:33:25 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/tomcat7/webapps/ROOT.war
Mar 08, 2016 10:02:50 AM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [5$
Mar 08, 2016 10:02:50 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Mar 08, 2016 10:02:50 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5561 ms
So the usergrid app should be running.
I can browse to localhost:8080 and see the Tomcat7"It works" - page.
However, when I try to setup the usergrid database like this:
curl -X PUT http://localhost:8080/system/database/setup -u [user]:[password]
I get a 403 error:
Access to the specified resource has been forbidden.
I am sure that my credentials match those that I have defined in usergrid-deployment.properties in CATALINA_HOME as usergrid sysadmin.login credentials.
In tomcat7 localhost_access_log I have the following output:
0:0:0:0:0:0:0:1 - - [08/Mar/2016:12:27:43 +0200] "PUT /system/database/setup HTTP/1.1" 403 979
However (number2), when I try curl -v localhost:8080/status to see the status of the usergrid app, I get
404 - requested resource is not available
So, any help as to what I might do to:
a) be sure that the usergrid app is deployed correctly with tomcat (as there are no errors in logs
b) to solve the 403 issue?
Thank you for any help!
EDIT:
I noticed that my CATALINA_BASE(/var/lib/tomcat/) didn't have the WEB_INFdirectory inside webapps at all. In the guide I made reference to, we are only instructed to copy the ROOT.war file to webapps directory. Is this correct? Should I also copy the WEB-INF files from the usergrid stack?
Here is what the guide says:
The next step is to deploy the Usergrid Stack software to Tomcat. There are a variey of ways of doing this and the simplest is probably to place the Usergrid Stack ROOT.war file into the Tomcat webapps directory, then restart Tomcat.
I tried copying the WEB-INF files to CATALINA_BASE but that resulted in multiple errors and tomcat7 was unable to start:
This:
21:25:49,923 WARN Slf4jConnectionPoolMonitorImpl:31 - BadRequestException: [host=localhost(127.0.0.1):9160, latency=16(38), attempts=1]InvalidRequestException(why:You have not logged in)
And:
INFO transport:93 - [node-1] bound_address {inet[0.0.0.0/0.0.0.0:9301]}, publish_address {inet[/XX.XXX.XXX.XXX:9301]}
21:25:51,892 INFO discovery:85 - [node-1] elasticsearch/RIaKYgv1R-yTKJ_aknZOuw
21:25:51,905 WARN netty:620 - [node-1] exception caught on transport layer [[id: 0xc1bc7fca]], closing connection
java.net.UnknownHostException: localhost:9200
EDIT 2: I was adviced that only Elasticsearch v 1.4.4 works (I tried with 2.2.0) and for Cassandra 1.2.x and 2.1.x versions (I tried with 3.0.3). I havent yet tried with these versions, I'll update this question if I get it to work.
I don't have an answer for you but I do have a couple of observations:
If you see the Tomcat "it works" page that means that you have not deployed the Usergrid ROOT.war file.
If you see a 404 on /status, that also means Usergrid did not deploy properly.
The Usergrid ROOT.war file that comes with the official release, includes the WEB-INF directory and you do not need to deploy that separately. The only files you need to add to Tomcat are ROOT.war, usergrid-deployment.properties and (optionally) log4j.properties.
The problem is probably that Usergrid is unable to connect to Cassandra or ElasticSearch and ROOT.war file fails to deploy to Tomcat.
If you share you Usergrid properties file (remove any passwords first), it might be easier to diagnose the problem that is preventing the Usergrid WAR file from being deployed.

Geoserver fails One or more listeners failed to start

I am running GeoServer 2.7.1 on Tomcat 7.0.62 on OS X 10.10. I have installed Tomcat with Homebrew and copied the GeoServer 2.7.1 war file to the webapps dir. When I try to start GeoServer it fails with this message.
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
I see no other specific errors in catalina.out. Maybe this is an issue below?
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Jun 22, 2015 3:48:20 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
Jun 22, 2015 3:48:20 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/geoserver] startup failed due to previous errors
Anyone know where I can start looking for config errors etc. ?
I had a similar problem, adding setenv.sh file in tomcat/bin folder or changing the jdk path in service script (if you are starting tomcat as a service) resolves this issue. The web-application you are deploying depends on specific jdk version.
Thanks #S.L. Barth, that was the problem. I had to downgrade Java8 to Java7. Now it works! This guide was helpful

Resources