# Validation failed in API: PortWrongFormat

**URL:** https://forums.suse.com/t/validation-failed-in-api-portwrongformat/1491
**Category:** Rancher 1.x
**Created:** [January 19, 2016, 12:05pm UTC](https://forums.suse.com/t/validation-failed-in-api-portwrongformat/1491 "2016-01-19T12:05:54Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![shakisha](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@shakisha](https://forums.suse.com/u/shakisha)
#### Post date: [January 19, 2016, 12:05pm UTC](https://forums.suse.com/t/validation-failed-in-api-portwrongformat/1491/1 "2016-01-19T12:05:54Z")

</div>

I have got two machines:

10.0.1.41 - rancher server and host with some docker containers inside

10.0.1.30 - rancher host without any container (only rancher-agent in)

Cloning a container from 10.0.1.41 to 10.0.1.30 it’s giving me the “Validation failed in API: PortWrongFormat” error.

How to debug, fix, solve this?

---

<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: [January 19, 2016, 3:58pm UTC](https://forums.suse.com/t/validation-failed-in-api-portwrongformat/1491/2 "2016-01-19T15:58:38Z")

</div>

What version of Rancher are you using?

Are you cloning a service or container?

Also, what do you mean by “cloning a container from host A to Host B”? How are you doing that?

---

<div class="post-metadata">

### Author: ![shakisha](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@shakisha](https://forums.suse.com/u/shakisha)
#### Post date: [January 19, 2016, 4:13pm UTC](https://forums.suse.com/t/validation-failed-in-api-portwrongformat/1491/3 "2016-01-19T16:13:53Z")

</div>

Hi Denise,

i’m using version 0.51.0, cloning a container by into “infrastucture”, standalone containers, down pointing arrow, and clone selection.

---

<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: [January 22, 2016, 4:59am UTC](https://forums.suse.com/t/validation-failed-in-api-portwrongformat/1491/4 "2016-01-22T04:59:06Z")

</div>

I am unable to reproduce.

How are you cloning from Host A to Host B? How do you know that your are making that change?

---

<div class="post-metadata">

### Author: ![shakisha](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@shakisha](https://forums.suse.com/u/shakisha)
#### Post date: [January 25, 2016, 4:21pm UTC](https://forums.suse.com/t/validation-failed-in-api-portwrongformat/1491/5 "2016-01-25T16:21:41Z")

</div>

i’m cloning a container by going into “infrastucture”, “hosts” and selecting a container into “standalone containers” side, and clicking on clone, look below image 🙂

 ![](https://us1.discourse-cdn.com/flex022/uploads/suse/original/1X/cc64005fc8cbf7683bfcaf1207d9d1f06397fd4c.png)

---

<div class="post-metadata">

### Author: ![shakisha](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@shakisha](https://forums.suse.com/u/shakisha)
#### Post date: [January 27, 2016, 4:31pm UTC](https://forums.suse.com/t/validation-failed-in-api-portwrongformat/1491/6 "2016-01-27T16:31:09Z")

</div>

Denise, are you there?

---

<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: [January 27, 2016, 7:25pm UTC](https://forums.suse.com/t/validation-failed-in-api-portwrongformat/1491/7 "2016-01-27T19:25:46Z")

</div>

Yes, we have been a bit busy with getting v0.56.0 and v0.56.1 out.

I was finally able to reproduce and have filed this Github issue. Is there a reason why you are using standalone containers versus services? Using services (even scale of 1) allows you to leverage a lot more of the Rancher features.

> <https://github.com/rancher/rancher/issues/3431>
>
> From http://forums.suse.com/t/validation-failed-in-api-portwrongformat/1491/5
> Steps to Reproduce:
> Create a standalone container with a port map
> Clone the container and try to save
> Result: Errors with "Validation failed...

---

<div class="post-metadata">

### Author: ![shakisha](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@shakisha](https://forums.suse.com/u/shakisha)
#### Post date: [January 27, 2016, 8:53pm UTC](https://forums.suse.com/t/validation-failed-in-api-portwrongformat/1491/8 "2016-01-27T20:53:53Z")

</div>

Hi Denise,

thanks for your answer, i’m really glad to receive that.  
Anyway i need to understand better; how can i use services?

I create my images from a dockerfile (building) and i use that with a docker-compose.yml.

Can you give me some indications?

Thank you really much.

---

<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: [January 27, 2016, 9:12pm UTC](https://forums.suse.com/t/validation-failed-in-api-portwrongformat/1491/9 "2016-01-27T21:12:54Z")

</div>

In order to launch a docker-compose file into Rancher, you’ll need to use rancher-compose. There are many links within the rancher-compose section of the docs page.  
[http://docs.rancher.com/rancher/rancher-compose/](http://docs.rancher.com/rancher/rancher-compose/)

You can also read more about the concept of adding services:

[http://docs.rancher.com/rancher/rancher-ui/applications/stacks/adding-services/](http://docs.rancher.com/rancher/rancher-ui/applications/stacks/adding-services/)

---

<div class="post-metadata">

### Author: ![shakisha](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@shakisha](https://forums.suse.com/u/shakisha)
#### Post date: [January 27, 2016, 9:21pm UTC](https://forums.suse.com/t/validation-failed-in-api-portwrongformat/1491/10 "2016-01-27T21:21:53Z")

</div>

Thanks for your answer, but how i can add images to rancher building them from a dockerfile?

---

<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: [January 27, 2016, 9:33pm UTC](https://forums.suse.com/t/validation-failed-in-api-portwrongformat/1491/11 "2016-01-27T21:33:29Z")

</div>

This link is in the link I directly sent you.  
[http://docs.rancher.com/rancher/rancher-compose/#builds](http://docs.rancher.com/rancher/rancher-compose/#builds)

Also, I mentioned that there are many other sections within the “Rancher-Compose” section of the navigation bar, please try to look at them as they will answer many of your questions.

Here’s one of them that you are asking about.  
[http://docs.rancher.com/rancher/rancher-compose/build/](http://docs.rancher.com/rancher/rancher-compose/build/)
