宝塔用户_zklune 发表于 2025-9-23 11:06:17

【已解决】11.0.0升级11.1.0后面板打不开

为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本:
11.0.0升级11.1.0
系统版本:
Ubuntu 22.04.5 LTS - 5.15.0-60-generic - x86_64
问题描述:
11.0.0更新11.1.0后服务报错,面板服务无法启动
相关截图(日志、错误):
已经更新过pip源,用的是腾讯云的源,修复服务还是拉不起来

阿珂 发表于 2025-9-23 14:42:11

私信发服务器ssh信息看下

堡塔运维包子 发表于 2025-9-23 14:44:01

cd /www/server/panel
btpython BT-Panel
执行以下以上命令截图看看错误信息是啥?

宝塔用户_zklune 发表于 2025-9-23 15:35:57

堡塔运维包子 发表于 2025-9-23 14:44
执行以下以上命令截图看看错误信息是啥?

root@lavm-7oua8jh7vq:~# cd /www/server/panel
root@lavm-7oua8jh7vq:/www/server/panel# btpython BT-Panel
/www/server/panel/pyenv/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 40 from C header, got 152 from PyObject
return f(*args, **kwds)
/www/server/panel/pyenv/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 40 from C header, got 152 from PyObject
return f(*args, **kwds)
/www/server/panel/pyenv/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 40 from C header, got 152 from PyObject
return f(*args, **kwds)
/www/server/panel/pyenv/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 40 from C header, got 152 from PyObject
return f(*args, **kwds)
/www/server/panel/pyenv/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 40 from C header, got 152 from PyObject
return f(*args, **kwds)
/www/server/panel/pyenv/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 40 from C header, got 152 from PyObject
return f(*args, **kwds)
/www/server/panel/pyenv/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 40 from C header, got 152 from PyObject
return f(*args, **kwds)
/www/server/panel/pyenv/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 40 from C header, got 152 from PyObject
return f(*args, **kwds)
/www/server/panel/pyenv/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 40 from C header, got 152 from PyObject
return f(*args, **kwds)
/www/server/panel/pyenv/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 40 from C header, got 152 from PyObject
return f(*args, **kwds)
Segmentation fault (core dumped)

堡塔运维包子 发表于 2025-9-23 15:53:23

宝塔用户_zklune 发表于 2025-9-23 15:35
root@lavm-7oua8jh7vq:~# cd /www/server/panel
root@lavm-7oua8jh7vq:/www/server/panel# btpython BT-P ...

head -n 100 /www/server/panel/BTPanel/__init__.py
看看代码, 是不是包没有同步

宝塔用户_zklune 发表于 2025-9-23 15:57:14

堡塔运维包子 发表于 2025-9-23 15:53
看看代码, 是不是包没有同步

# coding: utf-8
# +-------------------------------------------------------------------
# | 宝塔Linux面板
# +-------------------------------------------------------------------
# | Copyright (c) 2015-2099 宝塔软件(http://bt.cn) All rights reserved.
# +-------------------------------------------------------------------
# | Author:   hwliang <hwl@bt.cn>
# +-------------------------------------------------------------------
import logging
import sys
import json
import os
import threading
import time
import re
import traceback
import uuid
import psutil
import socket

panel_path = '/www/server/panel'
if not os.name in ['nt']:
    os.chdir(panel_path)
if not 'class/' in sys.path:
    sys.path.insert(0, 'class/')

from flask import Flask, session, render_template, send_file, request, redirect, g, make_response, \
    render_template_string, abort, stream_with_context, Response as Resp
from cachelib import SimpleCache,FileSystemCache
from werkzeug.wrappers import Response
from flask_session import Session
from flask_compress import Compress

is_process = os.path.exists(panel_path + '/data/is_process.pl')
if is_process:
    cache = FileSystemCache(panel_path + "/data/cache",5000)
else:
    cache = SimpleCache(5000)
import public

# 初始化Flask应用
app = Flask(__name__,
            template_folder="templates/{}".format(
                public.GetConfigValue('template')))
Compress(app)
try:
    from flask_sock import Sock
except:
    from flask_sockets import Sockets as Sock

sockets = Sock(app)
# 注册HOOK
hooks = {}
if not hooks:
    public.check_hooks()
# import db
dns_client = None
app.config['DEBUG'] = os.path.exists('data/debug.pl')
app.config['SSL'] = os.path.exists('data/ssl.pl')

# 设置BasicAuth
basic_auth_conf = 'config/basic_auth.json'
app.config['BASIC_AUTH_OPEN'] = False
if os.path.exists(basic_auth_conf):
    try:
      ba_conf = json.loads(public.readFile(basic_auth_conf))
      app.config['BASIC_AUTH_USERNAME'] = ba_conf['basic_user']
      app.config['BASIC_AUTH_PASSWORD'] = ba_conf['basic_pwd']
      app.config['BASIC_AUTH_OPEN'] = ba_conf['open']
    except:
      pass

# 初始化SESSION服务
app.secret_key = public.md5(
    str(os.uname()) +
    str(psutil.boot_time()))
local_ip = None
my_terms = {}

app.config['SESSION_TYPE'] = 'filesystem'
app.config['SESSION_FILE_DIR'] = panel_path + '/data/session'
app.config['SESSION_FILE_THRESHOLD'] = 1000
app.config['SESSION_FILE_MODE'] = 0o600
app.config['SESSION_FILE_LOCK'] = 1

# app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///{}/data/db/session.db'.format(panel_path)
# app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
# app.config['SESSION_TYPE'] = 'sqlalchemy'

app.config['SESSION_PERMANENT'] = True
app.config['SESSION_USE_SIGNER'] = True
app.config['SESSION_KEY_PREFIX'] = 'BT_:'
app.config['PERMANENT_SESSION_LIFETIME'] = max(8600, public.get_session_timeout())
app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 86400
if app.config['SSL']:
    app.config['SESSION_COOKIE_SAMESITE'] = None
    # app.config['SESSION_COOKIE_SECURE'] = True
    app.config['SESSION_COOKIE_NAME'] = public.md5(app.secret_key) + "_ssl"
else:
    app.config['SESSION_COOKIE_SAMESITE'] = None

堡塔运维包子 发表于 2025-9-23 16:53:19

宝塔用户_zklune 发表于 2025-9-23 15:57
# coding: utf-8
# +-------------------------------------------------------------------
# | 宝塔Lin ...

那代码应该是没问题的,执行一下btpip install -U gevent greenlet

试试修复一下依赖

宝塔用户_zklune 发表于 2025-9-23 17:10:45

堡塔运维包子 发表于 2025-9-23 16:53
那代码应该是没问题的,执行一下
试试修复一下依赖

不行,修复依赖之后重启面板还是无法启动

堡塔运维包子 发表于 2025-9-23 17:51:33

宝塔用户_zklune 发表于 2025-9-23 17:10
不行,修复依赖之后重启面板还是无法启动

btpip uninstall -y gevent greenlet
btpip uninstall -y gevent greenlt

把这个执行一下,在执行安装
btpip install gevent grennlet

堡塔运维包子 发表于 2025-9-23 17:52:29

堡塔运维包子 发表于 2025-9-23 17:51
把这个执行一下,在执行安装

执行两次卸载,在安装,如果还是不行私发ssh信息给我

宝塔用户_zklune 发表于 2025-9-23 18:27:42

堡塔运维包子 发表于 2025-9-23 17:52
执行两次卸载,在安装,如果还是不行私发ssh信息给我

两次卸载之后重装正常了,感谢:handshake
页: [1]
查看完整版本: 【已解决】11.0.0升级11.1.0后面板打不开