ccarney16 / pterodactyl-containers

Pterodactyl Panel within a docker container
230 stars 78 forks source link

FATAL: failed to initialize the sftp server error=ssh: no key found #125

Closed bl4d3tv closed 2 years ago

bl4d3tv commented 2 years ago

I followed the quick start guide and managed to get everything up and running almost perfectly, but I can't seem to get the deamon working properly. I already tried recreating the container several times with no luck whatsoever. Every time I try to start the container it exits with code 1 because of the following error: FATAL: [Dec 7 12:49:18.046] failed to initialize the sftp server error=ssh: no key found This is the whole log before exiting:

daemon_1  | Pre-start: Checking for Daemon configuration...
daemon_1  | Pre-start: Config found
daemon_1  | Starting Pterodactyl Daemon v1.5.3...
daemon_1  | 
daemon_1  |                      ____
daemon_1  | __ Pterodactyl _____/___/_______ _______ ______
daemon_1  | \_____\    \/\/    /   /       /  __   /   ___/
daemon_1  |    \___\          /   /   /   /  /_/  /___   /
daemon_1  |         \___/\___/___/___/___/___   /______/
daemon_1  |                             /_______/ 1.5.3
daemon_1  | 
daemon_1  | Copyright © 2018 - 2021 Dane Everitt & Contributors
daemon_1  | 
daemon_1  | Website:  https://pterodactyl.io
daemon_1  |  Source:  https://github.com/pterodactyl/wings
daemon_1  | License:  https://github.com/pterodactyl/wings/blob/develop/LICENSE
daemon_1  | 
daemon_1  | This software is made available under the terms of the MIT license.
daemon_1  | The above copyright notice and this permission notice shall be included
daemon_1  | in all copies or substantial portions of the Software.
daemon_1  | 
daemon_1  |  INFO: [Dec  7 12:49:17.892] writing log files to disk path=/var/log/pterodactyl/wings.log
daemon_1  |  INFO: [Dec  7 12:49:17.892] loading configuration from file config_file=/etc/pterodactyl/config.yml
daemon_1  |  INFO: [Dec  7 12:49:17.893] configured wings with system timezone timezone=UTC
daemon_1  |  INFO: [Dec  7 12:49:17.893] checking for pterodactyl system user username={100 101}
daemon_1  |  INFO: [Dec  7 12:49:17.893] configured system user successfully gid=101 uid=100 username=pterodactyl
daemon_1  |  INFO: [Dec  7 12:49:17.893] fetching list of servers from API
daemon_1  |  INFO: [Dec  7 12:49:18.041] processing servers returned by the API total_configs=0
daemon_1  |  INFO: [Dec  7 12:49:18.041] finished processing server configurations duration=366.041µs
daemon_1  |  INFO: [Dec  7 12:49:18.045] configuring internal webserver host_address=0.0.0.0 host_port=8080 use_auto_tls=false use_ssl=false
daemon_1  |  INFO: [Dec  7 12:49:18.045] updating server states on Panel: marking installing/restoring servers as normal
daemon_1  | FATAL: [Dec  7 12:49:18.046] failed to initialize the sftp server error=ssh: no key found
daemon_1  | pterodactyl_daemon_1 exited with code 1

And this is my conf.d/daemon/config.yml (SSL is set as false because daemon is behind Traefik reverse proxy):

debug: false
app_name: Pterodactyl
uuid: XXXXXXXXXXXXXXXXXXX
token_id: XXXXXXXXXXXXXXXXX
token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
api:
  host: 0.0.0.0
  port: 8080
  ssl:
    enabled: false
    cert: /etc/letsencrypt/live/XXXXXXXXXXXXXXXXXXXXXXXXXXXX/fullchain.pem
    key: /etc/letsencrypt/live/XXXXXXXXXXXXXXXXXXXXXXXXXXXX/privkey.pem
  disable_remote_download: false
  upload_limit: 100
system:
  root_directory: /var/lib/pterodactyl
  log_directory: /var/log/pterodactyl
  data: /var/lib/pterodactyl/volumes
  archive_directory: /var/lib/pterodactyl/archives
  backup_directory: /var/lib/pterodactyl/backups
  username: pterodactyl
  timezone: UTC
  user:
    uid: 100
    gid: 101
  disk_check_interval: 150
  check_permissions_on_boot: true
  enable_log_rotate: true
  websocket_log_count: 150
  sftp:
    bind_address: 0.0.0.0
    bind_port: 2022
    read_only: false
  crash_detection:
    enabled: true
    detect_clean_exit_as_crash: true
    timeout: 60
  backups:
    write_limit: 0
  transfers:
    download_limit: 0
docker:
  network:
    interface: 172.18.0.1
    dns:
    - 1.1.1.1
    - 1.0.0.1
    name: pterodactyl_nw
    ispn: false
    driver: bridge
    network_mode: pterodactyl_nw
    is_internal: false
    enable_icc: true
    interfaces:
      v4:
        subnet: 172.18.0.0/16
        gateway: 172.18.0.1
      v6:
        subnet: fdba:17c8:6c94::/64
        gateway: fdba:17c8:6c94::1011
  domainname: ""
  registries: {}
  tmpfs_size: 100
  container_pid_limit: 512
  installer_limits:
    memory: 1024
    cpu: 100
throttles:
  enabled: true
  lines: 2000
  maximum_trigger_count: 5
  line_reset_interval: 100
  decay_interval: 10000
  stop_grace_period: 15
remote: https://XXXXXXXXXXXXXXXXXXX
remote_query:
  timeout: 30
  boot_servers_per_page: 50
allowed_mounts: []
allowed_origins: []

Finally, this is the docker-compose.yml section for the daemon:

daemon:
    environment:
      TZ: XXXXXXXXXXXXXXXXXXXXXXXXX
    image: ccarney16/pterodactyl-daemon:latest
    ports:
      - 2022:2022
    privileged: true
    restart: always
    volumes:
      - daemon_data:/var/lib/pterodactyl
      - /var/run/docker.sock:/var/run/docker.sock
      - /tmp/pterodactyl:/tmp/pterodactyl
      - ./conf.d/daemon:/etc/pterodactyl
    networks:
      services_traefik:
        aliases:
          - pt_daemon
    labels:
      traefik.enable: true
      traefik.http.routers.wings.rule: "Host(`XXXXXXXXXXXXXXXXXXXXX`)"
      traefik.http.routers.wings.entrypoints: "web, websecure"
      traefik.http.services.wings.loadbalancer.server.port: "8080"
      traefik.http.services.wings.loadbalancer.server.scheme: "http"
      traefik.docker.network: "traefik"
      traefik.http.routers.wings.tls: true
      traefik.http.routers.wings.tls.certresolver: "production"
    working_dir: /var/lib/pterodactyl

Any advise would be appreciated.

ccarney16 commented 2 years ago

I am not familiar with that error, what version of the daemon are you running, and perhaps can you go back a version?

bl4d3tv commented 2 years ago

I reinstalled everything from scratch and it fixed itself, closing this issue.