# Rancher Installation Issue

**URL:** <https://forums.suse.com/t/rancher-installation-issue/123>\
**Category:** Rancher 1.x\
**Created:** [July 19, 2015, 10:01pm UTC](https://forums.suse.com/t/rancher-installation-issue/123 "2015-07-19T22:01:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ApfelUser](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/apfeluser/32/52_2.png) [@ApfelUser](https://forums.suse.com/u/ApfelUser)\
**Post date:** [July 19, 2015, 10:01pm UTC](https://forums.suse.com/t/rancher-installation-issue/123/1 "2015-07-19T22:01:44Z")

</div>

I did install rancher with:

```auto
docker run -d --restart=always -p 8000:8080 --name=rancher-server \
-e "CATTLE_API_ALLOW_CLIENT_OVERRIDE=true" \
-e "CATTLE_HOST_API_PROXY_SCHEME=wss" rancher/server

```

and then proxied it from another NGINX server with:

```auto
upstream rancher {
    server rancher-server:8000;
}

server {
    listen 443 ssl;
    server_name rancher.domain.tld;
    ssl_certificate /data/ssl/domain.tld.crt;
    ssl_certificate_key /data/ssl/domain.tld.key;

    proxy_buffering off;
    proxy_buffer_size 512;

    location / {
        proxy_set_header X-API-request-url $scheme://<host>$request_uri;
        proxy_pass http://rancher;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

server {
    listen 80;
    server_name rancher.domain.tld;
    return 301 https://$server_name$request_uri;
}

```

I then had this error in the chrome console when I accessed **rancher.domain.tld:**

```auto
OPTIONS https://%3Chost%3E/v1/projects?all=true&limit=1000 net::ERR_NAME_NOT_RESOLVED

```

and the logs were full with:

```auto
time="2015-07-18T11:38:33Z" level=info msg="Starting go-machine-service..." gitcommit=102d311 
time="2015-07-18T11:38:33Z" level=error msg="Unable to create EventRouter" Err="Get https://<host>/v1/schemas: dial tcp: lookup <host>: no such host" 
time="2015-07-18T11:38:33Z" level=info msg="Exiting go-machine-service..." 

```

I could fix this by replacing `<host>` with my hostname.

But now I got 2 different additional issues now. I am getting this error in the **rancher-server** console when I select the standard “rancher.mydomain.tld” as Host Registration:

```auto
time="2015-07-18T14:50:58Z" level=error msg="Unable to start EventRouter" Err="websocket: bad handshake" 
time="2015-07-18T14:50:58Z" level=info msg="Exiting go-machine-service..." 
time="2015-07-18T14:50:59Z" level=info msg="Setting log level" logLevel=info 
time="2015-07-18T14:50:59Z" level=info msg="Starting go-machine-service..." gitcommit=102d311 
time="2015-07-18T14:50:59Z" level=info msg="Initializing event router" workerCount=10 
time="2015-07-18T14:51:00Z" level=error msg="Failed to subscribe to events." error="websocket: bad handshake" subscribeUrl="ws://rancher.mydomain.tld/v1/subscribe?eventNames=physicalhost.create%3Bhandler%3DgoMachineService&eventNames=physicalhost.bootstrap%3Bhandler%3DgoMachineService&eventNames=physicalhost.remove%3Bhandler%3DgoMachineService&eventNames=ping%3Bhandler%3DgoMachineService"

```

Problem = Not using HTTPS

This happens about 2 times every second.

This error doesn’t come up when I don’t select the standard **rancher.mydomain.tld** and instead manually put **[https://rancher.mydomain.tld](https://rancher.mydomain.tld)** into the Host Registration. Instead this one is showing in the **rancher-agent** console:

```auto
time="2015-07-18T14:59:43Z" level="info" msg="Starting event router." 
time="2015-07-18T14:59:43Z" level="info" msg="Watching state directory: /var/lib/rancher/state/containers" 
time="2015-07-18T14:59:43Z" level="info" msg="Processing event: &docker.APIEvents{Status:\"start\", ID:\"2a6baa8257e30382bb21022e0904cb1dbb4dabe512b6ba0d464a344351c3e92e\", From:\"-simulated-\", Time:0}" 
time="2015-07-18T14:59:43Z" level="info" msg="Connecting to proxy." url="wss://https://rancher.mydomain.tld/v1/connectbackend?token=eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0MzcyMzE4ODQsInN1YiI6ImNhdHRsZSIsImlzcyI6Imh0dHA6XC9cL2NhdHRsZS5pbyIsInJlcG9ydGVkVXVpZCI6IjI1MzA0ZGNmLWMzOWEtNDcwNS1iMDU5LTUxMTIyYjJhZTJhZSIsImlhdCI6MTQzNzIzMTU4NCwia2lkIjoiZGVmYXVsdCJ9.cnr734y-o5youdnFr9xYd2L7vLjxp6T8WuA9YlEsY-oU9dQzyC0BYsCY2k9ln5LX--hSf79nxH4qPPBhkuHekQidH2TBuIwYBFW8Izm396HfMlGm3qE2tT-sYyJ2ifIsqSN6KhlrO8vtrRpqGTbI3XwtvEiXgu9DxjbiB0QKtkkOfmNtZCW2FhQ7vhIg83hckjAYrH4AkflkE0rTgDrZC_mYu7iIljdQZMLmoAZPoyc4hPtQe7Z1HVQBcIfZdxNOgLu3E-eJPeOsYliXG4UJcGo1Wjp_P_mprkdNVt2f4dMTLAXeADonruc_RAfWURBuk4wE--kHGrJ9_nTu5wwKnw" 
time="2015-07-18T14:59:43Z" level="fatal" msg="Failed to connect to proxy." error="dial tcp 46.101.xxx.xxx:0: connection refused"

```

Problem = `wss://https://`

That is why I am kind of in a dilemma because no matter what I do, there will occur an error on one of the both sides **rancher-server** and **rancher-agent**.

Has anybody an idea on how to fix this?

[Related GitHub Issue](https://github.com/rancher/rancher/issues/1580)

Cheers,

ApfelUser

---

<div class="post-metadata">

**Author:** ![cjellick](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/cjellick/32/2876_2.png) [@cjellick](https://forums.suse.com/u/cjellick)\
**Post date:** [July 20, 2015, 2:51pm UTC](https://forums.suse.com/t/rancher-installation-issue/123/2 "2015-07-20T14:51:05Z")

</div>

Thanks for reporting @ApfelUser. I’ll look into this today.

---

<div class="post-metadata">

**Author:** ![cjellick](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/cjellick/32/2876_2.png) [@cjellick](https://forums.suse.com/u/cjellick)\
**Post date:** [July 20, 2015, 3:40pm UTC](https://forums.suse.com/t/rancher-installation-issue/123/3 "2015-07-20T15:40:37Z")

</div>

@ApfelUser I’ve responded to the github issues you submitted. Rather than duplicate my response, I’ll just ask you to take a look at the github issue.

> <https://github.com/rancher/rancher/issues/1580>
>
> I did install rancher with:
> docker run -d --restart=always -p 8000:8080 --name=rancher-server \\
> \-e "CATTLE\_API\_ALLOW\_CLIENT\_OVERRIDE=true" \\
> \-e "CATTLE\_HOST\_API\_PROXY\_SCHEME=wss" rancher/server
> and then proxied it from another...

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [July 20, 2015, 4:07pm UTC](https://forums.suse.com/t/rancher-installation-issue/123/4 "2015-07-20T16:07:31Z")

</div>

I will be closing this topic so that all responses can go into the GitHub issue.

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [July 20, 2015, 4:07pm UTC](https://forums.suse.com/t/rancher-installation-issue/123/5 "2015-07-20T16:07:52Z")

</div>


