Cannot upgrade to the latest Nextcloud from 820. I guess, either I am missing an update or an app causes the failure. If missing intermediate update which version is it and what would be the commands to get all versions installed and upgraded? If app is blocking the update how to find out which app need to disable?
Here is the output from the command line attempted upgrade:
root@syncloud:~# snap refresh nextcloud --channel=latest/stable --amend
error: cannot perform the following tasks:
Run post-refresh hook of “nextcloud” snap if present (run hook “post-refresh”:
Traceback (most recent call last):
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/site-packages/syncloudlib/application/connection.py”, line 21, in api_post
raise Exception(‘unable to connect to {0} with error code: {1}’.format(socket, response.status_code))
Exception: unable to connect to http+unix://%2Fvar%2Fsnap%2Fplatform%2Fcommon%2Fapi.socket with error code: 500
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/snap/nextcloud/837/meta/hooks/post-refresh”, line 7, in
Installer().post_refresh()
File “/snap/nextcloud/837/hooks/installer.py”, line 91, in post_refresh
self.install_config()
File “/snap/nextcloud/837/hooks/installer.py”, line 55, in install_config
storage.init_storage(APP_NAME, USER_NAME)
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/site-packages/syncloudlib/application/storage.py”, line 5, in init_storage
return api_post(‘/app/init_storage’, data={“app_name”: app, “user_name”: user})
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/site-packages/syncloudlib/application/connection.py”, line 23, in api_post
raise Exception(‘unable to connect to {0}’.format(socket), e)
Exception: (‘unable to connect to http+unix://%2Fvar%2Fsnap%2Fplatform%2Fcommon%2Fapi.socket’, Exception(‘unable to connect to http+unix://%2Fvar%2Fsnap%2Fplatform%2Fcommon%2Fapi.socket with error code: 500’))
-----)
root@syncloud:~# snap refresh nextcloud
error: cannot perform the following tasks:
Run post-refresh hook of “nextcloud” snap if present (run hook “post-refresh”:
Traceback (most recent call last):
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/site-packages/syncloudlib/application/connection.py”, line 21, in api_post
raise Exception(‘unable to connect to {0} with error code: {1}’.format(socket, response.status_code))
Exception: unable to connect to http+unix://%2Fvar%2Fsnap%2Fplatform%2Fcommon%2Fapi.socket with error code: 500
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/snap/nextcloud/837/meta/hooks/post-refresh”, line 7, in
Installer().post_refresh()
File “/snap/nextcloud/837/hooks/installer.py”, line 91, in post_refresh
self.install_config()
File “/snap/nextcloud/837/hooks/installer.py”, line 55, in install_config
storage.init_storage(APP_NAME, USER_NAME)
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/site-packages/syncloudlib/application/storage.py”, line 5, in init_storage
return api_post(‘/app/init_storage’, data={“app_name”: app, “user_name”: user})
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/site-packages/syncloudlib/application/connection.py”, line 23, in api_post
raise Exception(‘unable to connect to {0}’.format(socket), e)
Exception: (‘unable to connect to http+unix://%2Fvar%2Fsnap%2Fplatform%2Fcommon%2Fapi.socket’, Exception(‘unable to connect to http+unix://%2Fvar%2Fsnap%2Fplatform%2Fcommon%2Fapi.socket with error code: 500’))
-----)
root@syncloud:~# systemctl status snap.platform.api
● snap.platform.api.service - Service for snap application platform.api
Loaded: loaded (/etc/systemd/system/snap.platform.api.service; enabled)
Active: active (running) since Fri 2025-06-13 22:08:53 PDT; 2 days ago
Main PID: 390 (api)
CGroup: /system.slice/snap.platform.api.service
└─390 /snap/platform/2254/bin/api unix /var/snap/platform/common/api.socket
Jun 16 08:18:05 syncloud platform.api[390]: github.com/syncloud/platform/rest.(*Middleware).JsonHeader-fm.(*Middleware).JsonHeader.func1
Jun 16 08:18:05 syncloud platform.api[390]: /drone/src/backend/rest/middleware.go:73
Jun 16 08:18:05 syncloud platform.api[390]: net/http.HandlerFunc.ServeHTTP
Jun 16 08:18:05 syncloud platform.api[390]: /usr/local/go/src/net/http/server.go:2166
Jun 16 08:18:05 syncloud platform.api[390]: github.com/gorilla/mux.(*Router).ServeHTTP
Jun 16 08:18:05 syncloud platform.api[390]: /go/pkg/mod/github.com/gorilla/mux@v1.8.0/mux.go:210
Jun 16 08:18:05 syncloud platform.api[390]: net/http.serverHandler.ServeHTTP
Jun 16 08:18:05 syncloud platform.api[390]: /usr/local/go/src/net/http/server.go:3137
Jun 16 08:18:05 syncloud platform.api[390]: net/http.(*conn).serve
Jun 16 08:18:05 syncloud platform.api[390]: /usr/local/go/src/net/http/server.go:2039
New logs on the way. Below is again the output from the command I run:
root@syncloud:~# snap refresh nextcloud
error: cannot perform the following tasks:
Run post-refresh hook of “nextcloud” snap if present (run hook “post-refresh”:
Traceback (most recent call last):
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/site-packages/syncloudlib/application/connection.py”, line 21, in api_post
raise Exception(‘unable to connect to {0} with error code: {1}’.format(socket, response.status_code))
Exception: unable to connect to http+unix://%2Fvar%2Fsnap%2Fplatform%2Fcommon%2Fapi.socket with error code: 500
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/snap/nextcloud/837/meta/hooks/post-refresh”, line 7, in
Installer().post_refresh()
File “/snap/nextcloud/837/hooks/installer.py”, line 91, in post_refresh
self.install_config()
File “/snap/nextcloud/837/hooks/installer.py”, line 55, in install_config
storage.init_storage(APP_NAME, USER_NAME)
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/site-packages/syncloudlib/application/storage.py”, line 5, in init_storage
return api_post(‘/app/init_storage’, data={“app_name”: app, “user_name”: user})
File “/snap/nextcloud/current/python/usr/local/lib/python3.8/site-packages/syncloudlib/application/connection.py”, line 23, in api_post
raise Exception(‘unable to connect to {0}’.format(socket), e)
Exception: (‘unable to connect to http+unix://%2Fvar%2Fsnap%2Fplatform%2Fcommon%2Fapi.socket’, Exception(‘unable to connect to http+unix://%2Fvar%2Fsnap%2Fplatform%2Fcommon%2Fapi.socket with error code: 500’))
-----)
BTW, the “Run post-refresh hook of “nextcloud” snap if present” steps takes really long time before it fails. Also, if it is important, my Syncloud box is set for IP V6 only.
OK, I see. Thank you very much for finding the issue. Just to make sure the error is with sdb device, right? This must be the data device not the OS device, right?
The OS root ( / ) is on /dev/sda2
/dev/sdb1 is mount on /opt/disk/external – this should be the data disk
Boris, another question: Would it be recommended (or not recommended) to use NVME SSD disk as a storage device for the Syncloud (specifically as Nextcloud being the main function)? I am wondering if it would be wise to switch to NVME SSD when replacing the storage device or would be better to stick with regular HD (I usually use NAS type of HDs)?
Depends on how critical your data is, I use SSDs a lot. Ideally you use more than one with Syncloud disk mode. Also if you plan to disconnect power on SSD for more than two years you need a copy on HDD (I do that some times :)).
Hi Boris, what do you mean by “copying your data” above? I am trying to replace this bad disk with another one. I tried to remove the disk from the Syncloud system and mount it on my work PC in order to image it onto the new disk. Though my Linux PC does not properly recognize the Synclod disk. It does not want to mount it and even ‘gparted’ tells me that that the disk space is unallocated.
When I have this disk in the Syncloud system seems to work fine (“fine” in sense the data is visible in Nextcloud). What is the reason for this behavior? More importantly how can I copy the data to the new HD? I was thinking to use ‘dd’ to copy the whole disk to the new one but seems my Linux PC does not see the Syncloud disk as a valid disk/partition.
How should I migrate the data from the old to the new HD?
I managed to copy the directories and files over SFTP. Now how to get Syncloud to see (mount) the new disk? It does not mount and I do not see line in ‘fstab’ for the “external” disk. I tried from the Web UI to add it from Settings–>Storage but no luck yet. If I try “Disks” option I get following error:
"Previous change
cannot find existing uuid to use"
If I try “Partitions” option nothing happens either. BTW, previous (now bad disk) was using “Partitions” option.