评论
分享
打赏
十一国庆,记录一次宝塔面板无法访问
 文章目录

    阅读
    分享
    打赏

    これこそが,人间の感情の极み,希望よりも热く,绝望よりも深いもの——爱よ!

    ——「魔法少女まどか☆マギカ」

    共计 0 条评论

    人机验证

    取消



    原创

    十一国庆,记录一次宝塔面板无法访问

    火喵酱
    建站玩客云宝塔面板
    2021年10月03日 0 评论 42 阅读 正在检测是否收录...

    Test

    打开网站,一切正常,都能进去。网站的redis,mysql都是正常的。后台bt命令也正常,只是唯独宝塔面板地址显示——127.0.0.1拒绝了我们的连接请求。。于是群里求助,群友说大概率是端口没开放,于是使用命令netstat -ntlp查看端口,没有8888端口!紧接着就去百度搜解决方法了。

    运行bt打开宝塔菜单,查看一下错误日志——22,显示以下错误:

        monkey.patch_all()
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/gevent/monkey.py", line 966, in patch_all
        _notify_patch(events.GeventWillPatchAllEvent(modules_to_patch, kwargs), _warnings)
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/gevent/monkey.py", line 168, in _notify_patch
        notify_and_call_entry_points(event)
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/gevent/events.py", line 111, in notify_and_call_entry_points
        for plugin in iter_entry_points(event.ENTRY_POINT_NAME):
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 641, in <genexpr>
        for entry in dist.get_entry_map(group).values()
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2854, in get_entry_map
        self._get_metadata('entry_points.txt'), self
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2534, in parse_map
        for group, lines in data:
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3190, in split_sections
        for line in yield_lines(s):
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2394, in yield_lines
        for ss in strs:
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2765, in _get_metadata
        for line in self.get_metadata_lines(name):
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1417, in get_metadata_lines
        return yield_lines(self.get_metadata(name))
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1407, in get_metadata
        value = self._get(path)
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1612, in _get
        return stream.read()
    OSError: [Errno 5] Input/output error
    Traceback (most recent call last):
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2851, in get_entry_map
        ep_map = self._ep_map
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2813, in __getattr__
        raise AttributeError(attr)
    AttributeError: _ep_map
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/www/server/panel/BT-Panel", line 11, in <module>
        monkey.patch_all()
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/gevent/monkey.py", line 966, in patch_all
        _notify_patch(events.GeventWillPatchAllEvent(modules_to_patch, kwargs), _warnings)
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/gevent/monkey.py", line 168, in _notify_patch
        notify_and_call_entry_points(event)
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/gevent/events.py", line 111, in notify_and_call_entry_points
        for plugin in iter_entry_points(event.ENTRY_POINT_NAME):
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 641, in <genexpr>
        for entry in dist.get_entry_map(group).values()
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2854, in get_entry_map
        self._get_metadata('entry_points.txt'), self
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2534, in parse_map
        for group, lines in data:
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3190, in split_sections
        for line in yield_lines(s):
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2394, in yield_lines
        for ss in strs:
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2765, in _get_metadata
        for line in self.get_metadata_lines(name):
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1417, in get_metadata_lines
        return yield_lines(self.get_metadata(name))
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1407, in get_metadata
        value = self._get(path)
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1612, in _get
        return stream.read()
    OSError: [Errno 5] Input/output error
    Traceback (most recent call last):
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2851, in get_entry_map
        ep_map = self._ep_map
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2813, in __getattr__
        raise AttributeError(attr)
    AttributeError: _ep_map
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/www/server/panel/BT-Panel", line 11, in <module>
        monkey.patch_all()
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/gevent/monkey.py", line 966, in patch_all
        _notify_patch(events.GeventWillPatchAllEvent(modules_to_patch, kwargs), _warnings)
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/gevent/monkey.py", line 168, in _notify_patch
        notify_and_call_entry_points(event)
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/gevent/events.py", line 111, in notify_and_call_entry_points
        for plugin in iter_entry_points(event.ENTRY_POINT_NAME):
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 641, in <genexpr>
        for entry in dist.get_entry_map(group).values()
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2854, in get_entry_map
        self._get_metadata('entry_points.txt'), self
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2534, in parse_map
        for group, lines in data:
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3190, in split_sections
        for line in yield_lines(s):
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2394, in yield_lines
        for ss in strs:
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2765, in _get_metadata
        for line in self.get_metadata_lines(name):
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1417, in get_metadata_lines
        return yield_lines(self.get_metadata(name))
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1407, in get_metadata
        value = self._get(path)
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1612, in _get
        return stream.read()
    OSError: [Errno 5] Input/output error

    不行啊,这么长的一片,完全看不懂,紧接着使用修复命令——16,显示以下错误:

    ERROR: Exception:
    Traceback (most recent call last):
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 173, in _main
        status = self.run(options, args)
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pip/_internal/commands/list.py", line 179, in run
        self.output_package_listing(packages, options)
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pip/_internal/commands/list.py", line 255, in output_package_listing
        data, header = format_for_columns(packages, options)
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pip/_internal/commands/list.py", line 307, in format_for_columns
        row = [proj.raw_name, str(proj.version)]
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pip/_internal/metadata/base.py", line 163, in raw_name
        retu rn self.metadata.get("Name", self.canonical_name)
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pip/_internal/metadata/pkg_resources.py", line 96, in metadata
        return get_metadata(self._dist)
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pip/_internal/utils/packaging.py", line 48, in get_metadata
        metadata = dist.get_metadata(metadata_name)
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1420, in get_metadata
        value = self._get(path)
      File "/www/server/panel/pyenv/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1617, in _get
        return stream.read()
    OSError: [Errno 5] Input/output error

    这个短,看出来是在/www/server/panel/pyenv/lib/python3.7/路径下出了问题。在宝塔论坛 发帖求助 也没人搭理。只好强硬的来尝试修复了——

    • 直接重命名/www/server/panel/pyenv/文件夹
    • 使用官方安装命令覆盖安装宝塔面板,修复python环境

    在安装了108分钟之后,顺利的进入到了后台,这时查看netstat -ntlp,也能看到8888端口了,一切正常了!!

    爽啊啊啊啊~~

    - - - The END - - -

    - - - 打 赏 - - -
    版权属于: 火喵 ©
    最后更新: 2021 年 10 月 03 日 11 时
    解压密码: ✽✽✽✽✽✽
    阅读时间: 本文共 281 个字数,平均阅读时长 ≈ 1分钟