openmediavault omv3升级omv4

在升级openmediavault的omv3到omv4的时候出现升级后无法进入界面。

先说一下omv3升级到omv4的流程

apt-get update
apt-get upgrade
omv-update
omv-initsystem

注意:在root下

错误1: apt-get update 错误

weakref.py 'NoneType' object is not callable

apt-get update升级中遇到升级错误:


Traceback (most recent call last):

  File "/usr/lib/python3.5/weakref.py", line 117, in remove

TypeError: 'NoneType' object is not callable

E: Sub-process /usr/bin/dpkg returned an error code (1)

在论坛上找到是由于python3.5的bug导致的错误https://forum.openmediavault.org/index.php/Thread/22370-Errors-when-Upgrading-from-OMV-3-0-99-to-OMV-4/

手动修复


cd /usr/lib/python3.5

nano weakref.py 

第109行 def remove(wr, selfref=ref(self)):替换成def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref):

第117行_remove_dead_weakref(d, wr.key)替换成_atomic_removal(d, wr.key)

错误2:登录界面输入账号密码后无法登录:Failed to connect to socket: No such file or directory

错误 #0: OMV\Rpc\Exception: Failed to connect to socket: No such file or directory in /usr/share/php/openmediavault/rpc/rpc.inc:140 Stack trace: #0 /var/www/openmediavault/rpc/session.inc(56): OMV\Rpc\Rpc::call('UserMgmt', 'authUser', Array, Array, 2, true) #1 [internal function]: OMVRpcServiceSession->login(Array, Array) #2 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array) #3 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('login', Array, Array) #4 /usr/share/php/openmediavault/rpc/proxy/json.inc(95): OMV\Rpc\Rpc::call('Session', 'login', Array, Array, 3) #5 /var/www/openmediavault/rpc.php(45): OMV\Rpc\Proxy\Json->handle() #6 {main}

查看/var/log/syslog发现有

'omv-engined'failedtostart(exitstatus1)--'/bin/systemctl start openmediavault-engined':Failedtostartopenmediavault-engined.service:Unitopenmediavault-engined.serviceismasked.

参考[http://www.mobibrw.com/2017/8741]
(http://www.mobibrw.com/2017/8741)

修复

$ omv-mkconf collectd

$ omv-mkconf rrdcached

$ omv-mkconf monit

$ sudo systemctl unmask openmediavault-engined.service

$ sudo reboot

错误3:登录界面输入账号密码后无法进入后台,又返回登录界面,账号密码是正确的,输入错误密码会报密码错误

查看日志发现有一个明显的错误信息

tail -f /var/log/nginx/openmediavault-webgui_error.log
image.png

/var/lib/php/sessions/ Permission denied

omv4使用的php版本从php5升级到了php7,可能是导致这个问题的原因,给/var/lib/php/sessions/授权即可

chmod 777 /var/lib/php/session  

终于omv3升级omv4成功,在论坛https://forum.openmediavault.org/发现升级出现问题的还是很多啊。

你可能感兴趣的:(openmediavault omv3升级omv4)