# Windows habitat issue for version 0.69

**URL:** <https://discourse.chef.io/t/windows-habitat-issue-for-version-0-69/19380>\
**Category:** Habitat Help\
**Created:** [March 8, 2019, 2:57pm UTC](https://discourse.chef.io/t/windows-habitat-issue-for-version-0-69/19380 "2019-03-08T14:57:56Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![manojbison](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@manojbison](https://discourse.chef.io/u/manojbison)\
**Post date:** [March 8, 2019, 2:57pm UTC](https://discourse.chef.io/t/windows-habitat-issue-for-version-0-69/19380/1 "2019-03-08T14:57:56Z")

</div>

we are facing below issue during windows habitat builds

library.jenkins-habitat-lib.version: master  
BRANCH\_NAME: master  
C:\Program Files\docker\docker.EXE: Error response from daemon: Invalid container name

can someone help me out ,please let me know what to do

please let me know how to upgrade and downgrade versions in windows

---

<div class="post-metadata">

**Author:** ![eeyun1](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/eeyun1/32/2658_2.png) [@eeyun1](https://discourse.chef.io/u/eeyun1)\
**Post date:** [March 8, 2019, 3:55pm UTC](https://discourse.chef.io/t/windows-habitat-issue-for-version-0-69/19380/2 "2019-03-08T15:55:27Z")

</div>

This is strange, it doesn’t look like you’re even getting to the point of a build, was this ever working for you? v0.69 is a bit old at this point.

---

<div class="post-metadata">

**Author:** ![Matt\_Wrock](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/matt_wrock/32/3394_2.png) [@Matt\_Wrock](https://discourse.chef.io/u/Matt_Wrock)\
**Post date:** [March 8, 2019, 6:26pm UTC](https://discourse.chef.io/t/windows-habitat-issue-for-version-0-69/19380/3 "2019-03-08T18:26:51Z")

</div>

I know I have seen this before when I have either inadvertently added an extra arg in my `hab pkg build` or in a `HAB_DOCKER_OPTS` variable in such a way that causes the pass through to docker to make `docker run` think it needs to start a named container.

Can we see the actual `hab pkg build` command you are invoking and also check your `HAB_DOCKER_OPTS` variable.

---

<div class="post-metadata">

**Author:** ![manojbison](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@manojbison](https://discourse.chef.io/u/manojbison)\
**Post date:** [March 9, 2019, 4:21am UTC](https://discourse.chef.io/t/windows-habitat-issue-for-version-0-69/19380/4 "2019-03-09T04:21:40Z")

</div>

Before its working fine but recentli all builds failed due to the invalid container name error. We are planning to upgrade hab version 0.72 but upgrade is the only solution?

Please let me know how to upgrade and downgrade habitaat in windows

---

<div class="post-metadata">

**Author:** ![Matt\_Wrock](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/matt_wrock/32/3394_2.png) [@Matt\_Wrock](https://discourse.chef.io/u/Matt_Wrock)\
**Post date:** [March 12, 2019, 2:01am UTC](https://discourse.chef.io/t/windows-habitat-issue-for-version-0-69/19380/5 "2019-03-12T02:01:59Z")

</div>

I’m hesitant to say that upgrading is the only solution since I cannot reproduce on version 0.69.0 locally. More information of the hab command your CI is calling to invoke the build would help us to better zero in on the problem. Also helpful is if you invoke the build with the `RUST_LOG` environment variable set to `debug`. This outputs the exact arguments sent to `docker.exe` and would help identify how a container name is being passed to docker.

Regarding upgrade/downgrade: if you are on a system that already has habitat installed, you can downgrade or upgrade to any version of Habitat by running `hab pkg install core/hab/<VERSION_NUMBER>`. For example, to upgrade to `0.72.0`, you would run `hab pkg install core/hab/0.72.0`. Then you cab invoke a build under that version by using the absolute path of its `hab.exe` binary. This binary would live in `c:\hab\pkgs\core\hab\0.72.0\<RELEASE NUMBER>\bin\`. You could also add that directory to your path and then `hab` should resolve to it.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![manojbison](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@manojbison](https://discourse.chef.io/u/manojbison)\
**Post date:** [March 12, 2019, 5:09pm UTC](https://discourse.chef.io/t/windows-habitat-issue-for-version-0-69/19380/6 "2019-03-12T17:09:48Z")

</div>

Thanks so much for you reply mwrock, appreciate it

```
 After installing the package where i have to set the path? Bcoz still i see my old pkg version 

```

If am upgrading in prod what steps i need take care?

---

<div class="post-metadata">

**Author:** ![Matt\_Wrock](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/matt_wrock/32/3394_2.png) [@Matt\_Wrock](https://discourse.chef.io/u/Matt_Wrock)\
**Post date:** [March 12, 2019, 6:48pm UTC](https://discourse.chef.io/t/windows-habitat-issue-for-version-0-69/19380/7 "2019-03-12T18:48:37Z")

</div>

Since it sounds like it is Jenkins that invokes Habitat, you will want to set the PATH at the machine level. With powershell you can do this with:

```auto
[Environment]::SetEnvironmentVariable("PATH", "[DESIRED PATH]", "Machine")

```

Then restart your jenkins process.

---

<div class="post-metadata">

**Author:** ![manojbison](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@manojbison](https://discourse.chef.io/u/manojbison)\
**Post date:** [March 13, 2019, 8:21pm UTC](https://discourse.chef.io/t/windows-habitat-issue-for-version-0-69/19380/8 "2019-03-13T20:21:34Z")

</div>

I want to make it clear. Am doing upgrade in jenkins windows slave from hab version 0.69 to 0. 72 and we are using chocolatey and i have upgraded with the command choco upgrade hab - - version 0.72.

After execution Now its showing hab version 0.72. Apart from that i have to do anything in slave to invoke jenkins job builds with hab version 0.72? There will be any mpact on the jobs? 0. 72 relies on docker?

---

<div class="post-metadata">

**Author:** ![Matt\_Wrock](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/matt_wrock/32/3394_2.png) [@Matt\_Wrock](https://discourse.chef.io/u/Matt_Wrock)\
**Post date:** [March 14, 2019, 12:08am UTC](https://discourse.chef.io/t/windows-habitat-issue-for-version-0-69/19380/9 "2019-03-14T00:08:28Z")

</div>

That is correct. There should not be any other impact. Had I known you were using chocolatey I would have suggested that you just use `choco upgrade habitat --version 0.72.0 -y` which would have handled the path for you.

A habitat build only relies on docker if you specifically pass `-D` to `hab pkg build`. Without that docker should not be invoked.

---

<div class="post-metadata">

**Author:** ![manojbison](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@manojbison](https://discourse.chef.io/u/manojbison)\
**Post date:** [March 14, 2019, 11:08am UTC](https://discourse.chef.io/t/windows-habitat-issue-for-version-0-69/19380/10 "2019-03-14T11:08:45Z")

</div>

hi i upgraded , but now its not able to find artifact pls find the below error  
we are using habitat executer plugin  
Setting Directory: C:\hab\svc\jenkins-slave\data\workspace\workspace\test-hab/results/  
null

before we gave {workspace}/results/last\_build.env to find artifact but now its taking only {workspace}/results/last\_build.ps1 any reason ?

while running promote stage this path script is executing and showing error  
C:\hab\svc\jenkins-slave\data\workspace\workspace\test-hab@tmp\durable-876282e7\powershellScript.ps1

error: The following required arguments were not provided: \<CHANNEL\> USAGE: hab.exe pkg promote [OPTIONS] \<PKG\_IDENT\> \<CHANNEL\> For more information try --help

---

<div class="post-metadata">

**Author:** ![Matt\_Wrock](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/matt_wrock/32/3394_2.png) [@Matt\_Wrock](https://discourse.chef.io/u/Matt_Wrock)\
**Post date:** [March 14, 2019, 9:09pm UTC](https://discourse.chef.io/t/windows-habitat-issue-for-version-0-69/19380/11 "2019-03-14T21:09:03Z")

</div>

Several versions back we changed the `.env` generated files to `.ps1` for windows builds so that they could actually be executed.

Regarding the missing `<CHANNEL>`, can you provide the `hab pkg promote` command you are executing?

---

<div class="post-metadata">

**Author:** ![manojbison](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@manojbison](https://discourse.chef.io/u/manojbison)\
**Post date:** [March 15, 2019, 9:10am UTC](https://discourse.chef.io/t/windows-habitat-issue-for-version-0-69/19380/12 "2019-03-15T09:10:14Z")

</div>

thanks so much for your reply mwrock … now working properly i have to change file extention from env to ps1 … thanks for your support 🙂

---

<div class="post-metadata">

**Author:** ![Matt\_Wrock](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/matt_wrock/32/3394_2.png) [@Matt\_Wrock](https://discourse.chef.io/u/Matt_Wrock)\
**Post date:** [March 15, 2019, 8:51pm UTC](https://discourse.chef.io/t/windows-habitat-issue-for-version-0-69/19380/13 "2019-03-15T20:51:44Z")

</div>

Fantastic! Glad things are working!!
