NextCloudPi on amd64 with btrfs root file system: Usage of swap partition instead of swapfile causes NCP Web Panel to get stuck

ncp

#1

Dear fellow Nextcloud and NCP users,

I was just testing the installation of Debian stretch stable for amd64 in a virtual machine. I used the text install in Debian and decided for a btrfs root partition (snapshots, cow, etc.). The debian installer automatically installed a separate swap partition.(As I know now, because btrfs does not support swapfiles.)

Then I used the curl command as described in NextCloudPi for amd64 to install NCP. After a few hickups (doing dist-upgrade and disabling the DVD as apt source) I managed to successfully install NCP!

At this point a heartily Thank You to Nachoparker for all his great work, which allows us beginners to achieve impressive results without falling in all the pitholes which are on the way.:+1::+1::+1:

I happily started the web interface and activated Nextcloud. Then I started the NCP Web Panel, logged in - and it got stuck at collecting the system info data showing the loading circle! The same happened after the login to the Nextcloud web page: it successfully loaded the first page with the standard documents. But switching to another page it got stuck at the loading circle.

When I looked at my SSH session I noticed the error message swapon: swapfile has holes. This is when I learned, that btrfs does not support swapfiles!

I knew that NCP setup installs a swapfile. I wanted to switch from this swapfile to the swap partition already set up: So I switched off the swapfile, and removed dphys-swapfile with sudo apt-get purge dphys-swapfile. Then I activated the swap partition with sudo swapon /dev/sda5 and verified, that it is working correctly.

After a reboot I opened the Nextcloud web page again and - voilá - everything is working fine. I can navigate and operate Nextcloud via the web interface.

But starting the NCP Web Panel continues to fail: it still gets stuck at collecting the system info.

I suspect, that the NCP Web Panel is blocked by the fact, that a swapfile is not available anymore. How can I get the NCP Web Panel to work with a swap partition instead of a swapfile? Or at least, that it is ignoring the missing swapfile?

Any help is highly appreciated.


#2

hi there :wink:

can you do sudo ncp-diag to verify where you are getting stuck?

thanks!


#3

Hi nachoparker,

thanks for your quick response. I executed ncp-diag in my SSH session, and now I am puzzled: It executed without error on the command line! It even shows the correct swap partition under ‘swap file’:

NextCloudPi version|v0.66.1
distribution|Debian GNU/Linux 9 \n \l
automount|no
USB devices|none
datadir|/var/www/nextcloud/data
data in SD|yes
data filesystem|btrfs
data disk usage|4,4G/26G
rootfs usage|4,4G/26G
swapfile|/dev/sda5
dbdir|/var/lib/mysql
Nextcloud check|ok
Nextcloud version|14.0.3.0
HTTPD service|up
PHP service|up
MariaDB service|up
Redis service|up
Postfix service|up
internet check|no
port check 80|closed
port check 443|closed
IP|192.168.x.x
gateway|x.x.x.x
interface|enp0s3
certificates|none
NAT loopback|no
uptime|10min

In opposite to this, the NCP Web Panel still looks like this:

As you can see: It is stuck at loading the system info into the web page. Clicking on one of the menu items left has no effect since the page is busy.

If I shall check something else, please, let me know.

Best regards
LittleAlf


#4

so that finishes fine. Please look at the javascript console for errors


#5

Ooups, there are quite some errors:

Die Verbindung zu https://192.168.1.130:4443/ncp-output.php wurde unterbrochen, während die Seite geladen wurde. [ncp.js:166:17](https://192.168.1.130:4443/ncp.js)
GEThttps://192.168.1.130:4443/[HTTP/2.0 200 OK 10064ms]
Promise resolved after context unloaded [websocket_proxy_dispatcher.js:14](moz-extension://325102fb-ee53-48ac-a9ec-86ae6a1d3fec/content/websocket_proxy_dispatcher.js)
GEThttps://192.168.1.130:4443/ncp.css[HTTP/2.0 200 OK 47ms]
GEThttps://192.168.1.130:4443/minified.js[HTTP/2.0 200 OK 24ms]
GEThttps://192.168.1.130:4443/ncp.js[HTTP/2.0 200 OK 41ms]
GEThttps://192.168.1.130:4443/img/loading-small.gif[HTTP/2.0 200 OK 44ms]
GEThttps://192.168.1.130:4443/img/poweroff.svg[HTTP/2.0 304 Not Modified 37ms]
GEThttps://192.168.1.130:4443/img/reboot.svg[HTTP/2.0 304 Not Modified 41ms]
GEThttps://192.168.1.130:4443/img/ncp-logo.svg[HTTP/2.0 304 Not Modified 3ms]
GEThttps://192.168.1.130:4443/core/img/actions/triangle-s.svg[HTTP/2.0 404 Not Found 9ms]
GEThttps://192.168.1.130:4443/img/nc-button.svg[HTTP/2.0 304 Not Modified 6ms]
GEThttps://192.168.1.130:4443/img/dashboard.svg[HTTP/2.0 304 Not Modified 7ms]
downloadable font: download failed (font-family: "Open Sans" style:normal weight:400 stretch:100 src index:2): content blocked source: https://192.168.1.130:4443/core/fonts/OpenSans-Regular.woff unknown:516:12
downloadable font: download failed (font-family: "Open Sans" style:normal weight:300 stretch:100 src index:2): content blocked source: https://192.168.1.130:4443/core/fonts/OpenSans-Light.woff unknown:523:11
Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf https://192.168.1.130:4443/core/fonts/OpenSans-Semibold.woff blockiert ("default-src").
Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf https://192.168.1.130:4443/core/fonts/OpenSans-Light.woff blockiert ("default-src").
Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf https://192.168.1.130:4443/core/fonts/OpenSans-Regular.woff blockiert ("default-src").
Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf https://192.168.1.130:4443/core/fonts/OpenSans-Light.woff blockiert ("default-src").
GEThttps://192.168.1.130:4443/img/settings-white.svg[HTTP/2.0 200 OK 7ms]
GEThttps://192.168.1.130:4443/img/wizard.svg[HTTP/2.0 304 Not Modified 9ms]
GEThttps://192.168.1.130:4443/img/info-white.svg[HTTP/2.0 304 Not Modified 7ms]
Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf inline blockiert ("script-src").
[192.168.1.130:4443:1:1](https://192.168.1.130:4443/)

Translation:

Die Einstellungen der Seite haben das Laden einer Ressource auf xxx blockiert = the page’s settings blocked the loading of a resource at xxx

For comparison here are the javascript errors of loading the NCP Web Panel start page of my physical nextcloudpi:

Die Verbindung zu https://nextcloudpi:4443/ncp-output.php wurde unterbrochen, während die Seite geladen wurde. [ncp.js:166:17](https://nextcloudpi:4443/ncp.js)
GEThttps://nextcloudpi:4443/[HTTP/2.0 200 OK 605ms]
GEThttps://nextcloudpi:4443/ncp.css[HTTP/2.0 200 OK 8ms]
Promise resolved after context unloaded [websocket_proxy_dispatcher.js:14](moz-extension://325102fb-ee53-48ac-a9ec-86ae6a1d3fec/content/websocket_proxy_dispatcher.js)
GEThttps://nextcloudpi:4443/minified.js[HTTP/2.0 200 OK 11ms]
GEThttps://nextcloudpi:4443/ncp.js[HTTP/2.0 200 OK 7ms]
GEThttps://nextcloudpi:4443/img/loading-small.gif[HTTP/2.0 200 OK 6ms]
GEThttps://nextcloudpi:4443/img/poweroff.svg[HTTP/2.0 304 Not Modified 5ms]
GEThttps://nextcloudpi:4443/img/reboot.svg[HTTP/2.0 304 Not Modified 4ms]
downloadable font: download failed (font-family: "Open Sans" style:normal weight:400 stretch:100 src index:2): content blocked source: https://nextcloudpi:4443/core/fonts/OpenSans-Regular.woff unknown:516:12
downloadable font: download failed (font-family: "Open Sans" style:normal weight:300 stretch:100 src index:2): content blocked source: https://nextcloudpi:4443/core/fonts/OpenSans-Light.woff unknown:523:11
Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf https://nextcloudpi:4443/core/fonts/OpenSans-Semibold.woff blockiert ("default-src").
Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf https://nextcloudpi:4443/core/fonts/OpenSans-Light.woff blockiert ("default-src").
Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf https://nextcloudpi:4443/core/fonts/OpenSans-Regular.woff blockiert ("default-src").
Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf https://nextcloudpi:4443/core/fonts/OpenSans-Light.woff blockiert ("default-src").
GEThttps://nextcloudpi:4443/img/ncp-logo.svg[HTTP/2.0 200 OK 11ms]
GEThttps://nextcloudpi:4443/core/img/actions/triangle-s.svg[HTTP/2.0 404 Not Found 9ms]
GEThttps://nextcloudpi:4443/img/nc-button.svg[HTTP/2.0 304 Not Modified 9ms]
GEThttps://nextcloudpi:4443/img/dashboard.svg[HTTP/2.0 304 Not Modified 7ms]
GEThttps://nextcloudpi:4443/img/settings-white.svg[HTTP/2.0 304 Not Modified 4ms]
GEThttps://nextcloudpi:4443/img/wizard.svg[HTTP/2.0 304 Not Modified 3ms]
GEThttps://nextcloudpi:4443/img/info-white.svg[HTTP/2.0 304 Not Modified 5ms]
Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf inline blockiert ("script-src").
[nextcloudpi:4443:1:1](https://nextcloudpi:4443/)

While the NCP Web Panel start page of the physical instance (below) loads fine, the NCP Web Panel of my VM with btrfs gets stuck.

Do you see a significant difference in the error messages between the two instances of NCP?


#6

VM doesnt fully support btrfs (yet) I think. At least my Linux VirtualBox doesnt.


#7

Hi Oliver,

we are talking about loading a javascript web page, which elements are stored on a btrfs volume. In this particular case it crashes or gets stuck. (I don’t know yet.) Everything else is working fine, i.e. the Nextcloud itself works without problems via its javascript web page.

In my case, the Virtual Box is installed on a Windows system, and the difficulty is encountered with a Linux guest system. Do you also use Windows as host, or do you use Linux?

Do you have a similar problem with javascript, or what difficulty you encounter?