为什么在云服务上部署的Maxkb不能修改且不能保存发布应用


我在服务器上部署maxkb,通过内网进行访问,但是为什么服务可以启动,保存和发布应用的按钮甚至修改大模型的按钮点了都没有反应,控制台报错如图,请问这种情况怎么解决 :face_with_spiral_eyes: :sob:

以下内容是maxkb日志(似乎是Gunicorn没有正常启动,只是Gunicorn的问题吗)

[root@localhost ~]# docker logs maxkb
Operations to perform:
Apply all migrations: application, contenttypes, django_apscheduler, django_celery_beat, knowledge, models_provider, system_manage, tools, users
Running migrations:
Applying users.0001_initial… OK
Applying system_manage.0001_initial… OK
Applying models_provider.0001_initial… OK
Applying knowledge.0001_initial… OK
Applying application.0001_initial… OK
Applying contenttypes.0001_initial… OK
Applying contenttypes.0002_remove_content_type_name… OK
Applying django_apscheduler.0001_initial… OK
Applying django_apscheduler.0002_auto_20180412_0758… OK
Applying django_apscheduler.0003_auto_20200716_1632… OK
Applying django_apscheduler.0004_auto_20200717_1043… OK
Applying django_apscheduler.0005_migrate_name_to_id… OK
Applying django_apscheduler.0006_remove_djangojob_name… OK
Applying django_apscheduler.0007_auto_20200717_1404… OK
Applying django_apscheduler.0008_remove_djangojobexecution_started… OK
Applying django_apscheduler.0009_djangojobexecution_unique_job_executions… OK
Applying django_celery_beat.0001_initial… OK
Applying django_celery_beat.0002_auto_20161118_0346… OK
Applying django_celery_beat.0003_auto_20161209_0049… OK
Applying django_celery_beat.0004_auto_20170221_0000… OK
Applying django_celery_beat.0005_add_solarschedule_events_choices… OK
Applying django_celery_beat.0006_auto_20180322_0932… OK
Applying django_celery_beat.0007_auto_20180521_0826… OK
Applying django_celery_beat.0008_auto_20180914_1922… OK
Applying django_celery_beat.0006_auto_20180210_1226… OK
Applying django_celery_beat.0006_periodictask_priority… OK
Applying django_celery_beat.0009_periodictask_headers… OK
Applying django_celery_beat.0010_auto_20190429_0326… OK
Applying django_celery_beat.0011_auto_20190508_0153… OK
Applying django_celery_beat.0012_periodictask_expire_seconds… OK
Applying django_celery_beat.0013_auto_20200609_0727… OK
Applying django_celery_beat.0014_remove_clockedschedule_enabled… OK
Applying django_celery_beat.0015_edit_solarschedule_events_choices… OK
Applying django_celery_beat.0016_alter_crontabschedule_timezone… OK
Applying django_celery_beat.0017_alter_crontabschedule_month_of_year… OK
Applying django_celery_beat.0018_improve_crontab_helptext… OK
Applying django_celery_beat.0019_alter_periodictasks_options… OK
Applying tools.0001_initial… OK

  • Start Gunicorn WSGI HTTP Server

  • Start Gunicorn Local Model WSGI HTTP Server

  • Start Celery as Distributed Task Queue: Celery
    Operations to perform:
    Apply all migrations: application, contenttypes, django_apscheduler, django_celery_beat, knowledge, models_provider, system_manage, tools, users
    Running migrations:
    No migrations to apply.
    Your models in app(s): ‘knowledge’ have changes that are not yet reflected in a migration, and so won’t be applied.
    Run ‘manage.py makemigrations’ to make new migrations, and then re-run ‘manage.py migrate’ to apply them.

  • Start Gunicorn WSGI HTTP Server

  • Start Celery as Distributed Task Queue: Celery

  • Start Gunicorn Local Model WSGI HTTP Server
    Operations to perform:
    Apply all migrations: application, contenttypes, django_apscheduler, django_celery_beat, knowledge, models_provider, system_manage, tools, users
    Running migrations:
    No migrations to apply.
    Your models in app(s): ‘knowledge’ have changes that are not yet reflected in a migration, and so won’t be applied.
    Run ‘manage.py makemigrations’ to make new migrations, and then re-run ‘manage.py migrate’ to apply them.

  • Start Gunicorn WSGI HTTP Server

  • Start Gunicorn Local Model WSGI HTTP Server

  • Start Celery as Distributed Task Queue: Celery
    Operations to perform:
    Apply all migrations: application, contenttypes, django_apscheduler, django_celery_beat, knowledge, models_provider, system_manage, tools, users
    Running migrations:
    No migrations to apply.
    Your models in app(s): ‘knowledge’ have changes that are not yet reflected in a migration, and so won’t be applied.
    Run ‘manage.py makemigrations’ to make new migrations, and then re-run ‘manage.py migrate’ to apply them.

  • Start Gunicorn Local Model WSGI HTTP Server

  • Start Celery as Distributed Task Queue: Celery

  • Start Gunicorn WSGI HTTP Server
    Operations to perform:
    Apply all migrations: application, contenttypes, django_apscheduler, django_celery_beat, knowledge, models_provider, system_manage, tools, users
    Running migrations:
    No migrations to apply.

  • Start Gunicorn Local Model WSGI HTTP Server

  • Start Celery as Distributed Task Queue: Celery

  • Start Gunicorn WSGI HTTP Server

云服务的防火墙,端口都开放了吗

本机可以正常访问8080端口,应该是说明端口打开了。防火墙也加了这个端口。
我用curl -v这个url,返回如下:
C:\Users\86131>curl -v http://10.0.20.36:8080/admin/api/workspace/default/model/01987a6d-1d17-7742-8c73-1593952ed65d

  • Uses proxy env variable http_proxy == ‘127.0.0.1:7890’
  • Trying 127.0.0.1…
  • TCP_NODELAY set
  • Connected to 127.0.0.1 (127.0.0.1) port 7890 (#0)

GET http://10.0.20.36:8080/admin/api/workspace/default/model/01987a6d-1d17-7742-8c73-1593952ed65d HTTP/1.1
Host: 10.0.20.36:8080
User-Agent: curl/7.61.0
Accept: /
Proxy-Connection: Keep-Alive

< HTTP/1.1 502 Bad Gateway
< Connection: keep-alive
< Keep-Alive: timeout=4
< Proxy-Connection: keep-alive
< Content-Length: 0
<

  • Connection #0 to host 127.0.0.1 left intact

好像是通过代理转发出错,不知道是否绕过代理

试试不走代理呢

关闭代理后又报权限的问题

C:\Users\86131>curl -v http://10.0.20.36:8080/admin/api/workspace/default/model/01987a6d-1d17-7742-8c73-1593952ed65d

  • Trying 10.0.20.36…
  • TCP_NODELAY set
  • Connected to 10.0.20.36 (10.0.20.36) port 8080 (#0)

GET /admin/api/workspace/default/model/01987a6d-1d17-7742-8c73-1593952ed65d HTTP/1.1
Host: 10.0.20.36:8080
User-Agent: curl/7.61.0
Accept: /

< HTTP/1.1 401 Unauthorized
< Server: gunicorn
< Date: Wed, 06 Aug 2025 06:55:42 GMT
< Connection: keep-alive
< Content-Type: application/json
< Vary: Accept, Accept-Language
< Allow: GET, PUT, DELETE, HEAD, OPTIONS
< Content-Length: 91
< X-Content-Type-Options: nosniff
< Referrer-Policy: same-origin
< Cross-Origin-Opener-Policy: same-origin
< Content-Language: zh
<
{“code”: 1003, “message”: “\u672a\u767b\u5f55\uff0c\u8bf7\u5148\u767b\u5f55”, “data”: null}* Connection #0 to host 10.0.20.36 left intact

你试试能不能保存发布应用了,你curl请求头里面没有token肯定会报401,你试试web访问是不是好的

还是不行,甚至换了个版本(v1.10.9),还是报这个错,应用不能保存不能发布,密码不能修改,应该任何需要修改的地方都修改不了 :sob:

哪种方式部署的?

linux服务器1panel面板一键安装的maxkb,也试过离线下载,同样会有这个问题

云服务安全组出方向和入方向对应的端口都开放了吗