instructure / instructure/canvas-rce-api

Not working with docker and dory

Open
#9 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
22
Forks
39
PR merge metrics
No merged PRs in 30d

Description

I followed the docker-dev-setup.sh guide and had canvas docker dev environment up. However, the rce-api is not working. Logs below. It seems that the rce-api cannot resolve the canvas.docker address, while the host's browser can.

rce-api_1   | 172.23.0.6 - - [29/Apr/2020:05:10:56 +0000] "GET /api/session HTTP/1.1" 304 0 "http://canvas.docker/courses/1/pages" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0" 
rce-api_1   | App 40 output: [42cc31eb-2e58-4b8c-af52-00cb0d96689d] 127.0.0.1 - - [29/Apr/2020:05:10:56 +0000] "GET /api/session HTTP/1.1" 304 - "http://canvas.docker/courses/1/pages" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0" 
rce-api_1   | App 40 output: (node:40) UnhandledPromiseRejectionWarning: RequestError: Error: getaddrinfo ENOTFOUND canvas.docker canvas.docker:80 
rce-api_1   | App 40 output:     at new RequestError (/usr/src/app/node_modules/request-promise-core/lib/errors.js:14:15) 
rce-api_1   | App 40 output:     at Request.plumbing.callback (/usr/src/app/node_modules/request-promise-core/lib/plumbing.js:87:29) 
rce-api_1   | App 40 output:     at Request.RP$callback [as _callback] (/usr/src/app/node_modules/request-promise-core/lib/plumbing.js:46:31) 
rce-api_1   | App 40 output:     at self.callback (/usr/src/app/node_modules/request/request.js:185:22) 
rce-api_1   | App 40 output:     at Request.emit (events.js:198:13) 
rce-api_1   | App 40 output:     at Request.onRequestError (/usr/src/app/node_modules/request/request.js:881:8) 
rce-api_1   | App 40 output:     at ClientRequest.emit (events.js:198:13) 
rce-api_1   | App 40 output:     at Socket.socketErrorListener (_http_client.js:401:9) 
rce-api_1   | App 40 output:     at Socket.emit (events.js:198:13) 
rce-api_1   | App 40 output:     at emitErrorNT (internal/streams/destroy.js:91:8) 
rce-api_1   | App 40 output:     at emitErrorAndCloseNT (internal/streams/destroy.js:59:3) 
rce-api_1   | App 40 output:     at process._tickCallback (internal/process/next_tick.js:63:19) 
rce-api_1   | App 40 output: (node:40) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) 

I have a workaround here: https://github.com/FreedomBen/dory/issues/36

I'd like to know what did you do to make it work? I don't see any documentation about this issue.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the docker-dev-setup.sh guide and the reported Dory workaround at dory/issues/36. Reproduce the rce-api failure and inspect why the container cannot resolve canvas.docker while the host browser can; done means the Docker development setup works without the reported DNS error or documents the required configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, javascript
Domain
devops, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.