Origin: oc cluster up does not recognize --insecure-registry argument

Created on 24 May 2016  路  3Comments  路  Source: openshift/origin

If you don't have --insecure registry set up _oc cluster up_ will tell you:

     Ensure that the Docker daemon is running with the following argument:
        --insecure-registry "172.30.0.0/16"

But if you add exactly the string with the quotes to docker daemon, it doesn't work and will end up in a loop.
It works without the quotes.

Version
$ oc version
oc v1.3.0-alpha.0-660-g5f098ef
kubernetes v1.3.0-alpha.1-331-g0522e63
Steps To Reproduce
  1. Don't have the --insecure-registry set up
  2. oc cluster up
  3. add --insecure-registry "172.30.0.0/16" to docker daemon
  4. restart docker daemon
    Current Result
oc cluster up
-- Checking Docker client ... OK
-- Checking for existing OpenShift container ... OK
-- Checking for openshift/origin:latest image ... OK
-- Checking Docker daemon configuration ... FAIL
   Error: did not detect an --insecure-registry argument on the Docker daemon
   Solution:

     Ensure that the Docker daemon is running with the following argument:
        --insecure-registry "172.30.0.0/16"
ps faux | grep docker
tnozicka 21912  0.0  0.0 118476  2336 pts/2    S+   10:49   0:00  |   \_ grep --color=auto docker
root     21365  0.0  0.0 121112  3184 ?        Ss   10:42   0:00 /bin/sh -c /usr/bin/docker daemon            $OPTIONS            $DOCKER_STORAGE_OPTIONS            $DOCKER_NETWORK_OPTIONS            $INSECURE_REGISTRY            2>&1 | /usr/bin/forward-journald -tag docker
root     21367  0.0  0.1 859764 38004 ?        Sl   10:42   0:00  \_ /usr/bin/docker daemon --selinux-enabled --log-driver=journald --storage-opt dm.no_warn_on_loop_devices=true --insecure-registry "172.30.0.0/16"
root     21459  0.0  0.1 339180 24752 ?        Sl   10:42   0:00  |   \_ docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8080 -container-ip 172.17.0.2 -container-port 8080
root     21368  0.0  0.0  36880  3108 ?        Sl   10:42   0:00  \_ /usr/bin/forward-journald -tag docker
Expected Result

Start up correctly.

prioritP2

Most helpful comment

Error: did not detect an --insecure-registry argument on the Docker daemon
Solution:
Ensure that the Docker daemon is running with the following argument:
--insecure-registry 172.30.0.0/16

Fix:

vi /etc/docker/daemon.json

{ "insecure-registries": ["172.30.0.0/16"] }

Then restart Docker && sudo oc cluster up

All 3 comments

Error: Error: did not detect an --insecure-registry argument on the Docker daemon
Fix: oc cluster up --skip-registry-check=true

Error: did not detect an --insecure-registry argument on the Docker daemon
Solution:
Ensure that the Docker daemon is running with the following argument:
--insecure-registry 172.30.0.0/16

Fix:

vi /etc/docker/daemon.json

{ "insecure-registries": ["172.30.0.0/16"] }

Then restart Docker && sudo oc cluster up

To set the json config above on Macs' installation, you can go to Docker's "Preference" and add it here:
image

Was this page helpful?
0 / 5 - 0 ratings