当前位置:首页 > 大杂烩 > 正文内容

vmvare虚拟机安装宝塔报错UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)

高老师3年前 (2023-06-24)大杂烩737

今天在vmware虚拟机安装宝塔时报错,没有多想就认为是系统镜像问题,于是重新下载了其他镜像,结果一样报错,报错信息如下:

    self.update_environ()
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/gevent/pywsgi.py", line 1558, in update_environ
    name = socket.getfqdn(address[0])
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/gevent/_socketcommon.py", line 304, in getfqdn
    hostname, aliases, _ = gethostbyaddr(name)
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/gevent/_socketcommon.py", line 276, in gethostbyaddr
    return get_hub().resolver.gethostbyaddr(ip_address)
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/gevent/resolver/thread.py", line 66, in gethostbyaddr
    return self.pool.apply(_socket.gethostbyaddr, args, kwargs)
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/gevent/pool.py", line 161, in apply
    return self.spawn(func, *args, **kwds).get()
  File "src/gevent/event.py", line 306, in gevent._gevent_cevent.AsyncResult.get
  File "src/gevent/event.py", line 336, in gevent._gevent_cevent.AsyncResult.get
  File "src/gevent/event.py", line 324, in gevent._gevent_cevent.AsyncResult.get
  File "src/gevent/event.py", line 304, in gevent._gevent_cevent.AsyncResult._raise_exception
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/gevent/_compat.py", line 65, in reraise
    raise value.with_traceback(tb)
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/gevent/threadpool.py", line 167, in __run_task
    thread_result.set(func(*args, **kwargs))
UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)

可以看到gethostbyaddr错误信息,可能是获取系统的主机名失败,我们尝试修改一个主机名

# 修改系统的主机名

hostnamectl set-hostname 主机名

# 重启系统生效

reboot

成功解决问题

扫描二维码推送至手机访问。

版权声明:本文由高久峰个人博客发布,如需转载请注明出处。

本文链接:https://blog.20230611.cn/post/625.html

分享给朋友:

“vmvare虚拟机安装宝塔报错UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long)” 的相关文章

svn自动更新到网站

svn自动更新到网站

【一】.钩子文件的设置和创建(1).打开hooks目录,可以看到有一个post-commit.tmpl文件,这是一个模板文件。复制一份,重命名为post-commit,将其用户组设为www,并设置为可执行。chown www:www post-commitchmod +x post-commit(2...

Git从远程仓库更新文件

Git从远程仓库更新文件

 git   pull  https://git.oschina.net/392223903/learn.git   master   换为您的git地址...

c#中文简体转换繁体

c#中文简体转换繁体

private const string fantizi = "高久峰是個程序員"; private const string jiantizi = "高久峰是个程序员...

redis安装教程

redis安装教程

1.文件redis-2.6.14.tar.gz的上传 /home/john/创建rdtar文件夹 上传redis-2.6.14.tar.gz至rdtar文件夹  2.解压文件  cd /home/john/rdtar tar &n...

redis string结构及命令详解

redis string结构及命令详解

1.set key value [ex 秒数] / [px 毫秒数]  [nx] /[xx]如: set a 1 ex 10 , 10秒有效Set a 1 px 9000  , 9秒有效注: 如果ex,px同时写,以后面的有效期为准如 set a 1 ex 100 px 9000...

redis链表,redis list链表命令大全

redis链表,redis list链表命令大全

1.lpush key value  作用: 把值插入到链接头部(左边)2.rpush key value  作用: 把值插入到链接尾部(右边)3.lrange key start  stop 作用: 返回链表中[start ,stop]中的元素 规律: 左数从0开始,...