LuckPerms / rest-api

A REST API for LuckPerms.
MIT License
31 stars 8 forks source link

All the endpoint got "404 Not Found - No context found for request" except the `/health` endpoint. #18

Closed sakurawald closed 3 months ago

sakurawald commented 3 months ago

The docker-compose.yml

version: "3.8"
services:
  redis-server:
    image: redis:latest
    container_name: redis-server-container
    ports:
      - "6379:6379"
    restart: unless-stopped
  mysql-server:
    image: mysql:latest
    container_name: mysql-server-container
    ports:
      - "3306:3306"
    volumes:
      - /home/mysql/data:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: password
    restart: unless-stopped
  luckperms:
    image: ghcr.io/luckperms/luckperms
    container_name: luckperms-container
    extra_hosts:
      - "database:host-gateway"
    ports:
      - "3001:3001"
      - "8080:8080"
    environment:
      LUCKPERMS_REST_AUTH: "false"
      LUCKPERMS_STORAGE_METHOD: mysql
      LUCKPERMS_DATA_ADDRESS: database:3306
      LUCKPERMS_DATA_DATABASE: application_schema
      LUCKPERMS_DATA_USERNAME: root
      LUCKPERMS_DATA_PASSWORD: password

The luckperms output

2024-08-12T20:15:01.450792192Z [20:15:01 INFO]:         __    
2024-08-12T20:15:01.451280390Z [20:15:01 INFO]:   |    |__)   LuckPerms v5.4.139
2024-08-12T20:15:01.451768840Z [20:15:01 INFO]:   |___ |      Running on Standalone - standalone
2024-08-12T20:15:01.451929624Z [20:15:01 INFO]: 
2024-08-12T20:15:01.452595505Z [20:15:01 INFO]: Loading configuration...
2024-08-12T20:15:01.564248624Z [20:15:01 INFO]: Resolved configuration value from environment variable: LUCKPERMS_DATA_ADDRESS = database:3306
2024-08-12T20:15:01.564388711Z [20:15:01 INFO]: Resolved configuration value from environment variable: LUCKPERMS_DATA_DATABASE = application_schema
2024-08-12T20:15:01.564591020Z [20:15:01 INFO]: Resolved configuration value from environment variable: LUCKPERMS_DATA_USERNAME = root
2024-08-12T20:15:01.564724604Z [20:15:01 INFO]: Resolved configuration value from environment variable: LUCKPERMS_DATA_PASSWORD = *****
2024-08-12T20:15:01.565174622Z [20:15:01 INFO]: Resolved configuration value from environment variable: LUCKPERMS_STORAGE_METHOD = mysql
2024-08-12T20:15:01.717387131Z [20:15:01 INFO]: Loading storage provider... [MYSQL]
2024-08-12T20:15:01.731858965Z WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
2024-08-12T20:15:01.761392135Z [20:15:01 INFO]: luckperms-hikari - Starting...
2024-08-12T20:15:01.793041971Z [20:15:01 INFO]: luckperms-hikari - Start completed.
2024-08-12T20:15:02.007815937Z [20:15:02 INFO]: Loading messaging service... [SQL]
2024-08-12T20:15:02.079245717Z [20:15:02 INFO]: Loading internal permission managers...
2024-08-12T20:15:02.092266178Z [20:15:02 INFO]: Performing initial data load...
2024-08-12T20:15:02.117779710Z [20:15:02 INFO]: Successfully enabled. (took 755ms)
2024-08-12T20:15:02.130507445Z [20:15:02 INFO]: Started healthcheck HTTP server on :3001

Send request into http://localhost:3001/health:

{"healthy":true,"details":{"storageConnected":true,"storagePing":1}}

Send request into http://localhost:3001/group:

<h1>404 Not Found</h1>No context found for request
sakurawald commented 3 months ago

Sorry for not reading the example.