Closed sstchur closed 2 years ago
Hi @sstchur - can you verify that Docker is running?
Please enter docker ps
in your terminal:
CONTAINER ID
and some other things."Cannot connect to the Docker daemon"
.If Docker isn't running, starting it depends on how you've installed it:
sudo systemctl start docker
might do the trick.If you let me know how you get on with that I can advise further.
Thanks for the help! Docker was not in fact running. sudo systemctl start docker
did not work (I got the error "System has not been booted with systemd as init system." After doing a bit of research, I learned this is because I'm using the WSL. Apparently I can use the equivalent Sysvinit commands to do the same thing. So I tried sudo service docker start
and got "* Starting Docker: docker"
I then ran sudo docker ps
and got:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
I then tried yarn external-services up --detach
again, but I got several permission denied errors. So then I tried sudo yarn external-services up --detach
and what do you know! It appears to be pulling the container code and starting up. It hasn't finished yet, so the jury's still out, but this looks promising.
So after starting up and a variety of messages like
[dev:frontend] This problem is likely caused by another plugin injecting
[dev:frontend] "SpinnerIcon" without registering it in the scope tracker. If you are the author
[dev:frontend] of that plugin, please use "scope.registerDeclaration(declarationPath)".
[dev:frontend] The exported identifier "HashIcon" is not declared in Babel's scope tracker
[dev:frontend] as a JavaScript value binding, and "@babel/plugin-transform-typescript"
[dev:frontend] never encountered it as a TypeScript type declaration.
[dev:frontend] It will be treated as a JavaScript value.
I now see:
[dev:backend:*realtime] info: Updated ownership of slot "realtime" {"service":"realtime","instanceId":"d8d911e6-3bda-4430-b440-3ec70a57beda","timestamp":"2022-02-17T15:56:00.712Z"}
[dev:backend:*realtime] info: Updated ownership of slot "realtime" {"service":"realtime","instanceId":"d8d911e6-3bda-4430-b440-3ec70a57beda","timestamp":"2022-02-17T15:56:05.707Z"}
[dev:backend:*realtime] info: Updated ownership of slot "realtime" {"service":"realtime","instanceId":"d8d911e6-3bda-4430-b440-3ec70a57beda","timestamp":"2022-02-17T15:56:10.720Z"}```
It doesn't seem to indicate what port the local dev server is running on, but I guessed 3000, and when I browse, there I see this (which I think is progress?):
Yep, thatβs definitely progress π
[dev:frontend] This problem is likely caused by another plugin injecting
[dev:frontend] "SpinnerIcon" without registering it in the scope tracker. If you are the author
[dev:frontend] of that plugin, please use "scope.registerDeclaration(declarationPath)".
β These warnings will be gone when we merge #320 β I hope it will be quite soon! Also we just merged #322, which should give you less noise in the output. Try to git pull; yarn install
before running yarn dev
again.
Once you run yarn seed-data
, you should be able to login as alice
or bob
. We use email confirmations instead of passwords and these emails are mocked during local dev. See console output once youβve entered one of the two demo logins π
Both #320 and #322 are merged now π
π @sstchur! Has the issue been fixed for you?
Sorry for the delay! I will try to find time to try it out today. I got sidetracked the last few days and hadnβt had time to try running it again.
Get Outlook for iOShttps://aka.ms/o0ukef
From: Alexander Kachkaev @.> Sent: Monday, February 28, 2022 1:54:46 AM To: hashintel/hash @.> Cc: sstchur @.>; Mention @.> Subject: Re: [hashintel/hash] Error running yarn external-services up --detach (Issue #321)
π @sstchurhttps://github.com/sstchur! Has the issue been fixed for you?
β Reply to this email directly, view it on GitHubhttps://github.com/hashintel/hash/issues/321#issuecomment-1054079810, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALJMD34KVCBRXOENQCXMW6TU5NA6NANCNFSM5OTODDVQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.***>
Alright, so I finally had some time to pull latest and try again. I can get the docker service running and successfully run yarn external services up --detach
. I then ran yarn dev
, but I see some errors, and it seems like the frontend service isn't running (it doesn't connect when I try localhost:3000). The output below shows a couple of Errors, like "failed to load next.config.js". Any idea what I might be doing wrong?
[dev:frontend] ready - started server on 0.0.0.0:3000, url: http://localhost:3000
[dev:backend:search-loader] [INFO] 16:04:48 ts-node-dev ver. 2.0.0-0 (using ts-node ver. 10.4.0, typescript ver. 4.5.5)
[dev:backend:realtime] [INFO] 16:04:48 ts-node-dev ver. 2.0.0-0 (using ts-node ver. 10.4.0, typescript ver. 4.5.5)
[dev:backend:api] [INFO] 16:04:48 ts-node-dev ver. 2.0.0-0 (using ts-node ver. 10.4.0, typescript ver. 4.5.5)
[dev:frontend] info - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
[dev:frontend] Error: failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error
[dev:frontend] TypeError: Cannot read properties of undefined (reading 'version')
[dev:frontend] at Object.node --trace-deprecation ...
to show where the warning was created)
[dev:backend:api] info: Listening on port 5001 {"service":"api"}
[dev:backend:api] info: GraphQL path: /graphql {"service":"api"}
[dev:backend:realtime] info: HTTP server closed {"service":"realtime","instanceId":"5c5f9460-8130-4cd9-a212-29e5a2a75a14","timestamp":"2022-03-03T00:05:19.687Z"}
[dev:backend:realtime] yarn run dev:backend:realtime exited with code SIGINT
π @sstchur! We made some changes to how the app runs (including #687 which was just merged this morning). Itβd be great to get your feedback if you have time to run HASH locally! You can find the instructions in packages/hash/README.md π
Hey, thanks for letting me know. I will try to find some time to try this out. Been out of commission sick this past week. But will try to find some time in the next few days.
I actually did get HASH to run quite a while back, but never updated this thread. Last time I managed to get to run though, it was so painfully slow as to mostly be useless. Not sure if I did something wrong. Happy to try it again now that there have been updates.
All prerequisites were met, and I verified that I have all the correct versions of git, node, yarn, docker, and docker-compose. I also verified that none of the required ports are in use. At the step:
yarn external-services up --detach
I'm met with the following error:yarn external-services up --detach yarn run v1.22.17 $ docker-compose --file external-services/docker-compose.yml up --detach Traceback (most recent call last): File "urllib3/connectionpool.py", line 677, in urlopen File "urllib3/connectionpool.py", line 392, in _make_request File "http/client.py", line 1277, in request File "http/client.py", line 1323, in _send_request File "http/client.py", line 1272, in endheaders File "http/client.py", line 1032, in _send_output File "http/client.py", line 972, in send File "docker/transport/unixconn.py", line 43, in connect FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "requests/adapters.py", line 449, in send File "urllib3/connectionpool.py", line 727, in urlopen File "urllib3/util/retry.py", line 410, in increment File "urllib3/packages/six.py", line 734, in reraise File "urllib3/connectionpool.py", line 677, in urlopen File "urllib3/connectionpool.py", line 392, in _make_request File "http/client.py", line 1277, in request File "http/client.py", line 1323, in _send_request File "http/client.py", line 1272, in endheaders File "http/client.py", line 1032, in _send_output File "http/client.py", line 972, in send File "docker/transport/unixconn.py", line 43, in connect urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "docker/api/client.py", line 214, in _retrieve_server_version File "docker/api/daemon.py", line 181, in version File "docker/utils/decorators.py", line 46, in inner File "docker/api/client.py", line 237, in _get File "requests/sessions.py", line 543, in get File "requests/sessions.py", line 530, in request File "requests/sessions.py", line 643, in send File "requests/adapters.py", line 498, in send requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "docker-compose", line 3, in
File "compose/cli/main.py", line 81, in main
File "compose/cli/main.py", line 200, in perform_command
File "compose/cli/command.py", line 70, in project_from_options
File "compose/cli/command.py", line 153, in get_project
File "compose/cli/docker_client.py", line 43, in get_client
File "compose/cli/docker_client.py", line 170, in docker_client
File "docker/api/client.py", line 197, in init
File "docker/api/client.py", line 222, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
[11747] Failed to execute script docker-compose
error Command failed with exit code 255.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.