# Why Error 500 + more

**URL:** <https://forums.balena.io/t/why-error-500-more/118333>\
**Category:** Product support\
**Created:** [May 22, 2020, 1:02pm UTC](https://forums.balena.io/t/why-error-500-more/118333 "2020-05-22T13:02:09Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![roj](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/roj/32/3646_2.png) [@roj](https://forums.balena.io/u/roj)\
**Post date:** [May 22, 2020, 1:02pm UTC](https://forums.balena.io/t/why-error-500-more/118333/1 "2020-05-22T13:02:09Z")

</div>

Why am I now receiving this error message on public URL screen: tunnelling socket could not be established = 500  
And this on the CLI when pushing code:  
Error: no “Dockerfile[._]", “docker-compose.yml” or “package.json” file  
found in source folder “.”  
ExpectedError: Error: no "Dockerfile[._]”, “docker-compose.yml” or “package.json” file  
Something has drastically changed - but what ?

---

<div class="post-metadata">

**Author:** ![MTolba](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mtolba/32/3894_2.png) [@MTolba](https://forums.balena.io/u/MTolba)\
**Post date:** [May 22, 2020, 1:22pm UTC](https://forums.balena.io/t/why-error-500-more/118333/6 "2020-05-22T13:22:56Z")

</div>

Hey,  
We just tested public device URL on one of our testing devices and it worked correctly.  
What version of the CLI are you using? Could you please try to enable debugging by running this DEBUG=1 balena push

---

<div class="post-metadata">

**Author:** ![roj](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/roj/32/3646_2.png) [@roj](https://forums.balena.io/u/roj)\
**Post date:** [May 22, 2020, 1:43pm UTC](https://forums.balena.io/t/why-error-500-more/118333/8 "2020-05-22T13:43:13Z")

</div>

Many thanks for your response.  
CLI version 11.35.2  
roj$ DEBUG=1 balena push  
[debug] original argv0="/usr/local/lib/balena-cli/bin/node" argv=[/usr/local/lib/balena-cli/bin/node,/usr/local/lib/balena-cli/bin/run,push] length=3  
Missing applicationOrDevice

Error: Missing applicationOrDevice  
at /usr/local/lib/balena-cli/node\_modules/capitano/build/signature.js:150:29  
at /usr/local/lib/balena-cli/node\_modules/capitano/node\_modules/async/lib/async.js:181:20  
at Immediate.iterate [as \_onImmediate] (/usr/local/lib/balena-cli/node\_modules/capitano/node\_modules/async/lib/async.js:262:13)  
at runCallback (timers.js:705:18)  
at tryOnImmediate (timers.js:676:5)  
at processImmediate (timers.js:658:5)  
at process.topLevelDomainCallback (domain.js:126:23)  
From previous event:  
at runCommand (/usr/local/lib/balena-cli/build/app-capitano.js:79:20)  
at Object.run (/usr/local/lib/balena-cli/build/app-capitano.js:89:41)  
at routeCliFramework (/usr/local/lib/balena-cli/build/preparser.js:47:79)  
at process.\_tickCallback (internal/process/next\_tick.js:68:7)  
at Function.Module.runMain (internal/modules/cjs/loader.js:832:11)  
at startup (internal/bootstrap/node.js:283:19)  
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)  
Thanks and regards.

---

<div class="post-metadata">

**Author:** ![MTolba](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mtolba/32/3894_2.png) [@MTolba](https://forums.balena.io/u/MTolba)\
**Post date:** [May 22, 2020, 1:47pm UTC](https://forums.balena.io/t/why-error-500-more/118333/9 "2020-05-22T13:47:02Z")

</div>

Hey,  
Nice to hear from you again!  
You just forgot to add your application name so the command should be DEBUG=1 balena push [your application name]

---

<div class="post-metadata">

**Author:** ![roj](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/roj/32/3646_2.png) [@roj](https://forums.balena.io/u/roj)\
**Post date:** [May 22, 2020, 1:52pm UTC](https://forums.balena.io/t/why-error-500-more/118333/10 "2020-05-22T13:52:41Z")

</div>

Oops, sorry! Strange, it worked the other day. Here it is:  
roj$ DEBUG=1 balena push Ts\_and\_Ps  
[debug] original argv0="/usr/local/lib/balena-cli/bin/node" argv=[/usr/local/lib/balena-cli/bin/node,/usr/local/lib/balena-cli/bin/run,push,Ts\_and\_Ps] length=4  
[debug] Using . as build source  
Error: no “Dockerfile[.\*]”, “docker-compose.yml” or “package.json” file  
found in source folder “.”

ExpectedError: Error: no “Dockerfile[.\*]”, “docker-compose.yml” or “package.json” file  
found in source folder “.”  
at validateProjectDirectory (/usr/local/lib/balena-cli/build/utils/compose\_ts.js:317:19)  
From previous event:  
at runCommand (/usr/local/lib/balena-cli/build/app-capitano.js:79:20)  
at Object.run (/usr/local/lib/balena-cli/build/app-capitano.js:89:41)  
at routeCliFramework (/usr/local/lib/balena-cli/build/preparser.js:47:79)  
at process.\_tickCallback (internal/process/next\_tick.js:68:7)  
at Function.Module.runMain (internal/modules/cjs/loader.js:832:11)  
at startup (internal/bootstrap/node.js:283:19)  
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)  
Cheers

---

<div class="post-metadata">

**Author:** ![MTolba](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mtolba/32/3894_2.png) [@MTolba](https://forums.balena.io/u/MTolba)\
**Post date:** [May 22, 2020, 2:02pm UTC](https://forums.balena.io/t/why-error-500-more/118333/14 "2020-05-22T14:02:53Z")

</div>

Hey,

Could you please make sure that you are pushing form the correct directory? the directory that contains the docker file and docker-compose?  
Have you changed anything recently because you mentioned it was working before? It is working correctly on our end so I’m trying to narrow down the possibilities to figure out the problem with you.

---

<div class="post-metadata">

**Author:** ![roj](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/roj/32/3646_2.png) [@roj](https://forums.balena.io/u/roj)\
**Post date:** [May 22, 2020, 2:18pm UTC](https://forums.balena.io/t/why-error-500-more/118333/16 "2020-05-22T14:18:58Z")

</div>

Hi again,  
I’m not sure where you would find these as nothing showing here:  
roj$ ls -a /Users/roj/.balena

. … token

roj$ ls -a /Users/roj/BalenaProjects

ls: /Users/roj/BalenaProjects: No such file or directory

roj$ ls -a /Users/roj/.balena/cache

ls: /Users/roj/.balena/cache: No such file or directory

roj$ ls -a /Users/roj/.balena/bin

ls: /Users/roj/.balena/bin: No such file or directory

Thanks again.

---

<div class="post-metadata">

**Author:** ![MTolba](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mtolba/32/3894_2.png) [@MTolba](https://forums.balena.io/u/MTolba)\
**Post date:** [May 22, 2020, 2:30pm UTC](https://forums.balena.io/t/why-error-500-more/118333/20 "2020-05-22T14:30:58Z")

</div>

Hey,  
What application are you trying to push? Could you go to the application directory and run `ls -a` to see if the docker file is there on not?  
Have you downloaded an application from Github into your BalenaProjects folder? If yes. Please go inside the application directory and run `ls -a`. You should find a docker file, docker-compose. Then try to push your application.

---

<div class="post-metadata">

**Author:** ![roj](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/roj/32/3646_2.png) [@roj](https://forums.balena.io/u/roj)\
**Post date:** [May 22, 2020, 2:45pm UTC](https://forums.balena.io/t/why-error-500-more/118333/22 "2020-05-22T14:45:45Z")

</div>

My balena-sense project is named Ts\_and\_Ps  
I keep getting error: tunnelling socket cannot be established = 500  
I cannot find the application directory. Please advise how?

---

<div class="post-metadata">

**Author:** ![MTolba](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mtolba/32/3894_2.png) [@MTolba](https://forums.balena.io/u/MTolba)\
**Post date:** [May 22, 2020, 2:57pm UTC](https://forums.balena.io/t/why-error-500-more/118333/23 "2020-05-22T14:57:42Z")

</div>

- Have you downloaded your balena sense from Github?
- Where have you downloaded your balena tense project?
- Have you downloaded it to your BalenaProjects folder?
- Could you please go to your BalenaProjects folder and run `ls -a`?
- You can check your defaults downloads folder also

---

<div class="post-metadata">

**Author:** ![roj](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/roj/32/3646_2.png) [@roj](https://forums.balena.io/u/roj)\
**Post date:** [May 22, 2020, 3:22pm UTC](https://forums.balena.io/t/why-error-500-more/118333/25 "2020-05-22T15:22:08Z")

</div>

Balena-sense was downloaded from GitHub and the balena-sense project from your own website: [https://www.balena.io/blog/build-an-environment-and-air-quality-monitor-with-raspberry-pi/](https://www.balena.io/blog/build-an-environment-and-air-quality-monitor-with-raspberry-pi/)  
I am unsure as to how to get to the Balena Projects folder as I am running the Raspberry Pi headless.  
What would be the ssh address and password please with it now running Balena OS ?

---

<div class="post-metadata">

**Author:** ![AlidaOdendaal](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/alidaodendaal/32/1641_2.png) [@AlidaOdendaal](https://forums.balena.io/u/AlidaOdendaal)\
**Post date:** [May 22, 2020, 4:32pm UTC](https://forums.balena.io/t/why-error-500-more/118333/27 "2020-05-22T16:32:00Z")

</div>

Hi @roj

I’ve taken over from MTolba, who was assisting you before.

Let me explain a bit more what he was asking: I’m assuming that you’ve followed the instructions at the link you pasted? In that blog post, under “Software required”, it is stated that you need a clone of the [balena-sense](https://github.com/balenalabs/balena-sense) project on Github. The idea is that you clone this source code to your local machine, from where `balena push` will push it to the balenaCloud builders, and deploy it to your device.

So we’re asking you to open a terminal on your local machine (are you running Linux?) and navigate to the cloned folder (most likely it will be called `balena-sense`). Assuming that you’ve already logged in with

```auto
balena login

```

please run

```auto
DEBUG=1 balena push Ts_and_Ps

```

in this directory.

If this gives the same error you reported previously, please run

```auto
ls -a

```

in the same directory, and send us the output. This will help us determine why it seems that no Dockerfile was found to be used for the build.

I hope this helps, and that it makes sense!

Thank you, and kind regards  
Alida

---

<div class="post-metadata">

**Author:** ![roj](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/roj/32/3646_2.png) [@roj](https://forums.balena.io/u/roj)\
**Post date:** [May 22, 2020, 5:44pm UTC](https://forums.balena.io/t/why-error-500-more/118333/28 "2020-05-22T17:44:25Z")

</div>

Hi Alida,  
Thanks very much for your response.  
WOW! the DEBUG was very impressive and was well over a minute in running and stated ‘success.’ And it did not give the same error. In fact no errors! But I ran ls -a and the output is:  
balena-sense roj$ ls -a  
. .github CONTRIBUTING.md VERSION images sensor  
… .gitignore LICENSE docker-compose.yml influxdb telegraf  
.git CHANGELOG.md README.md grafana repo.yml  
I assume this is what you were hoping for and that it makes sense! 😉  
Please advise what next?  
Thank you again and my kind regards,  
Roger

---

<div class="post-metadata">

**Author:** ![dtischler](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/dtischler/32/2483_2.png) [@dtischler](https://forums.balena.io/u/dtischler)\
**Post date:** [May 22, 2020, 10:01pm UTC](https://forums.balena.io/t/why-error-500-more/118333/29 "2020-05-22T22:01:55Z")

</div>

Roger, based on your description, it sounds like you actually did now push the code properly to the device. In that case, if that is indeed correct, I think you are probably at the point of being able to view your data on the Dashboard. In the blog post, if you go to the “Viewing the dashboard” section of the guide, you can continue along and view your data. Thanks.

---

<div class="post-metadata">

**Author:** ![roj](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/roj/32/3646_2.png) [@roj](https://forums.balena.io/u/roj)\
**Post date:** [May 23, 2020, 5:18pm UTC](https://forums.balena.io/t/why-error-500-more/118333/31 "2020-05-23T17:18:56Z")

</div>

[SOLVED]  
Many thanks to all the Balena team who helped on this.  
The problem turned out to be a corrupted Balena OS on the RPi. Reason unknown.  
Reinstalled it for using Envira+ and set up a new app’ from the start and it works fine. See:  
[https://595cf2a702595d9612abdf74424f88f6.balena-devices.com/d/Af5gRDiRk/enviroplus?orgId=1&refresh=10s&from=1590252696706&to=1590252996706](https://595cf2a702595d9612abdf74424f88f6.balena-devices.com/d/Af5gRDiRk/enviroplus?orgId=1&refresh=10s&from=1590252696706&to=1590252996706)  
Now to explore it for the agricultural application we’re planning.  
Thanks to all again, and best wishes.
