Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alist 3.0.0-beta.0 版本启动失败 #1624

Closed
3 tasks done
sukanka opened this issue Sep 9, 2022 · 1 comment
Closed
3 tasks done

alist 3.0.0-beta.0 版本启动失败 #1624

sukanka opened this issue Sep 9, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@sukanka
Copy link

sukanka commented Sep 9, 2022

Please make sure of the following things

  • I have read the documentation.
  • I'm sure there are no duplicate issues or discussions.
  • I'm sure it's due to alist and not something else(such as Dependencies or Operational).

Alist Version / Alist 版本

3.0.0-beta.0

Driver used / 使用的存储驱动

不适用

Describe the bug / 问题描述

升级到 3.0.0-beta.0 之后无法启动.

# /usr/bin/alist server --conf /etc/alist/config.json
INFO[2022-09-09 18:17:54] reading config file: /etc/alist/config.json  
INFO[2022-09-09 18:17:54] load config from env with prefix: ALIST_     
FATA[2022-09-09 18:17:54] create temp dir error: mkdir : no such file or directory 

配置文件 /etc/alist/config.json 如下(从官方文档抄的然后改了下路径)

{
  "force": false,
  "address": "0.0.0.0",
  "port": 5244,
  "jwt_secret": "random generated",
  "cdn": "https://cdn.jsdelivr.net/npm/alist-web@$version/dist/",
  "database": {
    "type": "sqlite3",
    "host": "",
    "port": 0,
    "user": "",
    "password": "",
    "name": "",
    "db_file": "/var/lib/alist/data.db",
    "ssl_mode": "disable",
    "table_prefix": "x_"
  },
  "scheme": {
    "https": false,
    "cert_file": "",
    "key_file": ""
  },
  "temp_dir": "/var/cache/alist/temp",
  "log": {
    "enable": false,
    "name": "/var/log/alist/log.log",
    "max_size": 10,
    "max_backups": 5,
    "max_age": 28,
    "compress": false
  }
}

temp_dir 权限如下: (不管是否自己创建这个文件夹都会报错)

# ls -al /var/cache/alist/temp 
total 8
drwx------ 2 root root 4096 Sep  9 18:05 .
drwx------ 3 root root 4096 Sep  9 18:05 ..

在不设置环境变量的情况下, 直接使用 /usr/bin/alist server 启动则一切正常, 将 config.jsontemp_dir 设置为 data/temp 也正常. 但是设置如下的环境变量之后(也可以是 data/temp 之外的任意值) alist 也不能正常工作.
export ALIST_TEMP_DIR="/tmp/temp"

Reproduction / 复现链接

不适用

Logs / 日志

No response

@sukanka sukanka added the bug Something isn't working label Sep 9, 2022
@xhofe xhofe closed this as completed in 4af9124 Sep 9, 2022
@xhofe
Copy link
Collaborator

xhofe commented Sep 9, 2022

请暂时使用相对路径。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants