https://www.orchest.io/ logo
s

Shrikant Karve

05/28/2021, 2:25 PM
I am seeing an issue while running "pnpm run dev".. I posted on git issue but thats not the right place. I figured the slack channel today. Your help is appreciated.
j

Jacopo

05/28/2021, 2:33 PM
Hi Shrikant, thanks for taking the time of bringing the issue here, can you post the trace of the error you are getting?
r

Rick Lamers

05/28/2021, 2:35 PM
Did you run
pnpm install
prior? (And manually install
pnpm
?
1
☝️ 1
Happy to help you ✌🏻
s

Shrikant Karve

05/28/2021, 3:23 PM
lib/javascript/mdc dev: [ts:watch] lib/javascript/mdc dev: [ts:watch] 60659 PM - Found 0 errors. Watching for file changes. lib/javascript/mdc dev: [ts:watch] 60659 PM - File change detected. Starting incremental compilation... lib/javascript/mdc dev: [ts:watch] lib/javascript/mdc dev: [ts:watch] lib/javascript/mdc dev: [ts:watch] 60700 PM - Found 0 errors. Watching for file changes. lib/design-system/package dev: [ts:watch] 60700 PM - Starting compilation in watch mode... lib/design-system/package dev: [ts:watch] lib/design-system/package dev: [ts:watch] lib/design-system/package dev: [ts:watch] 60717 PM - Found 0 errors. Watching for file changes.
Snippet of the pnpm run dev output
BTW I did "pnpm i" as well
Tried to run orchest from other terminal in dev mode ... shows below error in browser requests.exceptions.ConnectionError requests.exceptions.ConnectionError: HTTPConnectionPool(host='172.18.0.1', port=3000): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f203ee40b20>: Failed to establish a new connection: [Errno 111] Connection refused')) Traceback (most recent call last) • File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 169, in 
_new_conn
• conn = connection.create_connection( • File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 96, in 
create_connection
• raise err • File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 86, in 
create_connection
• sock.connect(sa)
So I guess its trying to get a response from service on port 3000
r

Rick Lamers

05/28/2021, 4:46 PM
Without
pnpm run dev
on the host it can’t find the Vite dev server
This is for the JavaScript client with hot reload support
Was that all the output of
pnpm run dev
?
If you run
pnpm run dev
it should run on 3000 and 3001 on the host.
It also shows this (listening on addr 3000/3001) in the logs of the
pnpm run dev
command
s

Shrikant Karve

05/28/2021, 5:43 PM
shrikant@W10J5DH8S2:~/orchest$ sudo pnpm run dev
[sudo] password for shrikant:
@ dev /home/shrikant/orchest
pnpm run build --filter '@orchest/client-^...' && pnpm run dev --filter '@orchest/client-...' --r --parallel
Scope: 3 of 7 workspace projects lib/design-system/package build$ pnpm run pre-build && concurrently -n w: npm:*:build [7 lines collapsed] │ [ts:build] > @orchest/design-system@0.0.4 ts:build /home/shrikant/orchest/lib/design-system/package │ [ts:build] > tsc --emitDeclarationOnly --outDir dist │ [ts:build] │ [esm:build] │ [esm:build] > @orchest/design-system@0.0.4 esm:build /home/shrikant/orchest/lib/design-system/package │ [esm:build] > esbuild src/index.ts --bundle --external:react* --outfile=dist/index.js --format=esm │ [esm:build] │ [cjs:build] npm run cjs:build exited with code 0 │ [esm:build] npm run esm:build exited with code 0 │ [ts:build] npm run ts:build exited with code 0 └─ Done in 13.8s lib/javascript/utils build$ concurrently -n w: npm:*:build │ [es:build] │ [es:build] > @orchest/lib-utils@1.0.0 es:build /home/shrikant/orchest/lib/javascript/utils │ [es:build] > esbuild src/index.ts --bundle --outdir=dist --format=esm --loader:.js=jsx --external:react* --define:pr │ [es:build] │ [ts:build] │ [ts:build] > @orchest/lib-utils@1.0.0 ts:build /home/shrikant/orchest/lib/javascript/utils │ [ts:build] > tsc --emitDeclarationOnly --outDir dist │ [ts:build] │ [es:build] npm run es:build exited with code 0 │ [ts:build] npm run ts:build exited with code 0 └─ Done in 2.8s lib/javascript/mdc build$ concurrently -n w: npm:*:build │ [es:build] │ [es:build] > @orchest/lib-mdc@1.0.0 es:build /home/shrikant/orchest/lib/javascript/mdc │ [es:build] > esbuild src/index.ts --bundle --outdir=dist --format=esm --loader:.js=jsx --external:@orchest/lib-utils │ [es:build] │ [ts:build] │ [ts:build] > @orchest/lib-mdc@1.0.0 ts:build /home/shrikant/orchest/lib/javascript/mdc │ [ts:build] > tsc --emitDeclarationOnly --outDir dist │ [ts:build] │ [es:build] npm run es:build exited with code 0 │ [ts:build] npm run ts:build exited with code 0 └─ Done in 3.6s Scope: 5 of 7 workspace projects lib/design-system/package dev$ pnpm run pre-build && concurrently -n w: npm:*:watch lib/javascript/mdc dev$ concurrently -n w: npm:*:watch lib/javascript/utils dev$ concurrently -n w: npm:*:watch services/auth-server/client dev$ vite services/orchest-webserver/client dev$ vite services/auth-server/client dev: vite v2.3.3 dev server running at: services/auth-server/client dev: > Local: http://localhost:3001/login/ services/auth-server/client dev: > Network: http://192.168.55.151:3001/login/ services/auth-server/client dev: ready in 755ms. services/orchest-webserver/client dev: vite v2.3.3 dev server running at: services/orchest-webserver/client dev: > Local: http://localhost:3000/ services/orchest-webserver/client dev: > Network: http://192.168.55.151:3000/ services/orchest-webserver/client dev: ready in 811ms. lib/javascript/mdc dev: [ts:watch] lib/javascript/mdc dev: [ts:watch] > @orchest/lib-mdc@1.0.0 ts:watch /home/shrikant/orchest/lib/javascript/mdc lib/javascript/mdc dev: [ts:watch] > tsc --emitDeclarationOnly --outDir dist -w lib/javascript/mdc dev: [ts:watch] lib/javascript/utils dev: [es:watch] lib/javascript/utils dev: [es:watch] > @orchest/lib-utils@1.0.0 es:watch /home/shrikant/orchest/lib/javascript/utils lib/javascript/utils dev: [es:watch] > esbuild src/index.ts --bundle --outdir=dist --format=esm --loader:.js=jsx --external:react* --define:process.env.NODE_ENV=\"development\" --sourcemap lib/javascript/utils dev: [es:watch] lib/javascript/mdc dev: [es:watch] lib/javascript/mdc dev: [es:watch] > @orchest/lib-mdc@1.0.0 es:watch /home/shrikant/orchest/lib/javascript/mdc lib/javascript/mdc dev: [es:watch] > esbuild src/index.ts --bundle --outdir=dist --format=esm --loader:.js=jsx --external:@orchest/lib-utils --external:react* --external:@material/* --define:process.env.NODE_ENV=\"development\" --sourcemap lib/javascript/mdc dev: [es:watch] lib/javascript/utils dev: [ts:watch] lib/javascript/utils dev: [ts:watch] > @orchest/lib-utils@1.0.0 ts:watch /home/shrikant/orchest/lib/javascript/utils lib/javascript/utils dev: [ts:watch] > tsc --emitDeclarationOnly --outDir dist -w lib/javascript/utils dev: [ts:watch] lib/javascript/utils dev: [es:watch] npm run es:watch exited with code 0 lib/javascript/mdc dev: [es:watch] npm run es:watch exited with code 0 lib/design-system/package dev: > @orchest/design-system@0.0.4 pre-build /home/shrikant/orchest/lib/design-system/package lib/design-system/package dev: > ts-node -r tsconfig-paths/register src/scripts/pre-build.ts lib/javascript/mdc dev: [ts:watch] 111212 PM - Starting compilation in watch mode... lib/javascript/mdc dev: [ts:watch] lib/javascript/utils dev: [ts:watch] 111212 PM - Starting compilation in watch mode... lib/javascript/utils dev: [ts:watch] lib/javascript/utils dev: [ts:watch] lib/javascript/utils dev: [ts:watch] 111214 PM - Found 0 errors. Watching for file changes. lib/design-system/package dev: [cjs:watch] lib/design-system/package dev: [cjs:watch] > @orchest/design-system@0.0.4 cjs:watch /home/shrikant/orchest/lib/design-system/package lib/design-system/package dev: [cjs:watch] > esbuild src/index.ts --bundle --external:react* --outfile=dist/index.cjs --format=cjs --watch --log-level=error lib/design-system/package dev: [cjs:watch] lib/design-system/package dev: [ts:watch] lib/design-system/package dev: [ts:watch] > @orchest/design-system@0.0.4 ts:watch /home/shrikant/orchest/lib/design-system/package lib/design-system/package dev: [ts:watch] > tsc --emitDeclarationOnly --outDir dist -w lib/design-system/package dev: [ts:watch] lib/design-system/package dev: [esm:watch] lib/design-system/package dev: [esm:watch] > @orchest/design-system@0.0.4 esm:watch /home/shrikant/orchest/lib/design-system/package lib/design-system/package dev: [esm:watch] > esbuild src/index.ts --bundle --external:react* --outfile=dist/index.js --format=esm --watch --log-level=error lib/design-system/package dev: [esm:watch] lib/design-system/package dev: [ts:watch] 111216 PM - Starting compilation in watch mode... lib/design-system/package dev: [ts:watch] lib/javascript/mdc dev: [ts:watch] lib/javascript/mdc dev: [ts:watch] 111216 PM - Found 0 errors. Watching for file changes. lib/javascript/mdc dev: [ts:watch] 111217 PM - File change detected. Starting incremental compilation... lib/javascript/mdc dev: [ts:watch] lib/javascript/mdc dev: [ts:watch] lib/javascript/mdc dev: [ts:watch] 111217 PM - Found 0 errors. Watching for file changes. lib/design-system/package dev: [ts:watch] lib/design-system/package dev: [ts:watch] 111229 PM - Found 0 errors. Watching for file changes.
@Yannick further to our discussion on git issue, find the full log of
pnpm start dev
command above.
👍 1
r

Rick Lamers

05/28/2021, 10:18 PM
Hi Shrikant. I think the issue might be related to WSL2 networking. I’m going replicate this tomorrow and get back to you
s

Shrikant Karve

05/29/2021, 3:29 AM
Great. Thanks.
Seems to be a wsl2 networking issue, as you guessed.
Browser shows "requests.exceptions.ConnectionError: HTTPConnectionPool(host='172.18.0.1', port=3000)"
r

Rick Lamers

05/29/2021, 8:31 AM
Are you running
pnpm run dev
inside WSL2 Ubuntu? (Are you using the Ubuntu WSL2 distro?)
s

Shrikant Karve

05/29/2021, 8:32 AM
ifconfig inside ubuntu shows local ip as "192.168.55.156"
yes.. running
pnpm run dev
inside wsl2
r

Rick Lamers

05/29/2021, 8:33 AM
Inside Ubuntu
docker network inspect orchest
should give you 172.18.0.X as the network subnet
s

Shrikant Karve

05/29/2021, 8:33 AM
indeed.. it shows "172.18.0.X"
r

Rick Lamers

05/29/2021, 8:34 AM
In Ubuntu what does:
wget 127.0.0.1:3000
give you (when
pnpm run dev
is running)
s

Shrikant Karve

05/29/2021, 8:35 AM
shrikant@W10J5DH8S2:~/orchest$ wget 127.0.0.1:3000 --2021-05-29 140449-- http://127.0.0.1:3000/ Connecting to 127.0.0.1:3000... connected. HTTP request sent, awaiting response... 200 OK Length: 3157 (3.1K) [text/html] Saving to: ‘index.html’ index.html 100%[=================================================>] 3.08K --.-KB/s in 0s 2021-05-29 140449 (391 MB/s) - ‘index.html’ saved [3157/3157]
r

Rick Lamers

05/29/2021, 8:35 AM
Can you run
docker exec -it orchest-webserver bash
and run the same wget?
(With 127.0.0.1 replaced to 172.18.0.1)
s

Shrikant Karve

05/29/2021, 8:37 AM
shrikant@W10J5DH8S2:~/orchest$ docker exec -it orchest-webserver bash root@0b4e2a3c115b:/orchest/services/orchest-webserver/app# wget 172.18.0.1:3000 --2021-05-29 083652-- http://172.18.0.1:3000/ Connecting to 172.18.0.1:3000... failed: Connection refused.
r

Rick Lamers

05/29/2021, 8:40 AM
Hmm 🤔. Did you install Docker on Windows (Docker for Desktop) or inside the Ubuntu WSL2 environment itself?
s

Shrikant Karve

05/29/2021, 8:42 AM
Docker on windows
r

Rick Lamers

05/29/2021, 8:43 AM
Can you retry the wget with host.docker.internal has the substitute for 172.18.0.1?
Probably doesn’t work - I expect it to try to connect to Windows host network. Worth a shor
shot*
s

Shrikant Karve

05/29/2021, 8:44 AM
trying
r

Rick Lamers

05/29/2021, 8:46 AM
My guess is that there are two solutions: run
pnpm run dev
from Windows or install Docker in the Ubuntu WSL2 itself: using the Docker Ubuntu CLI installer.
s

Shrikant Karve

05/29/2021, 8:46 AM
ok
r

Rick Lamers

05/29/2021, 8:47 AM
Because Docker is actually running on Windows the 172.8.0.1 is actually pointing to the Windows host
It’s probably going to depend on your preferences re: development workflow which one of those options makes most sense.
s

Shrikant Karve

05/29/2021, 8:48 AM
sure
will run pnpm on windows and try
r

Rick Lamers

05/29/2021, 8:48 AM
Apologies for the hickup - we don’t officially support WSL2 as a dev environment. Although I’m happy to make it work for you 👌🏻
s

Shrikant Karve

05/29/2021, 8:59 AM
thanks
r

Rick Lamers

05/29/2021, 9:02 AM
Please let me know if it ends up working :)
Will add this case to the docs
s

Shrikant Karve

05/29/2021, 9:25 AM
I am thinking of moving to Linux environment now, so as to save my time on infra issues
👍 1
y

Yannick

05/29/2021, 9:49 AM
I am thinking of moving to Linux environment now, so as to save my time on infra issues
Would definitely recommend this ;)
r

Rick Lamers

05/29/2021, 9:56 AM
Copy code
> @ dev C:\Users\Rick\workspace\orchest
> pnpm run build --filter '@orchest/client-*^...' && pnpm run dev --filter '@orchest/client-*...' --r --parallel

No projects matched the filters in "C:\Users\Rick\workspace\orchest"
No projects matched the filters in "C:\Users\Rick\workspace\orchest"
I've tried to reproduce all the steps on my Windows machine to see if my recommendation would work. However, the
pnpm --filter
seems to break on Windows so without additional work it looks like developing on WSL2 won't be feasible.
As we're a small team, maintaining development environments (including e.g. build scripts) for multiple platforms (macOS, Windows and Linux) is too time consuming for the time being. Would therefore recommend moving to a Linux environment for now, we might expand support in the future though.
Of course, running Orchest is supported on both macOS, Windows (through WSL2) and Linux.
s

Shrikant Karve

05/29/2021, 11:35 AM
yes.. got it.. but for dev environment, I better switch to Linux
Thanks for your support @Rick Lamers. very much appreciated. The first few days are generally hard but now I think I will stick with and contribute more here.
r

Rick Lamers

05/29/2021, 11:58 AM
@Shrikant Karve we're happy to have you. Feel free to ask questions at any time - that's what we're here for 👍
P.S. If you ever want to make the development environment work on WSL2 I can confirm that:
install Docker in the Ubuntu WSL2 itself: using the Docker Ubuntu CLI installer
works.
image.png
s

Shrikant Karve

05/29/2021, 2:06 PM
tried docker install in ubuntu and it worked. Got
./orchest start --dev
working. 👍
👍 2
I think we will need to update documentation for same!
Should I update the doc?
r

Rick Lamers

05/29/2021, 2:56 PM
Feel free to!
I think a mention about
docker
being required to run in the WSL2 environment for development mode makes sense.
1
s

Shrikant Karve

05/31/2021, 4:50 AM
Raised a PR for doc change. pls enlighten me if I miss doing anything. My first PR here! :)
🎉 1
y

Yannick

05/31/2021, 1:44 PM
Thanks for the PR! I just merged it :)
s

Shrikant Karve

05/31/2021, 2:32 PM
Awesome!
2 Views