# User docker constantly restarting when trying to use extra\_args \[Solved\]

**URL:** <https://forums.suse.com/t/user-docker-constantly-restarting-when-trying-to-use-extra-args-solved/5425>\
**Category:** RancherOS\
**Created:** [February 6, 2017, 1:13am UTC](https://forums.suse.com/t/user-docker-constantly-restarting-when-trying-to-use-extra-args-solved/5425 "2017-02-06T01:13:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![foxmulder900](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/foxmulder900/32/2123_2.png) [@foxmulder900](https://forums.suse.com/u/foxmulder900)\
**Post date:** [February 6, 2017, 1:13am UTC](https://forums.suse.com/t/user-docker-constantly-restarting-when-trying-to-use-extra-args-solved/5425/1 "2017-02-06T01:13:06Z")

</div>

Hello,  
I’m attempting to configure the user docker to use an insecure registry, I have the following in my cloud-config.yml

```
rancher:
  docker:
    args:
    - daemon
    - --insecure-registry
    - 192.168.0.4:5000

```

However I was getting the following error:

```
   http: server gave HTTP response to HTTPS client

```

I found this question on the forums:

> [@Insecure registry in rancheros v0.7.0](http://forums.suse.com/t/insecure-registry-in-rancheros-v0-7-0/4560):
>
> Hi, I’m having problem with setting private registry in rancheros v0.7.0. This is my cloud config: [root@psprancheros06 ~]# ros config export hostname: psprancheros06.example.com rancher: console: centos docker: args: - daemon - --insecure-registry - regd.example.com And this is the “docker info” output: Insecure Registries: 127.0.0.0/8 Once I do “ros os upgrade -i rancher/os:v0.6.1” and reboot, everything works fine. Can you tell me what am I doing wrong? Thanks

However when I change `args` to `extra_args` and try restarting the docker daemon as the answer suggests, the daemon perpetually restarts itself. So its status is usually something like:

`Restarting (1) Less than a second ago`

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [February 6, 2017, 7:41am UTC](https://forums.suse.com/t/user-docker-constantly-restarting-when-trying-to-use-extra-args-solved/5425/2 "2017-02-06T07:41:42Z")

</div>

You’re sending a HTTPS request to a port that is expecting HTTP. Insecure registry is still HTTPS (but without verifying the certificate) unless you explicitly say `http://192.168.0.4:5000`.

---

<div class="post-metadata">

**Author:** ![foxmulder900](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/foxmulder900/32/2123_2.png) [@foxmulder900](https://forums.suse.com/u/foxmulder900)\
**Post date:** [February 6, 2017, 11:29pm UTC](https://forums.suse.com/t/user-docker-constantly-restarting-when-trying-to-use-extra-args-solved/5425/3 "2017-02-06T23:29:40Z")

</div>

Hm, thanks for the idea, but no luck.

The way I’m reading the Docker docs, it seems like I should be able to use http. I assumed setting the `args` in cloud-config.yml would accomplish the same thing described here: [https://docs.docker.com/registry/insecure/#/deploying-a-plain-http-registry](https://docs.docker.com/registry/insecure/#/deploying-a-plain-http-registry)  
but when I run `docker info` I don’t see my registry listed under “Insecure Registries”, so it feels like rancher isn’t passing the args to docker.

---

<div class="post-metadata">

**Author:** ![MaxL](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@MaxL](https://forums.suse.com/u/MaxL)\
**Post date:** [February 7, 2017, 7:54am UTC](https://forums.suse.com/t/user-docker-constantly-restarting-when-trying-to-use-extra-args-solved/5425/4 "2017-02-07T07:54:17Z")

</div>

Hello,

It’s ok for me with extra\_args and 0.7.1 :

> docker:  
> storage\_driver: overlay  
> restart: true  
> tls: false  
> tls\_args: [–tlsverify, --tlscacert=ca.pem, --tlscert=server-cert.pem, --tlskey=server-key.pem,‘-H=0.0.0.0:2376’]  
> extra\_args:   
> - --insecure-registry  
> - 10.194.150.79:5000

Max

---

<div class="post-metadata">

**Author:** ![foxmulder900](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/foxmulder900/32/2123_2.png) [@foxmulder900](https://forums.suse.com/u/foxmulder900)\
**Post date:** [February 7, 2017, 11:15pm UTC](https://forums.suse.com/t/user-docker-constantly-restarting-when-trying-to-use-extra-args-solved/5425/5 "2017-02-07T23:15:12Z")

</div>

Thanks Max!

Looking at your example, I noticed you were not providing the `daemon` arg. Removing that and using `extra_args` is now working as expected!
