MapColonies / MapColonies/mapproxy-api

Question

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

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
4
Forks
1
Avg merge
8d 14h
Merged PRs (30d)
3

Description

I've tried to run from this project, but got some obstacles:

running with npm

  1. Regarding usage service, you I succeeded only when I ran
    npm install openapi-types eslint-plugin-flowtype eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks
    and not
    npm install
  2. I've edited the config\default.json file to use available port
"server": {
    "port": "8083"
  },

then using Swagger API ( /) sent :

curl -X 'POST' \
  'http://localhost:8083/layer' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d '{
  "cacheType": "file",
  "name": "my_layer_name",
  "tilesPath": "/home/alexbel/MapProxy/tiles/",
  "maxZoomLevel": 18
}'

but got the following response:

{
  "message": "Internal Server Error"
}

the printed log was:

No configuration was provided, adding default console logger.
[2021-11-23T08:51:09.323Z] [info] [mapproxy-api] [1.3.2] Probe configuration init
[2021-11-23T08:51:09.325Z] [info] [mapproxy-api] [1.3.2] Probe server is listening on port 8083
[2021-11-23T08:51:09.325Z] [info] [mapproxy-api] [1.3.2] readyFlag change to true
[2021-11-23T08:51:13.932Z] [info] [mapproxy-api] [1.3.2] Add layer request: my)name
[2021-11-23T08:51:13.932Z] [error] [mapproxy-api] [1.3.2] Failed to provied json from file: Error: ENOENT: no such file or directory, open ''
[2021-11-23T08:51:13.933Z] [error] [mapproxy-api] [1.3.2] POST request to /layer  has failed with error: Error: ENOENT: no such file or directory, open ''

What is missing ? My guess that I have to point to mapproxy.yaml somehow, but I didn't find or missed it in the documentation.

running with docker

I have used following command:
docker run --name mapproxy-api --rm -it -e SERVER_PORT=8083 mapproxy-api:latest

however the http://localhost:8083/docs/api/ returns me 404 error code

$ docker logs mapproxy-api 
No configuration was provided, adding default console logger.
[2021-11-23T08:54:35.348Z] [info] [mapproxy-api] [1.3.2] Probe configuration init
[2021-11-23T08:54:35.351Z] [info] [mapproxy-api] [1.3.2] Probe server is listening on port 8083
[2021-11-23T08:54:35.352Z] [info] [mapproxy-api] [1.3.2] readyFlag change to true

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 config/default.json, the npm installation instructions, and the Docker startup command, then reproduce the POST /layer request and the /docs/api/ request described here. Trace the logged ENOENT error and the Docker 404 using the existing API and container documentation. Done means the required setup and configuration are identified and both reported behaviors have a documented or verified resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, node.js, openapi, typescript
Domain
api, devops, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.