"balena envs --application <myAppName>" throws Internal Server Error


#1

Hi,

I’ve been assessing openBalena for a couple of days now and I’ve got most things working using the getting started guide. (i.e. registering devices, pushing applications, moving devices between applications, upgrading applications, etc…). It’s all gravy!

I’ve experienced a few problems when setting environment variables though.

First off, here’s some basic system information for my setup (I just followed the getting started guide):
Server OS: Ubuntu 18.04 (AWS base AMI)
openBalena Server: 0.1.4
Balena CLI: 9.12.0

Now to the scenario:

RESIN_HOST_CONFIG variables
These are the steps I followed:

  1. Run balena envs --application <myAppName> before adding any environment variables. This returned a message stating (correctly) that there were no environment variables set yet.
  2. I added a few RESIN_HOST_CONFIG variables (specifically, I was using the balena-wpe project as a test). The exact commands were as follows, I know the first one is a dupe but I made a mistake when reading the istructions:

balena env add RESIN_HOST_CONFIG_gpu_mem_256 396 --application <myAppName>
balena env add RESIN_HOST_CONFIG_gpu_mem_256 128 --application <myAppName>
balena env add RESIN_HOST_CONFIG_gpu_mem_512 196 --application <myAppName>
balena env add RESIN_HOST_CONFIG_gpu_mem_1024 396 --application <myAppName>

  1. I didn’t get any errors when running the above commands and when checking the devices for the application, the env vars had been sent and set correctly.
  2. I ran the "balena envs --application " command again and this threw a BalenaRequestError: Request error: Internal Server Error

Now I’m stuck! I can’t find out how to interrogate the server side logs that might give me any additional information. I’ve tried sending more RESIN_HOST_CONFIG variables and again, these are set as expected. I’ve tried removing env vars using "balena env rm " commands and just guessing at the id, this didn’t throw an error but didn’t remove the env vars.

Is there any way for me to interrogate the server side logs to see if there’s more info that would point me in the right direction? Is this an issue that anyone else has found?


#3

experiencing the same issue…


#4

Yes, this is a known issue we’ve been working to fix. See the following thread for more info and workaround: Support for device environment variables