Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPENC3_CLOUD environment variable is required (RuntimeError), when building Bridge support in OpenC3\COSMOS #304

Closed
jurgensymynck opened this issue Dec 2, 2022 · 6 comments · Fixed by #320
Assignees
Labels
bug Something isn't working

Comments

@jurgensymynck
Copy link

Describe the bug
See issue, #285 that deals with the exact same error, but for the OpenC3/COSMOS-project way of installing building and running COSMOS, not theOpenC3/COSMOS way as is the case here:

To Reproduce

  1. start with clean install of OpenC3/COSMOS (not OpenC3/COSMOS-project) in folder c:\OpenC3
  2. using git, reset master branch to tag '5.1.1', the latest stable version at this time.
  3. edit .env, remove OPENC3_DEMO line, set OPENC3_TAG=5.1.1. Leave rest as is.
  4. Proceed to steps to build Bridge support. Super abriged version below, relevant tickets here: Document Using COSMOS Bridges BallAerospace/COSMOS#1508
    • Requires a host Ruby installation (Ruby 3) including the devkit!
    • set RUBY.exe in system path? PATH = …;c:\ruby\bin;…
    • set host environment variable RUBYLIB= C:\openc3\openc3\lib
    • set host environment variable RUBYGEMS_URL=https://rubygems.org
    • reboot computer to activate environment variables
    • cd C:\OpenC3\openc3
    • bundle install
    • cd ..
    • ruby.exe .\openc3\bin\openc3cli bridgesetup
      C:/openc3/openc3/lib/openc3/utilities/bucket.rb:23:in getClient': OPENC3_CLOUD environment variable is required (RuntimeError) from ./openc3/bin/openc3cli:47:in '

The previous solution was using an updated OpenC3.bat
Can I safely use the openc3.bat from OpenC3/COSMOS-project version 5.1.1 (latest stable) to continue or does this open a new can of worms?

Environment (please complete the following information):

  • Windows 10
  • OpenC3 COSMOS should be 5.1.1
    • from localhost:2900 "OpenC3 COSMOS Unknown © 2022 - License: AGPLv3"
    • git hash used: f5192ad
      Author: ryanmelt [email protected] 2022-11-19 04:19:28
      Tags: v5.1.1
  • OpenC3 COSMOS-project 5.1.1
@ryanmelt
Copy link
Member

ryanmelt commented Dec 7, 2022

Will better document this and probably make OPENC3_CLOUD have a default value so it will always run for bridges.

@ryanmelt ryanmelt added the bug Something isn't working label Dec 7, 2022
@ryanmelt ryanmelt self-assigned this Dec 7, 2022
@Nileshkartik95
Copy link

We are also facing a similar issue while trying the bridge solution for the serial port
cosmos/openc3/lib/openc3/utilities/bucket.rb:23:in getClient': OPENC3_CLOUD environment variable is required (RuntimeError) from cosmos/openc3/bin/openc3cli:47:in

'
Is there any workaround we can use?, any guidance or HeadsUp on this topic would be highly appreciable since we are students and not well versed with this software!

@jmthomas
Copy link
Member

jmthomas commented Dec 7, 2022

Create an environment variable called OPENC3_CLOUD and set it to ‘local’.

@Nileshkartik95
Copy link

Thanks Jason for your response!

I have tried setting the environment variable OPENC3_CLOUD to local but I came across an error with the local_bucket.rb file, although local_bucket.rb is present in the ...cosmos\openc3\lib\openc3\utilities
as mentioned in this error. Just curious to know what could have gone wrong, is it interpreting this file with a different name 'local_' _bucket.rb seems something of this kind.
Please provide your feedback on the topic.

Following is the error message while executing cmd: ruby cosmos/openc3/bin/openc3cli
Error Log:
{"time":1670462004583888600,"@timestamp":"2022-12-07T18:13:24.583-07:00","severity":"ERROR","container_name":"DESKTOP-1C74LAT","log":"Unable to require openc3/utilities/'local_'bucket.rb due to cannot load such file -- openc3/utilities/'local'bucket.rb\nDid you mean? openc3/utilities/local_bucket. Ensure openc3/utilities/'local'_bucket.rb is in the OpenC3 lib directory."}
C:/Ruby31-x64/lib/ruby/3.1.0/socket.rb:61:in `connect_internal': A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. - user specified timeout (Redis::CannotConnectError)

Thanks for your support!

@jmthomas
Copy link
Member

jmthomas commented Dec 8, 2022

On unix: export OPENC3_CLOUD=local
On Windows: set OPENC3_CLOUD=local

No quotes around local.

@jurgensymynck
Copy link
Author

Thanks a lot!

I am finally up and running!

  • Arduino Mega 2560 board
  • using serial connection over USB...
  • Windows 10
  • COSMOS 5.2.0 with bridge support

greetings, Jurgen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants