Jconsole not connecting with jmx port of Keycloak - keycloak

I tried to enable jmx to check on cache statistics, I tried to do this in local setup with following command
docker run -it --rm --name keycloak
--cap-add SYS_ADMIN
-p 8080:8080
-p 8787:8787
-p 8999:8999
-e KEYCLOAK_ADMIN="keycloak"
-e KEYCLOAK_ADMIN_PASSWORD="keycloak"
-e DEBUG="true"
-e DEBUG_PORT="*:8787"
-e JAVA_OPTS_APPEND="-Xmx1g
-Dcom.sun.management.jmxremote.port=8999 -Dcom.sun.management.jmxremote.rmi.port=8999
-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.local.only=false -Djava.rmi.server.hostname="$(hostname)"
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/keycloak.hprof"
quay.io/keycloak/keycloak:17.0.0 start-dev
--log-level=INFO
Jmx is enabled but not getting connected from jconsole

You should take a look in the log-files. Are there error messages or can you see, wheter the ARGS reach the startup process?
I had some trouble to add the JMX Options on keycloak-16, the ser failed to start afterward. Then I found this article. This works for me.
If you run the docker image on a remote host, you can copy the jboss-cli-client.jar to your local maschine. And after each startof the container you have to add the user again.

Related

Keycloak production

I have used the official docker file to create an image from the webiste https://www.keycloak.org/server/containers
But while running the container using the comand
docker run --name mykeycloak -p 8443:8443 \
-e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=change_me \
mykeycloak \
start --optimized -- --hostname-strict=false
It is showing the below error.
ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start server in (production) mode
2022-12-26 17:11:45,894 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Key material not provided to setup HTTPS. Please configure your keydevelopment mode.
For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.

spark failed to launch org.apache.spark.deploy.worker.worker on master

I have setup Spark Standalone Cluster on two Ubuntu servers ( master and one slave).
I had config /conf/spark-env.sh (after copy it from spark-env.sh.template) as follows:
SPARK_MASTER_HOST="master"
I started spark-master successfully on master by command below .
sudo /opt/spark/sbin/start-master.sh
But starting spark-slave on the master results with error:
hadoop#master:/opt/spark$ sudo ./sbin/start-slave.sh --master spark://master:7077 --cores 2
/opt/spark/conf/spark-env.sh: line 28: SPARK_LOCAL_IP: command not found
starting org.apache.spark.deploy.worker.Worker, logging to /opt/spark/logs/spark-root-org.apache.spark.deploy.worker.Worker-1-master.out
failed to launch: nice -n 0 /opt/spark/bin/spark-class org.apache.spark.deploy.worker.Worker --webui-port 8081 --master spark://master:7077 --cores 2
Options:
-c CORES, --cores CORES Number of cores to use
-m MEM, --memory MEM Amount of memory to use (e.g. 1000M, 2G)
-d DIR, --work-dir DIR Directory to run apps in (default: SPARK_HOME/work)
-i HOST, --ip IP Hostname to listen on (deprecated, please use --host or -h)
-h HOST, --host HOST Hostname to listen on
-p PORT, --port PORT Port to listen on (default: random)
--webui-port PORT Port for web UI (default: 8081)
--properties-file FILE Path to a custom Spark properties file.
Default is conf/spark-defaults.conf.
full log in /opt/spark/logs/spark-root-org.apache.spark.deploy.worker.Worker-1-master.out
I had search a lot but I do not figure out what is my problem?
I found my fault, I should not use --master keyword and just run command
hadoop#master:/opt/spark$ sudo ./sbin/start-slave.sh spark://master:7077
following the steps of this tutorial: https://phoenixnap.com/kb/install-spark-on-ubuntu
Hint: make sure to install all dependencies before:
sudo apt install scala git -y

Is there a equivalent Debezium command to starting Kafka Connect without Docker container

The debezium kafka connect command is :
docker run -it --rm --name connect -p 8083:8083 -e GROUP_ID=1 -e CONFIG_STORAGE_TOPIC=my_connect_configs -e OFFSET_STORAGE_TOPIC=my_connect_offsets -e STATUS_STORAGE_TOPIC=my_connect_statuses --link zookeeper:zookeeper --link kafka:kafka --link mysql:mysql debezium/connect:0.9
Is there an equivalent way to not run inside a docker container with flags to specify the zookeeper instance and kafka bootstrap servers/broker ? I have my kafka and zookeeper running on my mac locally but not inside a docker container .
Thanks
There are no "flags", just properties files. The docker image is just using variable substitution inside of those files.
You can refer to the Debezium installation documentation, and it is just a plugin to Kafka Connect, which is included with your Kafka installation.
Find connect-standalone.properties in your Kafka install to get started. One important property you will want to edit is plugin.path, which must be the full parent path to where you put the Debezium JAR files. Then Kafka is configured there as well
Then you would run this to start a single node
connect-standalone.sh connect-standalone.properties your-debezium-config.properties
(Docker image is running connect-distributed.sh, but you wouldn't need to run a Cluster just on your Mac)

docker: Got permission denied while trying to connect to the Docker daemon socket at unix:

I tried this
docker run --rm -it -p 2181:2181 -p 8081:8081 -p 8082:8082 -p 8083:8083 -p 9092:9092 -e ADV_HOST=127.0.0.1 landoop/fast-data-dev
I got error
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.35/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
I have checked if daemon is running
โ— docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since ัƒั‚ะพ 2018-01-23 10:52:50 CET; 2h 14min ago
Docs: https://docs.docker.com
Main PID: 11082 (dockerd)
This is my /etc/default/docker
# Customize location of Docker binary (especially for development testing).
#DOCKERD="/usr/local/bin/dockerd"
# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://127.0.0.1:3128/"
# This is also a handy place to tweak where Docker's temporary files go.
#export DOCKER_TMPDIR="/mnt/bigdrive/docker-tmp"
How to edit docker_opts to solve the problem I have?
Try adding your user to the docker group:
Run usermod -aG docker "${USER}", then
either log out and log back in, or run newgrp docker.
After this you have to restart your docker daemon: sudo service docker restart.
If you are running on an Azure virtual machine or similar, try running the Docker command with sudo, e.g.:
sudo tensorflow/tools/ci_build/ci_build.sh CPU bazel test //tensorflow/...

Restcomm Docker Installation Issues

I'm trying to getting started with restcomm following this guide:
http://docs.telestax.com/restcomm-docker-quick-start-guide/
but I'm facing two issues at this time:
Cannot make SIP calls. After I run the docker run command my softphone (X-Lite) can register successfully with the server but when I try to call +1234 I receive 'Call failed to connect'. This is what I see in logs:
https://justpaste.it/tdjg
I also can't connect to Visual Service Designer. This is what I see:
Log:
https://justpaste.it/tdjm
The docker command that I'm using is:
docker run --rm -i -t --name=restcomm-instance -v /var/log/restcomm/:/var/log/restcomm/ -e STATIC_ADDRESS="192.168.1.150" -e ENVCONFURL="https://raw.githubusercontent.com/RestComm/Restcomm-Docker/master/scripts/restcomm_env_locally.sh" -e VOICERSS_KEY="fdf04434829e4e02addd8d54b69e6bc0" -p 80:80 -p 443:443 -p 9990:9990 -p 5060:5060 -p 5061:5061 -p 5062:5062 -p 5063:5063 -p 5060:5060/udp -p 65000-65050:65000-65050/udp restcomm/restcomm:latest
And the servo is:
Hope you can help me.
Regards
The Restcomm Docker Quick start guide has recently been updated and should now be much more straightforward to deploy Restcomm on Docker, using Docker compose.