Why Error 500 + more

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 ?

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

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.

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]

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

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.

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.

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.

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?

  • 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

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/
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 ?

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 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

balena login

please run

DEBUG=1 balena push Ts_and_Ps

in this directory.

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

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

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! :wink:
Please advise what next?
Thank you again and my kind regards,
Roger

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.

[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
Now to explore it for the agricultural application we’re planning.
Thanks to all again, and best wishes.