Kong official docker images broken? - docker

I’m trying to run kong on docker\kubernetes and I tried a bunch of images (0.13, 0.11, 0.11,2, some of the alpine images) and all of them share the same feature. if I run kong inside of those nothing happens. doing echo $? returns 132. i tried running /usr/local/bin/kong but the result is the same.
Is it just me or all of those are broken?
I’m using ubuntu 16.04\windows docker hosts with one of the latest docker versions. both of them fail in this same manner.
If they are fine, please explain what am I doing wrong?

I found the issue (no idea how to work around it at the moment though). The problem lies with the exit code 132: SIGILL – illegal instruction.
cat /proc/cpuinfo
model name : AMD Opteron(tm) Processor 4171 HE
This leads us here, which kind-of gives away the sad part: this processor doesn't support SSE 4.2. Here is the proof.

What you need to do to run Kong:
Set up a database, normally Cassandra or PostgreSQL e.g. like this:
docker run -d --name kong-database \
-p 5432:5432 \
-e "POSTGRES_USER=kong" \
-e "POSTGRES_DB=kong" \
postgres:9.5
You need to run kong migrations up in a shell inside of the container once:
docker run --rm \
--link kong-database:kong-database \
-e "KONG_DATABASE=postgres" \
-e "KONG_PG_HOST=kong-database" \
kong kong migrations up
Start with the matching environment:
docker run -d --name kong \
--link kong-database:kong-database \
-e "KONG_DATABASE= postgres" \
-e "KONG_PG_HOST=kong-database" \
-e "KONG_PROXY_ACCESS_LOG=/dev/stdout" \
-e "KONG_ADMIN_ACCESS_LOG=/dev/stdout" \
-e "KONG_PROXY_ERROR_LOG=/dev/stderr" \
-e "KONG_ADMIN_ERROR_LOG=/dev/stderr" \
-e "KONG_ADMIN_LISTEN=0.0.0.0:8001" \
-e "KONG_ADMIN_LISTEN_SSL=0.0.0.0:8444" \
-p 8000:8000 \
-p 8443:8443 \
-p 8001:8001 \
-p 8444:8444 \
kong
If you leave out the second step, kong won't start saying it needs the migrations to run.

Related

installing transmission on debian with docker: Missing container [duplicate]

This question already has answers here:
Why docker container exits immediately
(16 answers)
Closed 9 months ago.
I am new to this. I have installed docker on my Raspi. I am trying to install transmission on the docker. I use the following;
docker run --cap-add=NET_ADMIN -d \
--name=transmission \
-v /mnt/extDrive1:/data \
-v /etc/localtime:/etc/localtime:ro \
-e CREATE_TUN_DEVICE=true \
-e OPENVPN_PROVIDER=EXPRESSVPN \
-e OPENVPN_CONFIG=my_expressvpn_uk_-_london_udp \
-e OPENVPN_USERNAME=XXX\
-e OPENVPN_PASSWORD=XXX \
-e WEBPROXY_ENABLED=false \
-e LOCAL_NETWORK=192.168.0.0 \
--log-driver json-file \
--log-opt max-size=10m \
-p 9091:9091 \
haugene/transmission-openvpn
I go through the debug on https://haugene.github.io/docker-transmission-openvpn/debug/
All is fine until I get to the section 'Checking if Transmission is running'.
When I run docker ps, there are no containers in the list.
What have I done wrong? Ultimately, I am trying to access transmission through localhost:9091.
Edit: So I have made some progress, but still having issues;
docker start transmission temporarily. populates the container ID
docker exec -it <container-id> bash comes up with the following error:
Error response from daemon: Container XXXX is not running
It seems that container is exiting out as you are not running it in the detached mode. Try this:
docker run -itd --cap-add=NET_ADMIN -d \
--name=transmission \
-v /mnt/extDrive1:/data \
-v /etc/localtime:/etc/localtime:ro \
-e CREATE_TUN_DEVICE=true \
-e OPENVPN_PROVIDER=EXPRESSVPN \
-e OPENVPN_CONFIG=my_expressvpn_uk_-_london_udp \
-e OPENVPN_USERNAME=XXX\
-e OPENVPN_PASSWORD=XXX \
-e WEBPROXY_ENABLED=false \
-e LOCAL_NETWORK=192.168.0.0 \
--log-driver json-file \
--log-opt max-size=10m \
-p 9091:9091 \
haugene/transmission-openvpn

Containerised Nifi s2s Issue

I am using this :- https://hub.docker.com/r/apache/nifi/;
running the below for secure instance :-
docker run --name nifi \
-v /User/hddev/certs/localhost:/opt/certs \
-p 8443:8443 \
-e AUTH=tls \
-e NIFI_WEB_PROXY_HOST=ec2-hostname.aws.com:8443 \
-e KEYSTORE_PATH=/opt/certs/keystore.jks \
-e KEYSTORE_TYPE=JKS \
-e KEYSTORE_PASSWORD=securepass \
-e TRUSTSTORE_PATH=/opt/certs/truststore.jks \
-e TRUSTSTORE_PASSWORD=securepass \
-e TRUSTSTORE_TYPE=JKS \
-e INITIAL_ADMIN_IDENTITY='CN=admin, OU=NIFI' \
-d \
apache/nifi:latest
WebUI works fine I am able to access but with s2s I get this at the RPG,
java.net.UnknownHostException for docker-container-id:8443
o.a.n.r.util.SiteToSiteRestApiClient Failed to create transaction for
https://docker-container-id:8443/nifi-api/data-transfer/input-ports/someportaddress/transactions
When I see the property for ,it takes the container id :- 2eftfdf
nifi.web.https.host=2eftfdf
nifi.remote.input.host=2eftfdf
due to below code.
https://github.com/apache/nifi/blob/master/nifi-docker/dockerhub/sh/secure.sh#L61
I was able to get it work by by changing the environment variable $HOSTNAME to public dns of ec2.
Is there setting in to achieve this without chaging. env
Do we need to update nifi.remote.route.{protocol}.{name}.when related properties? If not then how?

"docker: invalid reference format" while trying to install external plugin

My goal is simple: Load a hello-world external plugin for Kong. I've decided to do this via mounted volume, but am running into significant problems that stop me from being able to run my simple hello-world external plugin.
I've isolated my problem down to the following commands, from scratch:
docker network create kong-net
docker run -d --name kong-database \
--network=kong-net \
-p 5432:5432 \
-e "POSTGRES_USER=kong" \
-e "POSTGRES_DB=kong" \
-e "POSTGRES_PASSWORD=kong" \
postgres:9.6
docker run --rm \
--network=kong-net \
-e "KONG_DATABASE=postgres" \
-e "KONG_PG_HOST=kong-database" \
-e "KONG_PG_PASSWORD=kong" \
-e "KONG_CASSANDRA_CONTACT_POINTS=kong-database" \
kong:latest kong migrations bootstrap
docker run -it --name kong \
--network=kong-net \
-e "KONG_DATABASE=postgres" \
-e "KONG_PG_HOST=kong-database" \
-e "KONG_PG_PASSWORD=kong" \
-e "KONG_CASSANDRA_CONTACT_POINTS=kong-database" \
-e "KONG_LUA_PACKAGE_PATH=/plugins/?.lua" \
-e "KONG_CUSTOM_PLUGINS=helloworld" \
-e "KONG_PROXY_ACCESS_LOG=/dev/stdout" \
-e "KONG_ADMIN_ACCESS_LOG=/dev/stdout" \
-e "KONG_PROXY_ERROR_LOG=/dev/stderr" \
-e "KONG_ADMIN_ERROR_LOG=/dev/stderr" \
-e "KONG_ADMIN_LISTEN=0.0.0.0:8001, 0.0.0.0:8444 ssl" \
-v "kong/plugins/helloworld:/plugins" \
-p 8000:8000 \
-p 8443:8443 \
-p 8001:8001 \
-p 8444:8444 \
kong:latest
In my local directory, I have the plugin source code sitting in ./kong/plugins/helloworld/
According to the Kong docs, I'm adjusting my Kong config file by adding "KONG_" prior to the item I want adjusted. This means I have KONG_CUMSTOM_PLUGINS=helloworld and KONG_LUA_PACKAGE_PATH=/plugins/?.lua
Docker and Kong doesn't like this, and when running the above commands I am greeted with the following:
docker: invalid reference format.
See 'docker run --help'.
Eliminating things one-by-one, the problem surrounds both the -e "KONG_CUSTON_PLUGINS=helloworld" and -e "KONG_LUA_PACKAGE_PATH=/plugins/?.lua" \ bits.
What's going wrong here?

Question: How can I run TimeScaleDB on Docker on an ARM architecture with volumes?

How can I run TimeScale on Docker on a ARM architecture with the Postgres/TimescaleDB data volumes exposed to the host?
My idea was to do the following:
docker run -d --restart always \
--name timescaledb \
-p 5432:5432 \
-e POSTGRES_PASSWORD=password \
-e POSTGRES_USER=user \
-e POSTGRES_DB=databasename \
-v /etc/postgresql:$PWD/postgres/etc \
-v /var/log/postgresql:$PWD/postgres/log \
-v /var/lib/postgresql:$PWD/postgres/lib \
timescale/timescaledb
However, TimescaleDB seems to be stuck in the start/ restart process:
Do you have any suggestions / ideas what I'm doing wrong?
Question is available on Github, too: https://github.com/timescale/timescaledb-docker/issues/23
The docker log (docker logs timescaledb) tells the following:
standard_init_linux.go:190: exec user process caused "exec format error"
Running
docker run \
--name timescaledb \
-p 5432:5432 \
-e POSTGRES_PASSWORD=password \
-e POSTGRES_USER=user \
-e POSTGRES_DB=databasename \
timescale/timescaledb
returns the same error: standard_init_linux.go:190: exec user process caused "exec format error"
I will check if the image supports ARM architectures. Follow up for more information is here: https://github.com/timescale/timescaledb-docker/issues/25

Issue in connecting ksql with kafka of confluent version 3.3.0 in docker

I am setting up ksql-cli with confluent version 3.3.0 in following way
#zookeper
docker run -d -it \
--net=host \
--name=zookeeper \
-e ZOOKEEPER_CLIENT_PORT=32181 \
confluentinc/cp-zookeeper:3.3.0
#kafka
docker run -d \
--net=host \
--name=kafka \
-e KAFKA_ZOOKEEPER_CONNECT=localhost:32181 \
-e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:29092 \
-e KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 \
confluentinc/cp-kafka:3.3.0
#schema-registry
docker run -d \
--net=host \
--name=schema-registry \
-e SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL=localhost:32181 \
-e SCHEMA_REGISTRY_HOST_NAME=localhost \
-e SCHEMA_REGISTRY_LISTENERS=http://localhost:8081 \
confluentinc/cp-schema-registry:3.3.0
i am running ksql-cli docker image in following manner
docker run -it \
--net=host \
--name=ksql-cli \
-e KSQL_CONFIG_DIR="/etc/ksql" \
-e KSQL_LOG4J_OPTS="-Dlog4j.configuration=file:/etc/ksql/log4j-rolling.properties" \
-e STREAMS_BOOTSTRAP_SERVERS=localhost:29092 \
-e STREAMS_SCHEMA_REGISTRY_HOST=localhost \
-e STREAMS_SCHEMA_REGISTRY_PORT=8081 \
confluentinc/ksql-cli:0.5
when i am running ksql-cli by going in bash of container in folowing way
docker exec -it ksql-cli bash
and running ksql-cli in following way:
./usr/bin/ksql-cli local
It is giving me following error:
Initializing KSQL...
Could not fetch broker information. KSQL cannot initialize AdminCLient.
By default, the ksql-cli attempts to connect to the Kafka brokers on localhost:9092. It looks like your setup is using a different port, so you'll need to provide this on the command line, e.g.
./usr/bin/ksql-cli local --bootstrap-server localhost:32181
You'll probably also need to specify the schema registry port, so you may want to use a properties file, e.g. :
./usr/bin/ksql-cli local --properties-file ./ksql.properties
Where ksql.properties has:
bootstrap.servers=localhost:29092
schema.registry.url=localhost:8081
Or provide both on the command line:
./usr/bin/ksql-cli local \
--bootstrap-server localhost:29092 \
--schema.registry.url http://localhost:8081
Note, from KSQL version 4.1 onwards the commands and properties change name. ksql-cli becomes just ksql. The local mode disappears - you'll need to run a ksql-server node or two explicitly. --property-file becomes --config-file and schema.registry.url becomes ksql.schema.registry.url.

Resources