# Connection refused on websocket exposed by a container

**URL:** <https://forums.suse.com/t/connection-refused-on-websocket-exposed-by-a-container/10243>\
**Category:** Rancher 1.x\
**Created:** [May 2, 2018, 1:28pm UTC](https://forums.suse.com/t/connection-refused-on-websocket-exposed-by-a-container/10243 "2018-05-02T13:28:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mterdjimi](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/mterdjimi/32/3928_2.png) [@mterdjimi](https://forums.suse.com/u/mterdjimi)\
**Post date:** [May 2, 2018, 1:28pm UTC](https://forums.suse.com/t/connection-refused-on-websocket-exposed-by-a-container/10243/1 "2018-05-02T13:28:15Z")

</div>

Hello, I am quite new to Rancher.  
I want to use rancher to automatize the deployment of my containers. The container consists in a simple jar which:

- Exposes a simple HTTP server (30060:6000/tcp)
- Opens a websocket, through HTTPS (30050:5000/tcp)

I am able to successfully start my container and connect to its internal HTTP server from any external client. However, I encounter a “connection refused” error when trying to connect to its websocket.

My container POST request body is the following:

```
{
"type": "container",
"name": "engine",
"imageUuid": engine:2,
"ports":["30060:6000/tcp", "30050:5000/tcp"]
}

```

The container already includes a certificate for the HTTPS websocket, valid for the domain _[mydomain.com](http://mydomain.com)_.  
From docker, I can work it out by specifying `--network-alias mydomain.com` ; however, I don’t know how to specify an alias from rancher.

Thanks in advance for your help,

MT

---

<div class="post-metadata">

**Author:** ![mterdjimi](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/mterdjimi/32/3928_2.png) [@mterdjimi](https://forums.suse.com/u/mterdjimi)\
**Post date:** [May 3, 2018, 8:40am UTC](https://forums.suse.com/t/connection-refused-on-websocket-exposed-by-a-container/10243/2 "2018-05-03T08:40:47Z")

</div>

After some research, I think it would work by setting up a network alias to my container, but I do not how to do it using Rancher. Any ideas ?
