×

PVE登录提示You do not have a valid subscription for this server.Please visit www.proxmox.com

hqy hqy 发表于2022-11-07 14:22:31 浏览1174 评论0

抢沙发发表评论

说明:上篇文章《U 盘(优盘)安装 Proxmox VE 图文教程》,主要对如何通过U盘来安装PVE做了一个简单的了解,在我们安装完成后登陆的时候如果不是订阅用户默认会提示一个讨人烦的信息:没有有效的订阅You do not have a valid subscription for this server. Please visit www.proxmox.com to get a list of available options.


用的是免费版的,所以每次都弹窗是真的挺烦的

d6f3f13a6af7c087a946ef8dbfc55a2c_20210201001414939.png




Pve 自带的编辑器太难用了,建议可以安装一个mp;spm=1001.2101.3001.7020","extra":"{\"searchword\":\"Vim\"}"}" data-tit="Vim" data-pretit="vim" style="box-sizing: border-box; outline: none; margin: 0px 3px 0px 0px; padding: 0px 14px 0px 3px; text-decoration-line: none; cursor: pointer; background: url("../img/iconHighlight.svg") right top / 12px 14px no-repeat transparent; color: rgb(252, 85, 49); overflow-wrap: break-word; border-radius: 3px; box-shadow: none;">Vim

apt-get update
apt-get install vim

如果无法安装,且vi命令编辑异常时参照:ProxmoxVE下使用vi编辑文件异常处理



解决方法:


手动修改文件/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js


修改之前记得先备份一下root@kvm2:/usr/share/javascript/proxmox-widget-toolkit# cp proxmoxlib.js proxmoxlib.js.bak


root@kvm2:/usr/share/javascript/proxmox-widget-toolkit# ls


proxmoxlib.js proxmoxlib.js.bak


root@kvm2:/usr/share/javascript/proxmox-widget-toolkit# vim proxmoxlib.js


然后找到if (data.status !== 'Active') {


acbc30a48de7990b4c1febeaf11aabe7_watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzIxMTI3MTUx,size_16,color_FFFFFF,t_70.png


修改为if (false) {


445440da0f747de9f97a26f8481dbd15_20210201001645116.png


然后保存,重启网页服务systemctl restart pveproxy

如果没有反应,SSH进去ystemctl status pveproxy  查看服务是不是没有成功启动,

root@PVE:~# systemctl status pveproxy

● pveproxy.service - PVE API Proxy Server

     Loaded: loaded (/lib/systemd/system/pveproxy.service; enabled; vendor pres>

     Active: deactivating (stop-sigterm) since Mon 2022-11-07 14:20:37 CST; 1mi>

    Process: 1010 ExecStartPre=/usr/bin/pvecm updatecerts --silent (code=exited>

    Process: 1028 ExecStart=/usr/bin/pveproxy start (code=exited, status=0/SUCC>

    Process: 29618 ExecStop=/usr/bin/pveproxy stop (code=exited, status=0/SUCCE>

   Main PID: 1029 (code=exited, status=0/SUCCESS)

      Tasks: 1 (limit: 19082)

     Memory: 136.6M

        CPU: 1min 2.127s

     CGroup: /system.slice/pveproxy.service

             └─29636 pveproxy worker (shutdown)


Nov 07 14:20:37 PVE systemd[1]: Stopping PVE API Proxy Server...

Nov 07 14:20:38 PVE pveproxy[1029]: received signal TERM

Nov 07 14:20:38 PVE pveproxy[1029]: server closing

Nov 07 14:20:38 PVE pveproxy[26256]: worker exit

Nov 07 14:20:38 PVE pveproxy[27715]: worker exit

Nov 07 14:20:38 PVE pveproxy[26850]: worker exit

Nov 07 14:20:38 PVE pveproxy[1029]: worker 26256 finished

Nov 07 14:20:38 PVE pveproxy[1029]: worker 27715 finished

Nov 07 14:20:38 PVE pveproxy[1029]: worker 26850 finished

Nov 07 14:20:38 PVE pveproxy[1029]: server stopped



没有再手动启动  ystemctl start pveproxy

root@GZBW-PVE:~# systemctl start pveproxy

再查看是否启动正常:

root@PVE:~# systemctl status pveproxy

● pveproxy.service - PVE API Proxy Server

     Loaded: loaded (/lib/systemd/system/pveproxy.service; enabled; vendor pres>

     Active: active (running) since Mon 2022-11-07 14:22:11 CST; 3s ago

    Process: 29854 ExecStartPre=/usr/bin/pvecm updatecerts --silent (code=exite>

    Process: 29856 ExecStart=/usr/bin/pveproxy start (code=exited, status=0/SUC>

   Main PID: 29857 (pveproxy)

      Tasks: 4 (limit: 19082)

     Memory: 133.6M

        CPU: 1.309s

     CGroup: /system.slice/pveproxy.service

             ├─29857 pveproxy

             ├─29858 pveproxy worker

             ├─29859 pveproxy worker

             └─29860 pveproxy worker


Nov 07 14:22:09 PVE systemd[1]: Starting PVE API Proxy Server...

Nov 07 14:22:11 PVE pveproxy[29857]: starting server

Nov 07 14:22:11 PVE pveproxy[29857]: starting 3 worker(s)

Nov 07 14:22:11 PVE pveproxy[29857]: worker 29858 started

Nov 07 14:22:11 PVE pveproxy[29857]: worker 29859 started

Nov 07 14:22:11 PVE pveproxy[29857]: worker 29860 started

Nov 07 14:22:11 PVE systemd[1]: Started PVE API Proxy Server.




然后CTRL+F5强制刷新网页,或清理一下浏览器的缓存就好了!


其实上面的步骤也可以理解为:将/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js文件中的data.status !== 'Active'替换为false。既然是这样,那么我们可直接使用SED命令来搞定:sed -i.bak "s/data.status !== 'Active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy


执行完成后,清理一下浏览器的缓存就可以了。



打赏

本文链接:https://www.kinber.cn/post/2848.html 转载需授权!

分享到:


推荐本站淘宝优惠价购买喜欢的宝贝:

image.png

 您阅读本篇文章共花了: 

群贤毕至

访客