docker,openshift,fabric8 , Error running quickstart-camelservlet in OpenShift V3 with Fabric8 and Docker


Error running quickstart-camelservlet in OpenShift V3 with Fabric8 and Docker

Question:

Tag: docker,openshift,fabric8

I'm following the Getting started guide to run Fabric8 on OpenShift V3, and I'm getting this error when running mvn fabric8:run in this example: http://fabric8.io/v2/example.html. The project builds correctly and gets pushed into Docker as well, but I'm stuck in this last step. It seems that there is something missing in kubernetes.json but I'm not sure why it's not being generated or how to add what is missing.

Does anybody have any idea?

Thanks.

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building War Quickstart :  Camel Servlet 2.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- fabric8-maven-plugin:2.0.30:run (default-cli) @ quickstart-war-    camel-servlet ---
[INFO] Deploying /app/fabric8/quickstarts/quickstarts/war/camel-servlet/target/classes/kubernetes.json to https://127.0.0.1:8443
[WARNING] Default key managers cannot be initialized: /home/****/.keystore (No such file or directory)
[INFO] Creating a service from kubernetes.json namespace  name quickstart-camelservlet
[WARNING] Default key managers cannot be initialized: /home/****/.keystore (No such file or directory)
[ERROR] Failed to create service from kubernetes.json.     javax.ws.rs.WebApplicationException: HTTP 422 Service "quickstart-camelservlet"     is invalid: metadata.namespace: required value. [email protected][annotations=<null>,apiVersion=v1beta1,[email protected]5c[IntVal=8080,Kind=<null>,StrVal=<null>,additionalProperties={}],createExternalLoadBalancer=<null>,creationTimestamp=<null>,id=quickstart-camelservlet,kind=Service,labels=<null>,namespace=<null>,port=9101,portalIP=<null>,protocol=<null>,proxyPort=<null>,publicIPs=[],resourceVersion=<null>,selector={component=quickStartCamelServlet, group=quickstarts},selfLink=<null>,sessionAffinity=<null>,uid=<null>,additionalProperties={}]
javax.ws.rs.WebApplicationException: HTTP 422 Service "quickstart-camelservlet" is invalid: metadata.namespace: required value
at io.fabric8.kubernetes.api.ExceptionResponseMapper.fromResponse(ExceptionResponseMapper.java:27)
at io.fabric8.kubernetes.api.ExceptionResponseMapper.fromResponse(ExceptionResponseMapper.java:11)
at org.apache.cxf.jaxrs.client.ClientProxyImpl.checkResponse(ClientProxyImpl.java:302)
at org.apache.cxf.jaxrs.client.ClientProxyImpl.handleResponse(ClientProxyImpl.java:725)
at org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(ClientProxyImpl.java:683)
at org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:224)
at com.sun.proxy.$Proxy47.createService(Unknown Source)
at io.fabric8.kubernetes.api.KubernetesClient.createService(KubernetesClient.java:309)
at io.fabric8.kubernetes.api.KubernetesClient.createService(KubernetesClient.java:301)
at io.fabric8.kubernetes.api.Controller.applyService(Controller.java:251)
at io.fabric8.kubernetes.api.Controller.applyEntity(Controller.java:180)
at io.fabric8.kubernetes.api.Controller.applyConfig(Controller.java:197)
at io.fabric8.kubernetes.api.Controller.apply(Controller.java:148)
at io.fabric8.maven.RunMojo.execute(RunMojo.java:57)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Answer:

Looks like version 2.0.30 of fabric8 does not accept the default namespace which is a empty string. You should try a previous version of the plugin. I have tried with 2.0.25 and looks like it is working.


Related:


Use of container docker as a proxy for CF app to get public IP


docker,containers,bluemix
I need a public IP for my application: is it a proper solution to use docker container as a proxy? I can see the price increasing quite a lot with all traffic going through proxy to reach the application. Is there any other option recommended?

Openshift port-forwarding [on hold]


java,git,netbeans,ssh,openshift
After many hours and many attempts, remains now your help. Im trying to do port-forwarding to access my DB in Openshift on Neatbeans. I've already done lots of tutorials, upgrade and downgrade versions of net-ssh, uninstall rhc and so on. I have read a lot git solutions (ssh_options[]...) and doesn't...

Is there a way to tell kubernetes to update your containers?


automation,docker,kubernetes
I have a kubernetes cluster, and I am wondering how (best practice) to update containers. I know the idea is to tear down the old containers and put up new ones, but is there a one-liner I can use, do I have to remove the replication controller or pod(s) and...

Run Boot2Docker from bash


osx,bash,docker,boot2docker
I have installed Boot2Docker on my Mac. By clicking on the app icon, a terminal window opens with some bash script running to prepare the docker vm and then you're good to go. My problem is, I want to write a bash script to run the Boot2Docker vm and then...

difference between docker attach and docker exec


docker,exec
Both will be able to execute commands in container. Both could detach the container. So what is the real difference between docker exec and docker attach?...

Why is /etc/hosts file empty in my docker container?


docker
I created a minimal docker container, following https://github.com/snoyberg/haskell-scratch containing a single Haskell application. When run the application works fine except it cannot resolve hosts from /etc/hosts because it is empty which implies linking does not work correctly (or at least I need to use numeric addresses which is impractical...). I...

How to mount volume for docker container via yaml manifest?


docker,google-cloud-platform,google-container-engine
I try to launch container-vm machine with following yaml: version: v1 kind: Pod spec: containers: - name: simple-echo image: gcr.io/google_containers/busybox command: ['nc', '-p', '8080', '-l', '-l', '-e', 'echo', 'hello world!'] imagePullPolicy: Always ports: - containerPort: 8080 hostPort: 8080 protocol: TCP volumeMounts: - name: string mountPath: /home readOnly: false restartPolicy: Always...

Docker container http requests limit


http,elasticsearch,docker
I'm new to Docker so, most likely, I'm missing something. I'm running a container with Elasticsearch, using this image. I'm able to setup everyhing correctly. After that I was a using a script developed by a collegue in order to insert some data, basically querying a MySQL database and making...

Openshift does not react on INTERVAL of MySQL


openshift
I have tested the table test on the locanhost and Openshift and I am facing problem that on openshift I am not getting anything back when I query the data like this WHERE arrivaltime BETWEEN curtime() - INTERVAL 2 MINUTE AND curtime() + INTERVAL 2 MINUTE although on the localhost...

Docker Compose with one Terminating Container


docker,exit,exit-code,docker-compose,fig
I'm having a docker compose setup of a database container, an application container and one container which pre-loads the database with necessary data. I want to start all of the containers together with docker-compose up while the pre-loading container terminates after it is one with exit 0. But terminating this...

How to customize the configuration file of the official PostgreSQL docker image?


postgresql,docker
I'm using the the postgres official image https://registry.hub.docker.com/_/postgres/. And now I'm trying to customize its configuration. For this purpose the command sed is used, e.g. to change the max_connections: sed -i -e"s/^max_connections = 100.*$/max_connections = 1000/" /var/lib/postgresql/data/postgresql.conf I tried two methods to apply this configuration. The first is by adding...

Does Google Container Registry undergo issues?


docker,google-cloud-platform,google-container-engine,google-container-registry
I am facing an issue while using container optimized VMs. I launch an instance with following command: gcloud compute instances create "$instance_name" \ --tags "http-server" \ --image container-vm \ --scopes storage-rw,logging-write \ --metadata-from-file google-container-manifest="m2.yml" \ --zone "$my_zone" \ --machine-type "$my_machine_type" where m2.yml is: version: v1beta2 containers: - name: nginx image:...

PyCharm add remote Python interpreter inside the Docker


python,docker,pycharm,remote-debugging,boot2docker
So I have set up a docker on my laptop. I'm using Boot2Docker so I have one level of indirection to access the docker. In PyCharm, I can set a remote python interpreter via SSH but I'm not sure how to do it for dockers that can only be accessed...

autoexpect on docker centos6.6 container cannot work


centos,docker,expect,autoexpect
Docker container pure image: centos6.6 after bash, I install these: yum -y install tar zip unzip expect glibc.i686 Package expect-5.44.1.15-5.el6_4.x86_64 already installed and latest version and run autoexpect, I always get these error: [[email protected] bin]# autoexpect autoexpect started, file is script.exp no such variable (read trace on "env(SHELL)") invoked from...

Docker-compose and pdb


python,docker,pdb,docker-compose
I see that I'm not the first one to ask the question but there was no clear answer to this: How to use pdb with docker-composer in Python development? When you ask uncle Google about django docker you get awesome docker-composer examples and tutorials and I have an environment working...

Docker inspect with unix:///var/run/docker.sock (in Java or Scala)


java,scala,docker
Docker has lots of interesting information available via unix:///var/run/docker.sock I have been able to map this to a port and I can access /containers/json with GET requests to the port. But... this is not exactly secure. How can I access /containers/json from this raw socket file (in Java or Scala)?...

Golang failes to change the name of imported module


go,docker,skydns
I'm trying to bring SkyDNSv1 back to life and build it from my fork (here is Dockerfile). SkyDNS was really good and simple tool for the quick service discovery, but it wasn't updated for a long time. There is an error in build process and it's caused by third party...

How to edit file after I shell to a docker container?


docker
I successfully shelled to a docker container using docker exec -i -t 69f1711a205e bash Now I need to edit file and I don't have any editors inside [email protected]:/# nano bash: nano: command not found [email protected]:/# pico bash: pico: command not found [email protected]:/# vi bash: vi: command not found [email protected]:/# vim...

Flask Project root directory on openshift


python,flask,openshift
I'm getting started with flask and I'm deploying my app to openshift. My apps code: def get_users(): f = open('./users.txt') .... when I run: $ rhc tail flaskpq I see: [Sun Jun 21 09:05:20 2015] [error] [client 127.2.78.1] f = open('./user.txt') [Sun Jun 21 09:05:20 2015] [error] [client 127.2.78.1] IOError:...

SocketError: No such file or directory - connect(2) for /var/run/docker.sock


ruby-on-rails,docker,boot2docker
I am trying to run a docker container inside a rails application, however I keep receiving the following error:- container = Docker::Container.create({'Image' => 'mitc/judge'}) Excon::Errors::SocketError: No such file or directory - connect(2) for /var/run/docker.sock (Errno::ENOENT)` The environment variables are set bash-3.2$ env | grep DOCKER DOCKER_HOST=tcp://192.168.99.100:2376 DOCKER_TLS_VERIFY=1 DOCKER_CERT_PATH=/Users/ayushlodha/.docker/machine/machines/dev The container...

Openshift redirect to https using flask-base example


python,.htaccess,flask,openshift
I'm trying to run my flask based app on free gear on Openshift only on https. Following this - I have added the .htaccess file to the root of my repo but it seems to be ignored, as it is not redirecting. The article talks about a wsgi directory but...

Openshift trustwave intermediate ssl cert issue


ssl,https,ssl-certificate,openshift
So I have got an application on openshift and I am trying to enable SSL on there. I already have an SSL cert from my previous host which is with Trustwave and seemed to work fine. So I have setup an alias for my-domain.com and have put a CNAME redirect...

docker run local script without host volumes


database,shell,docker,docker-compose
The goal is to add data to my database server containers of a multi-container web app from a download using curl once the database containers are running. I can do this from docker-compose.yml or from docker run independent of the web app, as long as I use host volumes. How...

ctrl+G in erl doesn't work


unicode,encoding,utf-8,erlang,docker
I'm trying to interconnect erlang nodes, but entering ctrl+G doesn not work: Eshell V6.4.1 (abort with ^G) 1> ^G Eshell V6.4.1 (abort with ^G) 1> ^G Eshell V6.4.1 (abort with ^G) 1> ^G Eshell V6.4.1 (abort with ^G) any idea why this can happen? I was thinking about locale settings,...

What's the best way to share files from Windows to Boot2docker VM


docker,boot2docker
I have make my code ready on Windows, but I find it's not easy to share to boot2docker. I also find that boot2docker can't persistent my changes. For example, I create a folder /temp, after I restart boot2docker, this folder disappears, it's very inconvenient. What is your way when you...

Cartridge Python2.7 on OPenshift


python,django,openshift
I try to install Django 1.5 on host Openshift. I use cartridge Python 2.7. I read https://developers.openshift.com/en/python-getting-started.html. I did not understand where this code should be. virtenv = os.environ['OPENSHIFT_PYTHON_DIR'] + '/virtenv/' virtualenv = os.path.join(virtenv, 'bin/activate_this.py') try: # See: http://stackoverflow.com/questions/23418735/using-python-3-3-in-openshifts-book-example?noredirect=1#comment35908657_23418735 #execfile(virtualenv, dict(__file__=virtualenv)) # for Python v2.7...

How to see a linked container as localhost?


docker,docker-compose
I have this two containers : api: image: social-learning ports: - "3000:3000" command: bundle exec rails s -p 3000 -b '0.0.0.0' volumes: - ../api:/app expose: - "3000" web: image: social-learning-frontend ports: - "4200:4200" - "9000:9000" command: ember serve -p 4200 volumes: - .:/app links: - api expose: - "3000" When...

Access binaries inside docker


ubuntu,meteor,docker
I am using Meteor and Meteur Up package to push a bundle to server. It uses docker. The problem is that I cannot access graphicsmagick or imagemagick from inside a docker to use it in my app. However it is installed on the server and I can access it when...

Passing Elasticsearch and Kibana config file to docker containers


elasticsearch,docker,kibana,kibana-4
I have found a docker image devdb/kibana which runs Elasticsearch 1.5.2 and Kibana 4.0.2. However I would like to pass into this docker container the configuration files for both Elasticsearch (i.e elasticsearch.yml) and Kibana (i.e config.js) Can I do that with this image itself? Or for that would I have...

When should you create more than one docker container image instance with Kubernetes Replication Controller?


docker,google-compute-engine,kubernetes
When using Kubernetes to manage your docker containers, particularly when using the replication controller, when should you increase an images running container instances to more than 1? I understand that Kubernetes can spawn as many container replicas as needed in the replication controller configuration file, but why spawn multiple running...

How do I turn sendfile off in a docker instance


linux,nginx,configuration,docker,sendfile
I have a nginx docker instance running. In the docker instance there is a file called /etc/nginx/nginx.conf It has the following settings http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" access_log /var/log/nginx/access.log main; sendfile on; .... } I run the docker instance by running with...

Server and client network apps simulated in one machine


docker,systemd
I would like to simulate a server machine and several client machines operating over a vpn. I would like to test the server application as well as the client applications all on one machine. Would I be able to do this with a few docker applications running on my machine...

Unable to get docker containers running disque to establish a cluster


docker,disque
I put together a docker container building disque https://registry.hub.docker.com/u/jobflow/disque/ I am able to deploy and run a single service. I can expose a port and connect to it from a disque client running on the same container or a different container. But when connect to one instance and send the...

Installing Python 3 Docker Ubuntu error command 'x86_64-linux-gnu-gcc


python,python-3.x,amazon-web-services,docker
I'm trying to create a dockerfile that uses Python 3. FROM ubuntu:14.04 RUN apt-get update RUN apt-get install -y python3 python3-dev python-pip RUN apt-get install -y libxml2-dev libxslt1-dev libpq-dev libjpeg-dev libfreetype6-dev zlib1g-dev RUN cd /var/projects/apps && pip install -r requirements.txt I get the error fatal error: Python.h: No such file...

Why are images created and why doesn't Docker clean them up?


docker
I know how to removed containers and images. What I don't understand is why those <none> images are created in the process of a docker build -t my_container . or a similar command. Running docker images will give me something like that: REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE go_dev...

Remote debugging tomcat with OpenShift


eclipse,tomcat,openshift,remote-debugging
I am using openshift for my tomcat webapp. I am able to run the app but unable to debug it. As openshift starts tomcat in debug mode, I was expecting I'll be able to debug. Host: $OPENSHIFT_JBOSSEWS_IP Value of this is 127.5.20.129 for me which I got from command: rhc...

ERROR: (gcloud.preview) Invalid choice: 'docker'. Did you mean 'dm-v2'?


docker,google-cloud-platform,gcloud
Somehow I was able to push my docker image to Google Container Registry with command: $ gcloud preview docker push gcr.io/<my-project-xxx>/<my-image-yyy> I ran the commands yesterday and copied them to my notes, but today pasting them to terminal in the same order I get the error: ERROR: (gcloud.preview) Invalid choice:...

Any suggestion for running Aerospike on Kubernetes on CoreOS on GCE?


docker,google-compute-engine,kubernetes,aerospike
I would like to run Aerospike cluster on Docker containers managed by Kubernetes on CoreOS on Google Compute Engine (GCE). But since GCE does not permit multicast, I have to use Mesh heartbeat as described here, which has to be set up by specifying all node's IP addresses and ports;...

Saving docker container image


jenkins,docker
I created a new docker container using jenkings image This is the command I ran docker run -p 8080:8080 -v /var/jenkins_home jenkins I created a few jobs on the jenkins instance and commited the image docker commit 7b903d061654 test When I run the image I created using the command (below)...

What is the '.save_docker/' folder? Can I delete it?


linux,docker
After using docker, I found my disk space had been eat a lot. I searched google to resolve the problem, found a post said this is because of aufs & devicemapper. Now I found a folder named .save_docker in /home. In this folder, there is a folder names aufs, the...

Not able to access Kibana running in a Docker container on port 5601


elasticsearch,docker,dockerfile,kibana-4
I have built a docker image with the following Docker file. # gunicorn-flask FROM devdb/kibana MAINTAINER John Doe <[email protected]> ENV DEBIAN_FRONTEND noninteractive RUN apt-get update RUN apt-get install -y python python-pip python-virtualenv gunicorn # Setup flask application RUN mkdir -p /deploy/app COPY gunicorn_config.py /deploy/gunicorn_config.py COPY app /deploy/app RUN pip install...

Best practice for docker webserver, muliple layers or single layer?


webserver,docker
I want to build a docker webserver, serving Nginx, PHP and MySQL for multiple websites. Would it be better to run a single docker container for each component, ie one for MySQL, one for Nginx, One for PHP and another for my site data. Or Run multipul containers that each...

What tool can manage Docker container to start in order?


docker,containers
We're trying to port our system to the containers, currently we try Docker module with Puppet and we face an issue with the order of starting some specific conainers. We have a web application, MySQL, NginX and then everything connect through HAproxy. Each of them live in their own container....

docker set iptables options in docker-compose.yml


docker
I'm using docker-compose for managing containers. How to I turn off iptables (set --iptables=false for docker) when starting via docker-compose up?...

Configure Dockerfile to set AWS configurations


node.js,amazon-web-services,docker
I've just started looking at Docker. I have a node app that resizes and image and then sends an SQS message to aws when finished. I have managed to create a docker image of my app, copying it from my local machine, but run into the issue that I can't...

Meteor mupx ssl configuration is not working, still routing to port 80


javascript,ssl,meteor,docker
Heres my mup.json: // Configure environment "env": { "PORT": 3000, "ROOT_URL": "https://www.exomatch.com" }, //SSL "ssl": { "certificate": "ssl/ssl.crt", // this is a bundle of certificates "key": "ssl/private.key", // this is the private key of the certificate "port": 443 // 443 is the default value and it's the standard HTTPS port...

Where does kubernete's kubelet create service environment variables?


node.js,docker,service-discovery,kubernetes
I'm creating a kubernetes cluster, and in it I have several services. I know based on https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/services.md#discovering-services I have two options. use the environment variables set by the kubelet. use skydns I want to try to use the environment variables first before I go adding another dependency into the mix....

Openshift - trigger Jenkins build on git push


jenkins,openshift
I work with Openshift now and I have a problem. I created an application server with Jenkins and when I push to the master branch of the git repository the Jenkins build is triggered automatically. The point is that the build isn't triggered when I push to another branch (not...

Vagrant + puppet + docker


mysql,docker,vagrant,puppet
I'm new with this technologies but I want to learn about automation and containers stuff. I read some documentation about this 3 products and I want to know if is possible to automate almost everything in a large environment using this products. Vagrant for deploy VMs (let's say 10 at...

docker run python from container


docker
I took over a project which requires the usage of docker to setup the development environment. The project wiki is primarily written for use with coreos and one of the setup steps involved running a python script. I'm using boot2docker and realised that there's no python pre-installed with the tcl....