https://flyte.org logo
#ask-the-community
Title
# ask-the-community
a

Andrew

11/27/2023, 3:33 PM
So I’ve been having issues trying to run
flytectl demo start
. Last week it was saying it couldn’t find docker running even when it was, and now I got back on today and ran it, and it got this error. Any idea what could have caused this? I just updated with
brew upgrade flytectl
but it didn’t change the output
Copy code
Error:

1 error(s) decoding:

* '' has invalid keys: console
strict mode is on but received keys [map[level:{}]] to decode with no config assigned to receive them: failed strict mode check
ERRO[0000]

1 error(s) decoding:

* '' has invalid keys: console
strict mode is on but received keys [map[level:{}]] to decode with no config assigned to receive them: failed strict mode check  src="main.go:13"
d

David Espejo (he/him)

11/27/2023, 4:51 PM
@Andrew can you run other containers succesfully?
a

Andrew

11/27/2023, 4:53 PM
Yeah, I’m running another unrelated one right now, and its running fine
Is there a preference between the homebrew or curl install for
flytectl
? I’m trying to fully update homebrew and then reinstall, but if that doesn’t work I can try the curl install method
d

David Espejo (he/him)

11/27/2023, 6:52 PM
I don't think there's a preferred method. Maybe
brew
can make things more deterministic if you want to upgrade/etc in the future, but that's just my opinion 🙂
a

Andrew

11/27/2023, 6:52 PM
Sounds good. Yeah it just doesn’t seem to be interacting with my computer very well, so I’ll have to see what works
Is there a way to install an earlier version of
flytectl
? I tried installing with curl on another machine (linux this time), and its getting the same error
Sorry for all the questions. Can flytectl run fine on intel macbooks? I’m not sure how to get past this error, and I’m having issues with
pyflyte
talking to docker, so I wasn’t sure if it was an intel thing, or if somehow my machine is just in a weird state or something
s

Samhita Alla

11/28/2023, 8:41 AM
can you share the config in
~/.flyte/config.yaml
? precisely asking for the flytectl config.
a

Andrew

11/28/2023, 3:01 PM
Copy code
admin:
  # For GRPC endpoints you might want to use dns:///flyte.myexample.com
  endpoint: dns:///flyte.<domain>.com
  authType: Pkce
  insecure: false
  console:
    endpoint: <https://flyte>.<domain>.com/console
logger:
  show-source: true
level: 0
d

David Espejo (he/him)

11/28/2023, 3:22 PM
an old thread here seems to indicate lack of resources Can you try adding the following to your config file?
Copy code
task_resources:
  defaults:
    cpu: 500m
    memory: 1Gi
  limits:
    cpu: 2
    memory: 4Gi
a

Andrew

11/28/2023, 3:37 PM
Unfortunately, that didn’t seem to change anything. It doesn’t look like its even starting any pods or anything, it just immediately fails with that main.go error. I do have it working on my other laptop, which is inconvenient to use, but I may have to work from there for now
s

Samhita Alla

11/28/2023, 4:52 PM
can you indent
console
to the left?
Copy code
admin:
  # For GRPC endpoints you might want to use dns:///flyte.myexample.com
  endpoint: dns:///flyte.<domain>.com
  authType: Pkce
  insecure: false
console:
    endpoint: <https://flyte>.<domain>.com/console
logger:
  show-source: true
level: 0
a

Andrew

11/28/2023, 4:55 PM
Still getting the same error. Here’s the current state, I forgot I had localhost for the demo stuff
Copy code
admin:
  endpoint: localhost:30080
  authType: Pkce
  insecure: false
console:
  endpoint: <http://localhost:30080>
logger:
  show-source: true
level: 0
task_resources:
  defaults:
    cpu: 500m
    memory: 1Gi
  limits:
    cpu: 2
    memory: 4Gi
Is there a way to make sure its using this config file? I assumed it was just the default, that it would look for
~/.flyte/config.yaml
d

David Espejo (he/him)

11/28/2023, 4:57 PM
well, typically there's a config file just for sandbox, like
export FLYTECTL_CONFIG=$HOME/.flyte/config-sandbox.yaml
config.yaml
is for non-sandbox config
a

Andrew

11/28/2023, 4:57 PM
Oh, I did run this:
export FLYTECTL_CONFIG=~/.flyte/config.yaml
just now, and it output this instead:
Copy code
INFO[0000] [0] Couldn't find a config file []. Relying on env vars and pflags.
🧑‍🏭 Bootstrapping a brand new Flyte cluster... 🔨 🔧
Error: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
{"json":{},"level":"error","msg":"Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?","ts":"2023-11-28T09:56:14-07:00"}
Which is back to my initial error, where it can’t access docker for some reason
Yeah, I switched over at some point. I can go back to the sandbox one and try again
Ok, I exported that variable to go back to the sandbox one, and it got the main.go error again.
Copy code
admin:
  endpoint: localhost:30080
  authType: Pkce
  insecure: true
console:
  endpoint: <http://localhost:30080>
logger:
  show-source: true
level: 0
Ok one more. I removed the config, then ran
flytectl config init
, and that got past the main.go issue, using this as the initialized config file. Now its back to the docker issue, which seems to be separate.
Copy code
admin:
  # For GRPC endpoints you might want to use dns:///flyte.myexample.com
  endpoint: dns:///localhost:30080
  insecure: true
So it does seem to be a config parsing issue for the first issue, and the docker issue is some other issue (which I’m pretty sure is inherent to my computer for some reason, I’ve seen that pop up every once in awhile trying to run docker commands, where it doesn’t think its running). But I’m not really sure
I think I just got it…. I found the setting in Docker Desktop “Allow the default Docker socket to be used (requires password)“, restarted with that, and now its building the demo cluster
Guess I missed that going through settings before
Still not sure about the config parsing one, haha, but I can add a line at a time and see what’s causing it and work around that