Hi Team, Getting below error while running dagste...
# ask-community
a
Hi Team, Getting below error while running dagster version 0.14.6, and unable to load the repositories in UI. if tried reloading from UI get the second message. has anyone got this error before?
d
Hi Amit - try running the command from the error message yourself in your command prompt, is it able to launch a Dagster code server? From the error message it seems like it might be hanging or taking a really long time to start up for some reason
when we've seen this in the past, it was sometimes because there were side effects in the code while importing causing it to hang
a
Hi Daniel, thank you for quick reply! Yes, we tried and it kind of got hung and did not proceed. so ended up killing it.
d
Got it - I think that's your problem. Does that also happen when you run a very simple job? like the one in the tutorial? If not, you'll want to figure out what about your code is taking so long to load
what you want is to see a log line like this:
Copy code
2022-03-29 16:13:48 -0500 - dagster.code_server - INFO - Started Dagster code server for module dagster_test.toys.repo on port 4000 in process 66915
that means your code has loaded and is ready fro dagit to talk to it
a
okay, but It gets stuck when I am launching the dagster itself, so could not get to the point where a simple job can be executed
d
Could you say more about what exactly is getting stuck? What command are you running, and how long are you waiting before killing it?
a
okay so to launch dagster we have .bat file with cmd command to call dagster-daemon and call dagit. after execution the error is 2022-03-29 162121 -0500 - dagster.daemon.SensorDaemon - WARNING - Could not load location repository_local.py to check for sensors due to the following error: Exception: Timed out waiting for gRPC server to start with arguments: "C:\Users\YBH7957\Envs\khde\Scripts\python.exe -m dagster api grpc --lazy-load-user-code --port 59813 --heartbeat --heartbeat-timeout 120 --fixed-server-id 08aaa9a7-1172-486c-95c8-4a0d0892b371 --log-level WARNING --use-python-environment-entry-point -f kh_dagster/repository_local.py -d C:\Users\YBH7957\PycharmProjects\khc_data_eng_core". Most recent connection error: dagster.core.errors.DagsterUserCodeUnreachableError: Could not reach user code server
d
got it. I think the first thing you'll want to figure out is why your code is hanging when it loads
a
and when tried executing this command from cmd directly it's still hung after waiting for 5 mins
d
in the past i've seen that happen because it was hitting postgres on import, or sometimes Azure Key manager on import, things like that, and it was hanging or taking forever
the hang is very likely due to something specific to your code vs. something in dagster (you could very that by trying to load a very simple job and seeing if it hangs)
a
okay, will try that. but quick observation my colleague, he downgraded his dagster version to 0.14.5 on the same repo and it started working for him
d
Is there any indication of what it's doing when it's hanging?
Or anything I can do to reproduce the problem myself?
a
hmm.. not sure how? what version of dagster are you on
okay, tried removing added code and it worked. so it seems it could be due to compiling code