# balena cli unable to delpoy

**URL:** <https://forums.balena.io/t/balena-cli-unable-to-delpoy/279102>\
**Category:** Product support\
**Tags:** balena-cli\
**Created:** [March 28, 2021, 8:19pm UTC](https://forums.balena.io/t/balena-cli-unable-to-delpoy/279102 "2021-03-28T20:19:03Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![mellerdaniel](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@mellerdaniel](https://forums.balena.io/u/mellerdaniel)\
**Post date:** [March 28, 2021, 8:19pm UTC](https://forums.balena.io/t/balena-cli-unable-to-delpoy/279102/1 "2021-03-28T20:19:03Z")

</div>

Having issues with the CLI.  
i’m with the latest CLI.  
balena --version

12.43.2  
obviously i have no connection issues.  
PS D:\Dev\mobile-hardware\device\> balena deploy milan-dev --debug  
[debug] new argv=[C:\Program Files\balena-cli\client\bin\node.exe,C:\Program Files\balena-cli\client\bin\run,deploy,milan-dev] length=4  
[Debug] Parsing input…  
[Debug] Loading project…  
[Debug] Resolving project…  
[Debug] docker-compose.yml file found at “D:\Dev\mobile-hardware\device”  
[Debug] Creating project…  
[Info] Everything is up to date (use --build to force a rebuild)  
[Info] Creating release…  
[Error] Deploy failed  
Oops something went wrong, please check your connection and try again.

Error: connect ETIMEDOUT 52.202.238.221:443  
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)  
From previous event:  
at processImmediate (internal/timers.js:461:21)  
From previous event:  
at Object.create (C:\Program Files\balena-cli\client\node\_modules\balena-release\build\api.js:35:20)  
at processTicksAndRejections (internal/process/task\_queues.js:97:5)  
at async exports.createRelease (C:\Program Files\balena-cli\client\build\utils\compose.js:113:40)  
at async deployProject (C:\Program Files\balena-cli\client\build\utils\compose\_ts.js:722:20)  
at async DeployCmd.deployProject (C:\Program Files\balena-cli\client\build\commands\deploy.js:142:27)  
at async DeployCmd.run (C:\Program Files\balena-cli\client\build\commands\deploy.js:46:25)  
at async DeployCmd.\_run (C:\Program Files\balena-cli\client\node\_modules@oclif\command\lib\command.js:43:20)  
at async Config.runCommand (C:\Program Files\balena-cli\client\node\_modules@oclif\config\lib\config.js:175:24)  
at async CustomMain.run (C:\Program Files\balena-cli\client\node\_modules@oclif\command\lib\main.js:27:9)  
at async CustomMain.\_run (C:\Program Files\balena-cli\client\node\_modules@oclif\command\lib\command.js:43:20)  
at async Promise.all (index 1)  
at async oclifRun (C:\Program Files\balena-cli\client\build\app.js:75:5)  
at async Object.run (C:\Program Files\balena-cli\client\build\app.js:88:9)

For further help or support, visit:

> **[balena CLI Documentation - Balena Documentation](https://www.balena.io/docs/reference/balena-cli/#support-faq-and-troubleshooting)**

---

<div class="post-metadata">

**Author:** ![srlowe](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/srlowe/32/2638_2.png) [@srlowe](https://forums.balena.io/u/srlowe)\
**Post date:** [April 2, 2021, 9:45am UTC](https://forums.balena.io/t/balena-cli-unable-to-delpoy/279102/4 "2021-04-02T09:45:44Z")

</div>

Hello, It looks like this problem is originating with either the network or our cloud builders. Is this still occurring?

---

<div class="post-metadata">

**Author:** ![mellerdaniel](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@mellerdaniel](https://forums.balena.io/u/mellerdaniel)\
**Post date:** [April 2, 2021, 9:58am UTC](https://forums.balena.io/t/balena-cli-unable-to-delpoy/279102/6 "2021-04-02T09:58:33Z")

</div>

yes it happens, sometimes it works when i switches networks but its not consitent.

---

<div class="post-metadata">

**Author:** ![srlowe](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/srlowe/32/2638_2.png) [@srlowe](https://forums.balena.io/u/srlowe)\
**Post date:** [April 2, 2021, 10:36am UTC](https://forums.balena.io/t/balena-cli-unable-to-delpoy/279102/7 "2021-04-02T10:36:45Z")

</div>

It seems that the most likely explanation for this is a network issue. I’m not aware of any similar reports from other users. Are you able to try deploying a different application? It would be useful to see if this happens regardless of app, in order to rule out possibilities.

---

<div class="post-metadata">

**Author:** ![mellerdaniel](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@mellerdaniel](https://forums.balena.io/u/mellerdaniel)\
**Post date:** [April 2, 2021, 10:40am UTC](https://forums.balena.io/t/balena-cli-unable-to-delpoy/279102/9 "2021-04-02T10:40:56Z")

</div>

Unable to upload to different apps - tried to four other apps (test,dev,stage,prod)

---

<div class="post-metadata">

**Author:** ![srlowe](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/srlowe/32/2638_2.png) [@srlowe](https://forums.balena.io/u/srlowe)\
**Post date:** [April 2, 2021, 10:44am UTC](https://forums.balena.io/t/balena-cli-unable-to-delpoy/279102/10 "2021-04-02T10:44:28Z")

</div>

Are those four apps all sharing the same project code? If so, I suggest creating a new app using a very simple project (e.g. linked below), and try deploying to that, to ensure that the issue is unrelated to the project.

> **[balena-io-examples/balena-node-hello-world](https://github.com/balena-io-examples/balena-node-hello-world)**
>
> Run a simple express server with balena. Contribute to balena-io-examples/balena-node-hello-world development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![mellerdaniel](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@mellerdaniel](https://forums.balena.io/u/mellerdaniel)\
**Post date:** [April 2, 2021, 10:45am UTC](https://forums.balena.io/t/balena-cli-unable-to-delpoy/279102/11 "2021-04-02T10:45:00Z")

</div>

my mistake, i did manage to deploy to stage now - and yes, they share same project code.

---

<div class="post-metadata">

**Author:** ![srlowe](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/srlowe/32/2638_2.png) [@srlowe](https://forums.balena.io/u/srlowe)\
**Post date:** [April 2, 2021, 10:47am UTC](https://forums.balena.io/t/balena-cli-unable-to-delpoy/279102/12 "2021-04-02T10:47:34Z")

</div>

Right, in that case it would be good to test the control case (the simple project) to assist with diagnosis.

---

<div class="post-metadata">

**Author:** ![mellerdaniel](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@mellerdaniel](https://forums.balena.io/u/mellerdaniel)\
**Post date:** [April 2, 2021, 10:49am UTC](https://forums.balena.io/t/balena-cli-unable-to-delpoy/279102/13 "2021-04-02T10:49:18Z")

</div>

i’m not sure why now its working, but now same app that wasnt working before, is working now, i didnt change anythihg… even didnt close the powershell window that i was deploying from.

---

<div class="post-metadata">

**Author:** ![srlowe](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/srlowe/32/2638_2.png) [@srlowe](https://forums.balena.io/u/srlowe)\
**Post date:** [April 2, 2021, 11:06am UTC](https://forums.balena.io/t/balena-cli-unable-to-delpoy/279102/14 "2021-04-02T11:06:25Z")

</div>

Everything seems to point to some kind of intermittent network issue. Let’s keep an eye on it. It might be worth trying the deploy from a different network (and maybe also a different computer), to rule out issues with local network, interfaces etc.

---

<div class="post-metadata">

**Author:** ![mellerdaniel](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@mellerdaniel](https://forums.balena.io/u/mellerdaniel)\
**Post date:** [April 2, 2021, 11:08am UTC](https://forums.balena.io/t/balena-cli-unable-to-delpoy/279102/16 "2021-04-02T11:08:19Z")

</div>

is there a way to reset things ? clear cache? i’m working most of the time on the same network and it really bothers the workflow.

---

<div class="post-metadata">

**Author:** ![tmigone](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/tmigone/32/2814_2.png) [@tmigone](https://forums.balena.io/u/tmigone)\
**Post date:** [April 2, 2021, 1:43pm UTC](https://forums.balena.io/t/balena-cli-unable-to-delpoy/279102/17 "2021-04-02T13:43:48Z")

</div>

Hi there, there are a couple CLI flags and commands you can try and see if it alleviates the problem (however based on the conversation so far the problem seems to be more related to a flaky network).

For your `balena deploy` command you can try:

- adding the `--no-cache` flag, this will instruct docker to not use layer caching when building
- adding the `--build` flag, this will force a rebuild before deploying

Another thing worth trying is to use `balena push` instead of `balena deploy`. This will build your project using our cloud builders (which are usually much faster). Push also accepts the `--no-cache` flag.
