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
Related
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
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.
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
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
I am trying to deploy my spring application in a server machine which having the tomcat 6.0.29 server. But tomcat server getting stop automatically while extracting the war.
In Catalina Log I have the following:
Jan 27, 2012 3:02:44 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive application.war
In localhost.log
Jan 27, 2012 3:03:21 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
There is no any stacktrace.
I tried to restart the tomcat but server getting stop while extracting the war file. I tried by increasing the JVM memory to 1024MB. Still same problem.
I have deployed the same war in my another testing server and it is working fine.
Any help...
Are you seeing something like this "SEVERE: Error listenerStart"? or none in the logs.
If Tomcat fails there should be a thread dump and/or a heap dump in the startup directory.
Also check the ports available from OS/firewall to bind with.
Enabling debug logging might help. (Change the log levels to DEBUG instead of INFO in the log files below)
Enabling Tomcat debug log:
Refer to : How to set level logging to DEBUG in Tomcat 6?
Enabling Spring debug log:
You can enable spring debug logging mode (why its failing to deploy the webapp) by adding the logging.properties(name should match exactly) in your WEB-INF/classes directory
Refer to : SEVERE: Error listenerStart
How are you launching Tomcat? What OS is this? I have encountered this problem myself in the past when launching Tomcat on CentOS using a startup script. Usually had something to do with security settings of the files and/or of selinux preventing the writing/reading of certain filespaces on the disk.
Try running from the console using ./catalina.sh run and see if that works on the server (assuming it is a *nix server). If so, check ownership of all files and read/write permissions. Disable selinux (if currently enabled) momentarily to see if that makes any difference.
It's a bunch of trial and error when you don't have any further debug information available.
Last time I faced this problem it was due to the fact I was thinking that I am using h2database while the configurations were such that it was using mysql and of course there was no mysql server to connect to.
I was using a maven project in eclipse and none of my changes were taking effect until I did
Project Properties-> Maven-> Update Project and then in
Servers Tab right click on the server name and Publish.
Check the jdbc.properties file in the webapp (in my case it was somewhere inside /.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/ folder) not in source code to see what are the final parameters for database connection.