How to trigger karate gatling distributed test? - karate

We want to run karate gatling distributed mode to test API performance.
Here is the performance test class for master node
public class TestPerformanceDocker {
#Test
void test(){
//master node server ip
String serverUrl= "127.0.0.1";
String threads = System.getProperty("THREADS");
String rampDuration = System.getProperty("RAMP_DURATION");
String constantDuration =System.getProperty("CONST_DURATION");
//slave node amounts
Integer executorCount=Integer.parseInt(System.getProperty("NODES_COUNT"));
String cmd ="mvn gatling:test -DTHREADS="+threads+" -DRAMP_DURATION="+rampDuration+" -DCONST_DURATION="+constantDuration+"";
GatlingMavenJobConfig config = new GatlingMavenJobConfig(executorCount, serverUrl, 9090) {};
config.setMainCommand(cmd);
JobManager<Integer> manager = new JobManager(config);
manager.start();
manager.waitForCompletion();
}
}
Start the master node with cmd :
docker container run -d -t --network=karate_network --name karate_boss --privileged karate mvn clean test -Dtest=TestPerformanceDocker -DTHREADS=3 -DRAMP_DURATION=600 -DCONST_DURATION=600
Face with error log below:
2022-12-20 21:55:35 13:55:35.259 [main] DEBUG com.intuit.karate.http.HttpServer - server started: f224cb587867:9090
2022-12-20 21:55:35 13:55:35.261 [main] DEBUG com.intuit.karate.job.JobManager - added to queue: 1
2022-12-20 21:55:35 13:55:35.262 [main] DEBUG com.intuit.karate.job.JobManager - added to queue: 2
2022-12-20 21:55:35 13:55:35.265 [main] DEBUG com.intuit.karate.job.JobManager - added to queue: 3
2022-12-20 21:55:35 13:55:35.283 [1671544535281] DEBUG com.intuit.karate - command: [docker, run, --rm, --cap-add=SYS_ADMIN, -e, KARATE_JOBURL=http://127.0.0.1:9090, ptrthomas/karate-chrome], working dir: null
2022-12-20 21:55:35 13:55:35.285 [1671544535281] DEBUG com.intuit.karate - command: [docker, run, --rm, --cap-add=SYS_ADMIN, -e, KARATE_JOBURL=http://127.0.0.1:9090, ptrthomas/karate-chrome], working dir: null
2022-12-20 21:55:35 13:55:35.285 [1671544535281] DEBUG com.intuit.karate - command: [docker, run, --rm, --cap-add=SYS_ADMIN, -e, KARATE_JOBURL=http://127.0.0.1:9090, ptrthomas/karate-chrome], working dir: null
2022-12-20 21:55:35 13:55:35.348 [1671544535281-out] DEBUG com.intuit.karate - docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
2022-12-20 21:55:35 13:55:35.349 [1671544535281-out] DEBUG com.intuit.karate - See 'docker run --help'.
2022-12-20 21:55:35 13:55:35.357 [1671544535281] WARN com.intuit.karate.shell.Command - exit code was non-zero: 125 - [docker, run, --rm, --cap-add=SYS_ADMIN, -e, KARATE_JOBURL=http://127.0.0.1:9090, ptrthomas/karate-chrome] working dir: null
2022-12-20 21:55:35 13:55:35.363 [1671544535281-out] DEBUG com.intuit.karate - docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
2022-12-20 21:55:35 13:55:35.364 [1671544535281-out] DEBUG com.intuit.karate - See 'docker run --help'.
2022-12-20 21:55:35 13:55:35.365 [1671544535281-out] DEBUG com.intuit.karate - docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
2022-12-20 21:55:35 13:55:35.366 [1671544535281-out] DEBUG com.intuit.karate - See 'docker run --help'.
2022-12-20 21:55:35 13:55:35.369 [1671544535281] WARN com.intuit.karate.shell.Command - exit code was non-zero: 125 - [docker, run, --rm, --cap-add=SYS_ADMIN, -e, KARATE_JOBURL=http://127.0.0.1:9090, ptrthomas/karate-chrome] working dir: null
2022-12-20 21:55:35 13:55:35.371 [1671544535281] WARN com.intuit.karate.shell.Command - exit code was non-zero: 125 - [docker, run, --rm, --cap-add=SYS_ADMIN, -e, KARATE_JOBURL=http://127.0.0.1:9090, ptrthomas/karate-chrome] working dir: null
With the reference article in official github, we want to run the karate-gatling with distributed mode for API testing.
Reference assets:
https://github.com/karatelabs/karate/wiki/Distributed-Testing#jenkins-config

Related

Does karate support headless testing in CI environment (gitlab CI)

We have done UI automation using karate framework. But I am facing challenges while trying to run the tests using gitlab pipeline.
I am using gradle build tool and added a simple step in the gitlab-ci.yaml, but the build fails every time. Here is what I tried:
Added this in feature file:
* configure driver = { type: 'chrome', headless: true }
Got the error:
18:10:39.056 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening connection {}->http://localhost:9222
18:10:39.056 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.DefaultHttpClientConnectionOperator - Connecting to localhost/127.0.0.1:9222
18:10:39.056 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-8: Shutdown connection
18:10:39.056 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.execchain.MainClientExec - Connection discarded
18:10:39.057 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection released: [id: 8][route: {}->http://localhost:9222][total available: 0; route allocated: 0 of 5; total allocated: 0 of 10]
18:10:39.057 [ForkJoinPool-1-worker-1] ERROR com.intuit.karate - org.apache.http.conn.HttpHostConnectException: Connect to localhost:9222 [localhost/127.0.0.1] failed: Connection refused (Connection refused), http call failed after 1 milliseconds for URL: http://localhost:9222
Also, tried by adding chromedriver: * configure driver = { type: 'chromedriver', port: 9515, executable: 'chromedriver' }. Got this error:
18:19:01.541 [ForkJoinPool-1-worker-1] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection released: [id: 0][route: {}->http://localhost:9515][total available: 0; route allocated: 0 of 5; total allocated: 0 of 10]
18:19:01.542 [ForkJoinPool-1-worker-1] ERROR com.intuit.karate - org.apache.http.conn.HttpHostConnectException: Connect to localhost:9515 [localhost/127.0.0.1] failed: Connection refused (Connection refused), http call failed after 19 milliseconds for URL: http://localhost:9515/session
18:19:01.542 [ForkJoinPool-1-worker-1] ERROR com.intuit.karate - http request failed:
org.apache.http.conn.HttpHostConnectException: Connect to localhost:9515 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
I want to execute the tests on a particular environment when pipeline runs but nothing is working as of now.
We can add the code to install chrome and chrome driver in before_script in .gitlab-ci.yml to solve the issue mentioned.
before_script:
- apt-get update && apt-get install -y --no-install-recommends google-chrome-stable
- wget https://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip
- unzip chromedriver_linux64.zip
- mv chromedriver /usr/bin/chromedriver
- chown root:root /usr/bin/chromedriver
- chmod +x /usr/bin/chromedriver
UI and CI is not easy, we have documented how to use the karate-chrome container: https://github.com/intuit/karate/tree/master/karate-core#karate-chrome
And others have had success with SaaS providers: https://stackoverflow.com/a/60992292/143475
If you are trying another route, you may need to do some research / digging. And please contribute your findings back to the community.

Nextflow: output not being "found", despite setting publishDir

I have the following nextflow script:
echo true
wd = "$params.wd"
geoid = "$params.geoid"
process step1 {
publishDir = "$wd/data/"
input:
val celFiles from "$wd/data/$geoid"
output:
file "${geoid}_datFiles.RData" into channel
"""
Rscript $wd/scripts/step1.R $celFiles $wd/data/${geoid}_datFiles.RData
"""
}
The Rscript contains the following commands:
step1=function(WD,
celFiles,
output) {
library(affy)
datFiles=ReadAffy(celfile.path=paste0(WD,"/",celFiles))
save(datFiles,file=output)
}
args=commandArgs(trailingOnly=TRUE)
WD=args[1]
celFiles=args[2]
output=args[3]
step1(WD,celFiles,output)
When it runs, the output file is saved in the directory I want ($wd/data/${geoid}_datFiles.RData). Given that publishDir points to the same directory, I would expect output (defined as "${geoid}_datFiles.RData") to be available under the publishDir directory.
However, I get the following error:
Missing output file(s) `GSE4290_datFiles.RData` expected by process `step1`
The log file suggests that nextflow is still looking for the output in the workflow created directory:
Process `step1` is unable to find [UnixPath]: `/Users/rebeccaeliscu/Desktop/workflow/affymetrix/nextflow/work/92/42afb131a36eb32ed780bd1bf3bc3b/GSE4290_datFiles.RData`
The complete log file:
Nov-12 17:55:39.611 [main] DEBUG nextflow.cli.Launcher - $> nextflow run main.nf
Nov-12 17:55:39.945 [main] INFO nextflow.cli.CmdRun - N E X T F L O W ~ version 20.07.1
Nov-12 17:55:39.968 [main] INFO nextflow.cli.CmdRun - Launching `main.nf` [infallible_brahmagupta] - revision: d68e496ea0
Nov-12 17:55:40.026 [main] DEBUG nextflow.config.ConfigBuilder - Found config local: /Users/rebeccaeliscu/Desktop/workflow/affymetrix/nextflow/nextflow.config
Nov-12 17:55:40.029 [main] DEBUG nextflow.config.ConfigBuilder - Parsing config file: /Users/rebeccaeliscu/Desktop/workflow/affymetrix/nextflow/nextflow.config
Nov-12 17:55:40.140 [main] DEBUG nextflow.config.ConfigBuilder - Applying config profile: `standard`
Nov-12 17:55:41.288 [main] DEBUG nextflow.Session - Session uuid: 94f22a74-2a63-4a87-9fb3-33cf925a5a74
Nov-12 17:55:41.288 [main] DEBUG nextflow.Session - Run name: infallible_brahmagupta
Nov-12 17:55:41.289 [main] DEBUG nextflow.Session - Executor pool size: 4
Nov-12 17:55:41.326 [main] DEBUG nextflow.cli.CmdRun -
Version: 20.07.1 build 5412
Created: 24-07-2020 15:18 UTC (08:18 PDT)
System: Mac OS X 10.15.7
Runtime: Groovy 2.5.11 on Java HotSpot(TM) 64-Bit Server VM 1.8.0_111-b14
Encoding: UTF-8 (UTF-8)
Process: 46458#Rebeccas-MacBook-Pro-6.local.ucsf.edu [10.49.41.197]
CPUs: 4 - Mem: 8 GB (708.4 MB) - Swap: 2 GB (927 MB)
Nov-12 17:55:41.353 [main] DEBUG nextflow.Session - Work-dir: /Users/rebeccaeliscu/Desktop/workflow/affymetrix/nextflow/work [Mac OS X]
Nov-12 17:55:41.354 [main] DEBUG nextflow.Session - Script base path does not exist or is not a directory: /Users/rebeccaeliscu/Desktop/workflow/affymetrix/nextflow/bin
Nov-12 17:55:41.594 [main] DEBUG nextflow.Session - Observer factory: TowerFactory
Nov-12 17:55:41.598 [main] DEBUG nextflow.Session - Observer factory: DefaultObserverFactory
Nov-12 17:55:41.911 [main] DEBUG nextflow.Session - Session start invoked
Nov-12 17:55:42.309 [main] DEBUG nextflow.script.ScriptRunner - > Launching execution
Nov-12 17:55:42.331 [main] DEBUG nextflow.Session - Workflow process names [dsl1]: step1
Nov-12 17:55:42.334 [main] WARN nextflow.script.BaseScript - The use of `echo` method has been deprecated
Nov-12 17:55:42.495 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Nov-12 17:55:42.496 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Nov-12 17:55:42.508 [main] DEBUG nextflow.executor.Executor - [warm up] executor > local
Nov-12 17:55:42.521 [main] DEBUG n.processor.LocalPollingMonitor - Creating local task monitor for executor 'local' > cpus=4; memory=8 GB; capacity=4; pollInterval=100ms; dumpInterval=5m
Your output declaration is looking for a file in the current workDir: "${geoid}_datFiles.RData", but your Rscript is writing to: $wd/data/${geoid}_datFiles.RData. If you change your command to:
Rscript $wd/scripts/step1.R $celFiles ${geoid}_datFiles.RData
Then Nextflow should be able to find the output file. The publishDir directive will then 'publish' it to the defined publishDir.

Karate: How to implement --no-sandbox header for linux usage with sudo

I want to setup a headless chrome driver for UI Test Automation in jenkins.
But to run the test command
sudo -E java -jar karate-0.9.3.jar karate_GUI.feature
I have to run as root and it requires --no-sandbox, which, if I'm not wrong, it's still not supported in v0.9.3.
If possible, how can I include --no-sandbox option?
I checked https://intuit.github.io/karate/karate-core/ and there is no --no-sandbox option.
My feature configuration:
Feature: message end-point
Background:
* configure driver = { type: 'chrome', executable: '/usr/bin/google-chrome', headless: true }
# Login Url
* def browserManagementUrl = 'http://localhost:8000/login/'
Scenario: GUI Testing for Login page
Given driver browserManagementUrl
And eval driver.input('input[name=name]', 'admin')
And eval driver.input('input[name=password]', 'adminadmin')
And driver.submit('#login-button')
When driver.submit('#login-button')
Then match driver.location == 'http://localhost:8000/select/'
The linux command and it's results
sudo -E java -jar karate-0.9.3.jar karate_GUI.feature
07:15:56.296 [main] INFO com.intuit.karate.Main - Karate version: 0.9.3
07:15:57.345 [ForkJoinPool-1-worker-1] WARN com.intuit.karate - skipping bootstrap configuration: could not find or read file: classpath:karate-config.js
07:15:57.418 [chrome_1560323757416] DEBUG c.i.k.driver.chrome_1560323757416 - command: [/usr/bin/google-chrome, --remote-debugging-port=9222, --no-first-run, --user-data-dir=/var/jenkins_home/workspace/my-karate_GUI#2/integrations/target/chrome_1560323757416, --disable-popup-blocking, --headless]
07:15:57.419 [ForkJoinPool-1-worker-1] DEBUG c.i.k.driver.chrome_1560323757416 - poll attempt #0 for port to be ready - localhost:9222
07:15:57.420 [chrome_1560323757416] DEBUG c.i.k.driver.chrome_1560323757416 - env PATH: /sbin:/bin:/usr/sbin:/usr/bin
07:15:57.423 [ForkJoinPool-1-worker-1] DEBUG c.i.k.driver.chrome_1560323757416 - sleeping for millis: 250
07:15:57.674 [ForkJoinPool-1-worker-1] DEBUG c.i.k.driver.chrome_1560323757416 - poll attempt #1 for port to be ready - localhost:9222
07:15:57.675 [ForkJoinPool-1-worker-1] DEBUG c.i.k.driver.chrome_1560323757416 - sleeping for millis: 250
07:15:57.793 [chrome_1560323757416] DEBUG c.i.k.driver.chrome_1560323757416 - [0612/071557.791933:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
07:15:57.810 [chrome_1560323757416] DEBUG c.intuit.karate.shell.CommandThread - command complete, exit code: 1 - [/usr/bin/google-chrome, --remote-debugging-port=9222, --no-first-run, --user-data-dir=/var/jenkins_home/workspace/my-karate_GUI#2/integrations/target/chrome_1560323757416, --disable-popup-blocking, --headless]
07:15:57.926 [ForkJoinPool-1-worker-1] DEBUG c.i.k.driver.chrome_1560323757416 - poll attempt #2 for port to be ready - localhost:9222
07:15:57.927 [ForkJoinPool-1-worker-1] DEBUG c.i.k.driver.chrome_1560323757416 - sleeping for millis: 250
07:15:58.178 [ForkJoinPool-1-worker-1] DEBUG c.i.k.driver.chrome_1560323757416 - poll attempt #3 for port to be ready - localhost:9222
[...]
07:16:02.206 [ForkJoinPool-1-worker-1] DEBUG c.i.k.driver.chrome_1560323757416 - poll attempt #19 for port to be ready - localhost:9222
07:16:02.207 [ForkJoinPool-1-worker-1] DEBUG c.i.k.driver.chrome_1560323757416 - sleeping for millis: 250
07:16:02.848 [ForkJoinPool-1-worker-1] DEBUG c.i.k.driver.chrome_1560323757416 - request:
1 > GET http://localhost:9222/json
1 > Accept-Encoding: gzip,deflate
1 > Connection: Keep-Alive
1 > Host: localhost:9222
1 > User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_212)
07:16:02.862 [ForkJoinPool-1-worker-1] ERROR c.i.k.driver.chrome_1560323757416 - org.apache.http.conn.HttpHostConnectException: Connect to localhost:9222 [localhost/127.0.0.1] failed: Connection refused (Connection refused), http call failed after 13 milliseconds for URL: http://localhost:9222/json
07:16:02.863 [ForkJoinPool-1-worker-1] ERROR c.i.k.driver.chrome_1560323757416 - http request failed:
org.apache.http.conn.HttpHostConnectException: Connect to localhost:9222 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
07:16:02.918 [pool-1-thread-1] INFO com.intuit.karate.Runner - <<fail>> feature 1 of 1: karate_GUI.feature
---------------------------------------------------------
feature: karate_GUI.feature
report: target/karate_GUI.json
scenarios: 1 | passed: 0 | failed: 1 | time: 5.4993
---------------------------------------------------------
Karate version: 0.9.3
======================================================
elapsed: 6.39 | threads: 1 | thread time: 5.50
features: 1 | ignored: 0 | efficiency: 0.86
scenarios: 1 | passed: 0 | failed: 1
======================================================
failed features:
karate_GUI: karate_GUI.feature:8 -
org.apache.http.conn.HttpHostConnectException: Connect to localhost:9222 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
Exception in thread "main" picocli.CommandLine$ExecutionException: there are test failures
at com.intuit.karate.Main$1.handleExecutionException(Main.java:133)
at picocli.CommandLine.parseWithHandlers(CommandLine.java:1157)
at com.intuit.karate.Main.main(Main.java:139)
I guess you do know that the UI automation pieces are still experimental and yes I don't think we support --no-sandbox - feel free to open a ticket and help us with some links to why this is needed, what it does etc.
A suggested workaround is you can pass a batch file as the executable key to the configure driver call. In this batch file you can then call the chromedriver executable with whatever custom parameters or arguments you need.
Do let us know if that works. It also sounds to me that a way to pass any custom flags is a needed feature, do add this to your feature request.
EDIT: for those landing here in future, I'm not 100% sure, but maybe the info here will help: https://github.com/intuit/karate/issues/1134#issuecomment-638990087

Can not access output at localhost page

package com.example;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
#SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
System.out.println("xxxx");
SpringApplication.run(DemoApplication.class, args);
}
}
other class
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
#RestController
public class SampleController {
#RequestMapping("/")
public String index() {
return "Greetings from Spring Boot!";
}
}
I made tomcat working on port 8181, because when I used 8080 and run in intellj, it says 8080 is already in use and can not start it.
So, I use 8181 and after executing, it opens localhost:8181 page but it is a white page, nothing there.
These are logs of output
06-Mar-2016 14:38:16.383 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/manager
06-Mar-2016 14:38:16.977 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/webapps/manager has finished in 593 ms
These are catalina log
06-Mar-2016 14:38:05.878 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.32
06-Mar-2016 14:38:05.887 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Feb 2 2016 19:34:53 UTC
06-Mar-2016 14:38:05.888 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.32.0
06-Mar-2016 14:38:05.888 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
06-Mar-2016 14:38:05.891 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.2.0-30-generic
06-Mar-2016 14:38:05.892 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
06-Mar-2016 14:38:05.893 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-8-oracle/jre
06-Mar-2016 14:38:05.893 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_74-b02
06-Mar-2016 14:38:05.894 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
06-Mar-2016 14:38:05.894 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /home/caneraydin/.IntelliJIdea16/system/tomcat/Unnamed_Last5
06-Mar-2016 14:38:05.895 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/tomcat
06-Mar-2016 14:38:05.896 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/home/caneraydin/.IntelliJIdea16/system/tomcat/Unnamed_Last5/conf/logging.properties
06-Mar-2016 14:38:05.897 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
06-Mar-2016 14:38:05.898 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
06-Mar-2016 14:38:05.899 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
06-Mar-2016 14:38:05.900 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
06-Mar-2016 14:38:05.900 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
06-Mar-2016 14:38:05.901 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
06-Mar-2016 14:38:05.901 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=/opt/tomcat/endorsed
06-Mar-2016 14:38:05.902 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/home/caneraydin/.IntelliJIdea16/system/tomcat/Unnamed_Last5
06-Mar-2016 14:38:05.905 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat
06-Mar-2016 14:38:05.905 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
06-Mar-2016 14:38:05.906 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /home/caneraydin/Downloads/idea-IU-144.4199.23/bin::/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
06-Mar-2016 14:38:06.265 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8181"]
06-Mar-2016 14:38:06.296 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
06-Mar-2016 14:38:06.302 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-34294"]
06-Mar-2016 14:38:06.304 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
06-Mar-2016 14:38:06.305 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1704 ms
06-Mar-2016 14:38:06.353 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
06-Mar-2016 14:38:06.353 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.32
06-Mar-2016 14:38:06.370 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8181"]
06-Mar-2016 14:38:06.433 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-34294"]
06-Mar-2016 14:38:06.448 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 142 ms
06-Mar-2016 14:38:16.383 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /opt/tomcat/webapps/manager
06-Mar-2016 14:38:16.977 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /opt/tomcat/webapps/manager has finished in 593 ms
What am i doing wrong?
change the port in application.properties file to 8181 it will be default 8080
Regards,
Nitin

Listen gem not forwarding events to guard

I can't get Guard to run any action.
I'm using:
Gentoo x64 (3.14.14)
rbx-2.5.2
guard 2.11.1
listen 2.8.5
Guardfile is just catch-it-all from Understanding guard
guard :rspec, cmd: "bundle exec rspec" do
watch(/(.*)/) { |m| Guard::UI.puts "Unknown file: #{m[1]}"; nil }
end
And here is the output of $ LISTEN_GEM_DEBUGGING=2 bundle exec guard -d
I, [2015-02-04T08:11:34.995518 #25370] INFO -- : Celluloid loglevel set to: 0
I, [2015-02-04T08:11:34.997566 #25370] INFO -- : Listen version: 2.8.5
08:11:35 - DEBUG - Notiffany: gntp not available (Please add "gem 'ruby_gntp'" to your Gemfile and run your app with "bundle exec".).
08:11:35 - DEBUG - Notiffany: growl not available (Unsupported platform "linux-gnu").
08:11:35 - DEBUG - Notiffany: terminal_notifier not available (Unsupported platform "linux-gnu").
08:11:35 - DEBUG - Notiffany: libnotify not available (Please add "gem 'libnotify'" to your Gemfile and run your app with "bundle exec".).
08:11:35 - DEBUG - Notiffany: notifysend not available (Please add "gem 'notify_send'" to your Gemfile and run your app with "bundle exec".).
08:11:35 - DEBUG - Notiffany: notifu not available (Unsupported platform "linux-gnu").
08:11:35 - DEBUG - Command execution: emacsclient --eval '1'
08:11:35 - DEBUG - Notiffany: emacs not available (Emacs client failed).
08:11:35 - DEBUG - Notiffany: tmux not available (:tmux notifier is only available inside a TMux session.).
08:11:35 - DEBUG - Notiffany: file not available (No :path option given).
08:11:35 - DEBUG - Notiffany is using TerminalTitle to send notifications.
08:11:35 - DEBUG - Command execution: hash stty
08:11:35 - DEBUG - Guard starts all plugins
08:11:35 - DEBUG - Hook :start_begin executed for Guard::RSpec
08:11:35 - INFO - Guard::RSpec is running
08:11:35 - DEBUG - Hook :start_end executed for Guard::RSpec
D, [2015-02-04T08:11:35.245730 #25370] DEBUG -- : Adapter: considering TCP ...
D, [2015-02-04T08:11:35.245850 #25370] DEBUG -- : Adapter: considering polling ...
D, [2015-02-04T08:11:35.245900 #25370] DEBUG -- : Adapter: considering optimized backend...
I, [2015-02-04T08:11:35.286148 #25370] INFO -- : Record.build(): 0.03905487060546875 seconds
08:11:35 - INFO - Guard is now watching at '/media/I/08projects/programming/rails/tests/guard_test'
08:11:35 - DEBUG - Start interactor
[1] guard(main)> D, [2015-02-04T08:11:44.639225 #25370] DEBUG -- : inotify: app/controllers/users_controller.rb ([:attrib])
D, [2015-02-04T08:11:44.639598 #25370] DEBUG -- : raw queue: [:file, #<Pathname:/media/I/08projects/programming/rails/tests/guard_test>, "app/controllers/users_controller.rb", {:change=>:modified}]
D, [2015-02-04T08:11:44.640532 #25370] DEBUG -- : inotify: app/controllers/users_controller.rb ([:close, :close_write])
D, [2015-02-04T08:11:44.640733 #25370] DEBUG -- : raw queue: [:file, #<Pathname:/media/I/08projects/programming/rails/tests/guard_test>, "app/controllers/users_controller.rb", {:change=>:modified}]
As far as I can see, listen detects file change but for some reason won't forward it to guard