Starting JBPM demo - wildfly

I am trying to start the demo version of JBPM 7.26.0 (windows).
After a successful "ant start.demo", the wildfly server log fills up with
WARN [org.kie.server.common.KeyStoreHelperUtil] (Thread-149) Unable
to load key store. Using password from configuration
http://localhost:8080/jbpm-casemgmt/jbpm-cm.html never loads after logging in (spins indefinitely).
Any suggestions on how to troubleshoot?
thanks!

Beside the Single Zip Distribution you can also try the provided Docker builds.
Just install Docker and run docker run -p 8080:8080 -p 8001:8001 -d --name jbpm-server-full jboss/jbpm-server-full:7.26.0.Final and browse to http://localhost:8080/business-central
This works fine for me.

Related

Installing Rancher using docker containers is taking too long and is getting connection timeout

I am trying to install a K8S cluster with Rancher, after installing docker successfully I ran the following command to install Rancher containers:
$ sudo docker run -d --restart=unless-stopped -p 8088:8088 rancher/server:stable
The console I got was:
As you can see I am not being able to download the Rancher containers, what could I do to make it work?
Well, starting with the point this Rancher installation is based on what is proposed in this link https://phoenixnap.com/kb/install-rancher-on-ubuntu. The Rancher version to be installed following the script in the link, according to Docker Hub, is 1.x.
So, I don't recommend the command proposed in the script:
sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server:stable
See, the rancher/server must be replaced by: rancher/rancher:stable, then you will install latest Rancher version 2.x.
Also, to avoid the timeout problem you instead of using the command "docker run" go for "docker pull" first, then "docker run". In other words, after finishing the "pull" then you go with the "run" option. I recommend you run the following commands which will be faster and effective:
sudo docker pull rancher/rancher:latest
sudo docker run -d --restart=unless-stopped -p 8088:8088 -p 8443:8443 --privileged rancher/rancher:latest
After running that everything is in good shape, you can run your Rancher. I hope that can help someone, I lost one day to figure that out, since the download time takes hours each time you run to timeout and fail.

No access to apache docker server

in my docker image I need to run an Apache Server to deploy my website, a glassfish server for deploying the corresponding backend and MongoDB on which the backend connects.
My dockerfile looks like this:
FROM httpd:2.4
FROM glassfish:latest
FROM mongo:3.6
COPY /backend_war_exploded /usr/local/glassfish4/glassfish/domains/domain1/autodeploy/backend_war_exploded
COPY /backend_war_exploded /usr/local/glassfish4/bin/backend_war_exploded
COPY /dist /usr/local/apache2/htdocs/
After building the image I run and start it with:
docker run -dit --name application -p 80:80 -p 8080:8080 -p 27017:27017 applicationimg
docker start application
When I try to access via http://localhost:80 it delivers the code: ERR_EMPTY_RESPONSE. Same for the backend but I can access mongodb on port 27017. When I am commenting out the FROM tags in my dockerfile and run everything separately it just works fine. Does somebody see the mistake? Thanks in advance.
UPDATE
I followed your suggestion and created rewrote the Dockerfile:
FROM ubuntu:16.04
COPY /dist /var/www/html/
COPY /backend_war_exploded /glassfish4/glassfish/domains/domain1/autodeploy/backend_war_exploded
RUN apt-get update && apt-get install -y apache2
RUN apt-get install -y openjdk-8-jdk
RUN apt-get install -y wget && apt-get install -y unzip
RUN wget http://download.java.net/glassfish/4.1.2/release/glassfish-4.1.2.zip
RUN unzip glassfish-4.1.2.zip
RUN cd /glassfish4/bin/ && ./asadmin start-domain domain1
EXPOSE 80
EXPOSE 8080
The webserver starts up and is accesable via localhost:80 but the glassfish server start while building the image but when running the docker image it is not started anymore. When I am accessing the container via docker exec I can navigate to glassfish and start it up manually. What is the issue?
You need to depend on on FROM only and add the other tools through RUN steps. or use single image for each application and connect them together through docker network or by creating a docker-compose.yml which will be easier, you can check it through here. Using multiple FROM does not mean that you are going to have all 3 in 1.
For more information about how to create Dockerfile and How to deploy your application with multiple containers you can check the get started tutorial from Docker
In order to run multiple service inside one container you need to use a service manager like Supervisor. Check the following link for more details: Multi-Service Container

JHipster - Using docker-compose on remote server

I would like to setup my JHipster project on a remote server utilising docker-compose as per here.
Am I right in thinking (for the simplest approach), these are the steps I might follow:
Install docker on remote system.
Install docker-compose on remote system.
On laptop (with app src code) run ./mvnw package -Pprod docker:build to produce a docker image of the application.
Copy the image produced by this to remote server like this.
Install this image on remote system.
On laptop copy relevant yml files from src/main/docker to a directory (e.g. dir/on/remote) on the remote server.
Run docker-compose -f dir/on/remote/app.yml up on the remote server.
Thanks for your help.
Also any suggestions on how this process may be improved would be appreciated.
Expecting that your server is Ubunutu,
SSH to your server,
Install docker, docker-compose, install JAVA and set JAVA_HOME
Two approches
create docker image and push it to docker hub if you have docker hub account
create docker image within server
Second approch would be better to reduce the confusion
Clone your repo to server
cd <APPLICATION_FOLDER>
Do
./mvnw package -Pprod docker:build -DskipTests
List the images created
docker images
You can ignore -DskipTests , if you are writing test code.
Do
docker-compose -f /src/main/docker/app.yml up -d
List containers running
docker ps -a
Logs of the container
docker logs <CONTAINER_ID>

How to working Owasp ZAP on web interface

I do not want to use it from the desktop application. I need software that works on the web.
I want to use it on a server. Personnel who want to use ZAP need to do this by connecting to that server.
I could only run the desktop application
We have a plan for this, otherwise known as ZAP as a Service (ZaaS). Its not progressing as quickly as we'd like, due to lack of contributors. If you (or anyone else) has suitable skills and would like to work on ZAP then we'd be very pleased to hear from you :)
Simon (ZAP project lead)
One of the options you could follow is setting up a VNC Server ( https://archive.realvnc.com/products/vnc/documentation/4.6/unix/man/Xvnc.html) on the target and grant user/SSH access to N desktops for your users so that each could spawn it's own proxy - providing they don't port collide. There's a security recommendation to provide VNC access through an SSH tunnel, so you need to keep that in mind. Also would recommend to disable 'password' SSH access and work with users with properly protected SSH identities aka keys.
While waiting for a native Web GUI you can do as the ZAP team did with ZAP on docker using Webswing.
Webswing allows you to use a Java Swing application through the browser, so the result will be the ZAP GUI through your browser.
First you'll have to install Webswing and ZAP and if you're using a headless linux server you'll have to install xvfb.
Second you'll have to create a Webswing configuration file for running ZAP through Webswing. You can use the configuration file used by the ZAP docker or you can create one using the tutorial provided by Webswing
Finally, enjoy!
One possible option, is to run the official container with webswing according to the official wiki: https://www.zaproxy.org/docs/docker/webswing/
TLDR; Stable:
docker run -d --name zaproxy -u zap -p 8080:8080 -p 8090:8090 -i owasp/zap2docker-stable zap-webswing.sh
visit http://localhost:8080 (http! not https!)
Starting with version 2.5.0 you can run the ZAP Desktop UI in your
browser without having to install Java, thanks to the magic of Docker
and Webswing
To do this you will just need Docker installed. Start the container
with webswing support:
Stable: docker run -u zap -p 8080:8080 -p 8090:8090 -i
owasp/zap2docker-stable zap-webswing.sh
Weekly: docker run -u zap -p
8080:8080 -p 8090:8090 -i owasp/zap2docker-weekly zap-webswing.sh Then
point your browser at:
http://localhost:8080/zap You will then see the familiar ZAP splash
screen while ZAP starts up.

How to run kafka rest proxy on windows

How to run kafka rest proxy on windows.
I downloaded confluent-2.0.1-2.11.7.tar.gz
in windows folder i cannot see kafka-rest-start.
Windows isn't currently a supported platform. However, it should work fine if you adapt the script. Even just running java io.confluent.kafkarest.KafkaRestMain with the appropriate classpath should work.
Here's the example of the command they are actually executing in the end of the bash script:
java -Xmx256M -server -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35 -XX:+DisableExplicitGC -Djava.awt.headless=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dlog4j.configuration=file:C:/Dev/kafka/confluent-4.0.0/etc/kafka-rest/log4j.properties -cp .;C:/Dev/kafka/confluent-4.0.0/target/kafka-rest-*-development/share/java/kafka-rest/*;C:/Dev/kafka/confluent-4.0.0/share/java/confluent-common/*;C:/Dev/kafka/confluent-4.0.0/share/java/rest-utils/*;C:/Dev/kafka/confluent-4.0.0/share/java/kafka-rest/* io.confluent.kafkarest.KafkaRestMain C:/Dev/kafka/confluent-4.0.0/etc/kafka-rest/kafka-rest.properties
Make sure you change paths to yours if you want to try it out.
Perhaps, this answer will help anybody who is new to Kafka and stumble upon this situation, like me :).
I was looking for an answer to the very same question a week ago, came across the official suggestion to run jar files(in this path confluent-x.x.x\share\java\kafka-rest) in windows and was NOT successful in doing so.
Always ran into this error no main attribute found with or without specifying the proper classpath and io.confluent.kafkarest.KafkaRestMain.
I even tried running the shell scripts packaged for Linux distribution using [babun]: http://babun.github.io/, but that resulted in the error like Error: Could not find or load main class io.confluent.kafkarest.KafkaRestMain .
Eventually, docker image built with zookeeper, kafka, schema-registry, kafka-rest worked like a charm.
Here is the official page with info about the image name, further reference to it's doc: https://hub.docker.com/r/confluentinc/cp-kafka-rest/
Upon pulling this image, a new virtual machine gets created with four more images inside it(one for each service like zookeeper, Kafka, schem-registry and Kafka-rest). Running the images runs a separate Docker container.
This guide should get you started quickly:
http://docs.confluent.io/current/cp-docker-images/docs/quickstart.html
And finally, if you would like to expose the kafka REST proxy server running as a Docker container to outside network(like windows machine which is part of the separate network than these containers) just mention the Docker host IP(find it by hitting docker-machine ip <hostname>) in KAFKA_REST_LISTENERS and expose the port with -p option.
Like this:
docker run -d \
--net=host \
--name=kafka-rest \
-p 8082:8082 \
-e KAFKA_REST_ZOOKEEPER_CONNECT=localhost:32181 \
-e KAFKA_REST_LISTENERS=http://192.168.99.100:8082 \
-e KAFKA_REST_SCHEMA_REGISTRY_URL=http://localhost:8081 \
-e KAFKA_REST_HOST_NAME=localhost \
confluentinc/cp-kafka-rest:3.2.1
If everything is OK, you will be able to access REST proxy at this url http://<Docker_host_IP>:8082 from the windows machine.
I was able to run the command that #lexler mentioned above, but outside of cygwin. (directly with the windows command prompt.)