Skip to content

Parse Server 6.2: "Server not reachable: unauthorized: master key is required" #8745

Closed as not planned
@Vildnex

Description

@Vildnex

New Issue Checklist

Issue Description

I have a docker-compose file that I am using in order to create the whole backend which is going to use ParseServer 6.2 version. But the problem is when I go to the page http://localhost:4040 and log in with user: admin and pw: admin. I will get the following error:

Server not reachable: unauthorized: master key is required

The interesting part is that this is only from ParseServer 6.2, if I am going to use the older version ParseServer 5.2 I don't get any error at all and everything works perfectly.

Does anyone know what I am missing?

Also, the output from the logs server are as follows:

error: Request using master key rejected as the request IP address '10.5.0.1' is not set in Parse Server option 'masterKeyIps'.
2023-09-13T18:58:21.459971786Z Error: unauthorized: master key is required
2023-09-13T18:58:21.460007964Z     at promiseEnforceMasterKeyAccess (/parse-server/lib/middlewares.js:430:19)
2023-09-13T18:58:21.460015577Z     at /parse-server/lib/PromiseRouter.js:74:20
2023-09-13T18:58:21.460022142Z     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-09-13T18:58:21.488535271Z error: Request using master key rejected as the request IP address '10.5.0.1' is not set in Parse Server option 'masterKeyIps'.
2023-09-13T18:58:21.491460848Z Error: unauthorized: master key is required
2023-09-13T18:58:21.491524335Z     at promiseEnforceMasterKeyAccess (/parse-server/lib/middlewares.js:430:19)
2023-09-13T18:58:21.491535580Z     at /parse-server/lib/PromiseRouter.js:74:20
2023-09-13T18:58:21.491544729Z     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Steps to reproduce

  1. Run the following docker compose file:
version: '3.9'

services:
  database:
    image: mongo:3.6
    security_opt:
      - seccomp:unconfined
    ports:
      - 27017:27017
    environment:
      MONGO_INITDB_ROOT_USERNAME: admin
      MONGO_INITDB_ROOT_PASSWORD: admin
    volumes:
      - mongo_data:/data/db
    networks:
      - my_network

  server:
    image: parseplatform/parse-server:6.2.0
    ports:
      - 1337:1337
      - 9229:9229
    environment:
      - PARSE_SERVER_APPLICATION_ID=COOK_APP
      - PARSE_SERVER_APPLICATION_NAME=COOK_NAME
      - PARSE_SERVER_MASTER_KEY=MASTER_KEY_1
      - PARSE_SERVER_DATABASE_URI=mongodb://admin:admin@database:27017/parse_server?authSource=admin
      - PARSE_SERVER_URL=http://localhost:1337/parse
      - PARSE_PUBLIC_SERVER_URL=http://localhost:1337/parse
      - PARSE_ENABLE_FOR_ANONYMOUS_USERS=true
      - PARSE_ENABLE_FOR_PUBLIC_USERS=true
      - PARSE_SERVER_CLOUD=/parse-server/cloud/main.js
    links:
      - database
    depends_on:
      - database
      - search_engine
    entrypoint: "node --inspect=0.0.0.0:9229 /parse-server/bin/parse-server"
    volumes:
      - parse_server_cloud:/parse-server/cloud
    networks:
      - my_network

  dashboard:
    image: parseplatform/parse-dashboard:5.1.0
    ports:
      - "4040:4040"
    depends_on:
      - server
    environment:
      - PARSE_DASHBOARD_APP_ID=COOK_APP
      - PARSE_DASHBOARD_MASTER_KEY=MASTER_KEY_1
      - PARSE_DASHBOARD_USER_ID=admin
      - PARSE_DASHBOARD_USER_PASSWORD=admin
      - PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=true
      - PARSE_DASHBOARD_SERVER_URL=http://localhost:1337/parse
    volumes:
      - parse_dashboard:/data/dashboard
    networks:
      - my_network

networks:
  my_network:
    driver: bridge
    ipam:
      config:
        - subnet: 10.5.0.0/16
          gateway: 10.5.0.1

volumes:
  mongo_data:
  parse_dashboard:
  search_engine:
  parse_server_cloud:
    driver: local
    driver_opts:
      type: none
      device: ../cloud_code
      o: bind
  1. Go to localhost:4040, 0.0.0.0:4040 or 127.0.0.1:4040 and login with the user admin and password admin

Actual Outcome

Server not reachable: unauthorized: master key is required

image

Expected Outcome

I would expect to not have that error message and be able to enter into my application properly.

Environment

Server

  • Parse Server version: 6.2.0
  • Operating system: Docker (parseplatform/parse-server:6.2.0)
  • Local or remote host: local

Database

  • System: MongoDB
  • Database version: 3.6
  • Local or remote host: local

Client

  • SDK: Dart
  • SDK version: 5.1.3

UPDATE:

Look, I can keep it all day, @mtrezza, I did not find anything useful in those links that you sent to me, and because you closed my issue without any discussion or solution to it I will reopen it again and again, maybe someone else could help me. More than that is actually a problem with the parse server which in 5.2 did not exist, and now it does in 6.2. So either I will reopen it over and over again, or you can give me some real help, or at least let it open for someone else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:duplicateDuplicate of already reported issuetype:questionSupport or code-level question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions