NextCloud Installation Q & A

  • @krutojmax


    Base on the screenshot, you either upgrade or installed NC multiple times without delete the old files first.
    It would be easier just delete entire NextCloud folder, and do a fresh installation.

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

  • I still have the issue with headers:




    My Nginx-Vhost looks like this:



    I am a little concerned about security ...


    Why is the security-check showing this headers as not present when they are activated through configuration?

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

  • Hello,


    I hope you can help me out. I follow this instruction
    NextCloud Installation
    and stuck at step: 7. open your browser and enter your local ip such as: http://192.168.1.11:90 to begin the installation.


    the issue I face is that I can't access omv webui, but I can access through ssh, and network share works too.


    here is what I have:
    openmediavault 3.0.39
    openmediavault-nginx 3.0.11
    nextcloud 12.0.0 (https://download.nextcloud.com…ases/nextcloud-12.0.0.zip)



    0) logging & setting
    logging:
    http://imgur.com/a/S3ISb
    (openmediavault nginx bad gateway 502, no such file or directory while connecting to upstream /favicon.ico)


    setting:
    http://imgur.com/a/zdQwq


    1) First try


    error message say


    This site can’t be reached


    192.168.1.11 refused to connect.
    Try:

    ERR_CONNECTION_REFUSED



    I can access omv webui throught this link (http://192.168.1.11 )
    I also temporarily turn off firewall, but same error.


    2) second try


    I then go to webui -> Nginx (websites) -> settings -> general settings -> checked "enabled", retrying the URL get this new error message:


    502 Bad Gateway


    in file "/etc/nginx/nginx.conf", the first 3 lines are:


    user www-data;
    worker_processes 4;
    pid /run/nginx.pid;


    I read this post (https://help.nextcloud.com/t/bad-gateway-502-error/2317/4), last response said :


    "
    I had the same, till I noticed I had forgotten one instruction. At:
    vi /etc/nginx/nginx.conf
    I had forgotten to change the first line in:
    user www-data;
    Problem solved
    "


    But I don't know what to change to


    btw, I use port 90, and I didn't enable SSL.



    3) third try
    I remote in through putty, and run "sudo apt-get remove nginx", now I can't get into webUI (port 80), get error



    403 Forbidden
    nginx


    then I try sudo apt-get install nginx, then restart box, same 403 error


    And I check it's 755:


    root@mothership:/var/www# ls -l
    total 8
    drwxr-xr-x 2 root root 4096 Jun 18 14:12 html
    drwxr-xr-x 3 openmediavault-webgui openmediavault-webgui 4096 Jun 22 10:24 openmediavault



    SSH ok, shares ok, just webui doesn't work


    I also tried:

    • service php5-fpm restart
    • service nginx restart

    3. netstat -tulpen | grep 90
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 0 44217 3171/nginx -g daemo


    4. netstat -tulpen | grep 90
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 0 44372 3190/nginx -g daemo


    5. omv-firstaid
    -bash: omv-firstaid: command not found


    6. rm -f /var/cache/openmediavault/*.json


    7. reboot multiple times.


    4) not sure what to do next

    Before I do anything, I want to hear your opinion first.
    yesterday I did a backup from webUI using the backup plugin. and I saw this folder in my storage drive
    http://imgur.com/a/zwxkF


    Q1: I am not sure how to restore
    Q2: and should I disconnect my storage drive (two wd 8tb red, raid 1) first?
    Q3: And after I restore, and plug in the storage drive back, will that automatically format? maybe plug 1st and see if the data is safe, then plug the 2nd one?
    Q4: I use a 8GB USB stick for boot. if it's time to re-install OMV on a usb HDD, what step I should take? my main concern is the two storage drive (8TB WD RED), I don't want a mis step wipe out the data.



    Thank you!

    Dell Poweredge T100 (Pentium E5400, 2.7GHz, 2MB Cache,800MH 2, 4GB DDR2 memory, 32-bit)
    OMV 3.0.39
    2 8TB WD RED, RAID 1

  • updated: the new issue is "SSH ok, network shares ok, just webui doesn't work"



    I follow this instruction
    NextCloud Installation
    and stuck at step: 7. open your browser and enter your local ip such as: http://192.168.1.11:90 to begin the installation.


    I believe my mistake are
    1) install MySQL, Nginx through ssh, then install plugin through webui
    2) uninstall Nginx


    the issue I face is that I can't access omv webui, but I can access through ssh, and network share works too.


    here is what I have:
    openmediavault 3.0.39
    openmediavault-nginx 3.0.11
    nextcloud 12.0.0 (https://download.nextcloud.com…ases/nextcloud-12.0.0.zip)



    0) logging & setting
    logging:
    http://imgur.com/a/S3ISb
    (openmediavault nginx bad gateway 502, no such file or directory while connecting to upstream /favicon.ico)


    setting:
    http://imgur.com/a/zdQwq


    1) First try


    error message say


    This site can’t be reached


    192.168.1.11 refused to connect.
    Try:

    ERR_CONNECTION_REFUSED



    I can access omv webui throught this link (http://192.168.1.11 )
    I also temporarily turn off firewall, but same error.


    2) second try


    I then go to webui -> Nginx (websites) -> settings -> general settings -> checked "enabled", retrying the URL get this new error message:


    502 Bad Gateway


    in file "/etc/nginx/nginx.conf", the first 3 lines are:


    user www-data;
    worker_processes 4;
    pid /run/nginx.pid;


    I read this post (https://help.nextcloud.com/t/bad-gateway-502-error/2317/4), last response said :


    "
    I had the same, till I noticed I had forgotten one instruction. At:
    vi /etc/nginx/nginx.conf
    I had forgotten to change the first line in:
    user www-data;
    Problem solved
    "


    But I don't know what to change to


    btw, I use port 90, and I didn't enable SSL.



    3) third try
    I remote in through putty, and run "sudo apt-get remove nginx", now I can't get into webUI (port 80), get error (http://imgur.com/a/4pou0)


    then I try sudo apt-get install nginx, then restart box, same error


    And I check it's 755:


    root@mothership:/var/www# ls -l
    total 8
    drwxr-xr-x 2 root root 4096 Jun 18 14:12 html
    drwxr-xr-x 3 openmediavault-webgui openmediavault-webgui 4096 Jun 22 10:24 openmediavault



    SSH ok, shares ok, just webui doesn't work


    I also tried:
    1.service php5-fpm restart
    2.service nginx restart
    3. netstat -tulpen | grep 90
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 0 44217 3171/nginx -g daemo


    4. netstat -tulpen | grep 90
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 0 44372 3190/nginx -g daemo


    5. omv-firstaid
    -bash: omv-firstaid: command not found


    6. rm -f /var/cache/openmediavault/*.json


    7. reboot multiple times.


    8. $ dpkg -l| grep openmediavault
    rc openmediavault 3.0.80 all Open network attached storagesolution
    rc openmediavault-backup 3.6 all backup plugin for OpenMediaVault.
    rc openmediavault-flashmemory 3.4.3 all folder2ram plugin for OpenMediaVault
    ii openmediavault-keyring 1.0 all GnuPG archive keys of theOpenMediaVault archive
    rc openmediavault-mysql 3.0.4 all MySQL plugin for OpenMediaVault.
    rc openmediavault-nginx 3.0.11 all Nginx plugin for OpenMediaVault.
    rc openmediavault-omvextrasorg 3.4.25 all OMV-Extras.org Package Repositoriesfor OpenMediaVault
    rc openmediavault-syncthing 3.10 all Syncthing plugin for OpenMediaVault.


    4) attempt omv-firstaid, but no luck


    I ssh in as 3 account: root, user#1, user#2


    case#1) when login ssh as "root" , then run omv-firstaid, I always got the "command not found" error


    case#2)when I ssh using 1st user account, there two scenario
    2a) "omv-firstaid" generate this error “-dash: 1: omv-firstaid: not found”


    2b) "sudo omv-firstaid" get this
    *We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:
    Respect the privacy of others. Think before you type. With great power comes great responsibility.[sudo] password for*
    However, after I enter password, it show "not in the sudoers file. This incident will be reported."


    Then I ran this "sudo usermod -aG sudo,adm 1st_account".
    After that I repeat "sudo omv-firstaid", and I got the same ""command not found" error.


    case#3) I then ssh using 2nd account, and I can reproduce exact same behavior as 1st account.



    btw, in /usr/sbin, I search for omv*, only this one show up: omv-mkgraph


    5) not sure what to do next

    Before I do anything, I want to hear your opinion first.
    yesterday I did a backup from webUI using the backup plugin. and I saw this folder in my storage drive
    http://imgur.com/a/zwxkF


    My goal is to restore omv so I can access webui. "isntall nextcloud" will be next time.


    Q1: I am not sure how to restore omv
    Q2: and should I disconnect my storage drive (two wd 8tb red, raid 1) first?
    Q3: And after I restore, and plug in the storage drive back, will that automatically format? maybe plug 1st and see if the data is safe, then plug the 2nd one?
    Q4: I use a 8GB USB stick for boot. if it's time to re-install OMV on a usb HDD, what step I should take? my main concern is the two storage drive (8TB WD RED), I don't want a mis step wipe out the data.


    Thank you for reading



    Thank you!

    Dell Poweredge T100 (Pentium E5400, 2.7GHz, 2MB Cache,800MH 2, 4GB DDR2 memory, 32-bit)
    OMV 3.0.39
    2 8TB WD RED, RAID 1

  • Hello,


    I hope you can help me to resolve this omv issue during the NextCloud installation.


    I intended to write the detailed description here, but the website doesn't allow me to submit, got an error. Please read the detail description in this post:


    install NextCloud 12.0.0 on omv 3.0.39, webui doesn't work any more, ssh, network share works fine


    Long story short, the issue I face is that I can't access omv webui, but I can access through ssh, and network share works too.


    Thank you very much!

    Dell Poweredge T100 (Pentium E5400, 2.7GHz, 2MB Cache,800MH 2, 4GB DDR2 memory, 32-bit)
    OMV 3.0.39
    2 8TB WD RED, RAID 1

  • First, ensure that OMV and NextCloud don't use the same port.
    Second, Nextcloud permission is www-data:www-data.
    Third, turn on php.index under Options in Nginx.


    Do not change anything in the Nginx confi file if you don't know what you're doing.
    I usually make a backup of OMV with Clonezilla before try something major new.


    1. I don't use OMV backup plugin, so somebody else can answer that.
    2. Un-plug all data drives before restore OMV.
    3. After restored OMV, turn off the system and re-attach all data drives.
    No need to format them.
    4. Ensure there are no other web server that use OMV or the intended port for NextCloud.


    My suggestion is do a fresh NextCloud installation.



    If you want to remove Nginx, stop it first, then remove it.


    Code
    sudo service nginx stop
    sudo dpkg -r nginx

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

    Einmal editiert, zuletzt von tinh_x7 ()

  • Hi tinh_x7,


    Thank you for your reply!
    is Nginx the web server where both OMV's webUI and Nextcloud use?

    Dell Poweredge T100 (Pentium E5400, 2.7GHz, 2MB Cache,800MH 2, 4GB DDR2 memory, 32-bit)
    OMV 3.0.39
    2 8TB WD RED, RAID 1

  • I use a up to date OMV3 (3.0.80) with OMV-Extras.


    Changes in Nextcloud ... not a specific, unusual change I can remember.


    When setting up Nextcloud, I sticked straight to your howto.


    I use the following Plugins: GPXPod, Calendar, Contacts, Notes, Tasks, Versions, and some other standard apps.

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

  • Hello,


    I have a big problem.
    Since 1 week, I couldn't send files in Nexctcloud.
    I have this on logs:


    Code
    Error	PHP	Class 'OC\L10N\LanguageNotFoundException' not found at /srv/dev-disk-by-label-Local/www/nextcloud/lib/private/L10N/Factory.php#270	2017-07-02T22:41:01+0200
    Error	PHP	include(): Failed opening '/srv/dev-disk-by-label-Local/www/nextcloud/lib/composer/composer/../../../lib/private/L10N/LanguageNotFoundException.php' for inclusion (include_path='/srv/dev-disk-by-label-Local/www/nextcloud/3rdparty/pear/console_getopt:/srv/dev-disk-by-label-Local/www/nextcloud/3rdparty/pear/pear_exception:/srv/dev-disk-by-label-Local/www/nextcloud/3rdparty/pear/archive_tar:/srv/dev-disk-by-label-Local/www/nextcloud/3rdparty/pear/pear-core-minimal/src:/srv/dev-disk-by-label-Local/www/nextcloud/apps') at /srv/dev-disk-by-label-Local/www/nextcloud/lib/composer/composer/ClassLoader.php#444	2017-07-02T22:41:01+0200
    Error	PHP	include(/srv/dev-disk-by-label-Local/www/nextcloud/lib/composer/composer/../../../lib/private/L10N/LanguageNotFoundException.php): failed to open stream: Input/output error at /srv/dev-disk-by-label-Local/www/nextcloud/lib/composer/composer/ClassLoader.php#444	2017-07-02T22:41:01+0200

    Do you please have an idea :(?


    Regards,

  • Maybe it's file permission issues.
    Double check it.


    Hello,


    Thank you for this reply.
    I checked:

    • directory is www-data:ww-data
    • root user don't have permissions:
      root@ntx-010b:/srv/dev-disk-by-label-Local/www/nextcloud# ./occ integrity:sign-app
      -bash: ./occ: Permission denied
    • www-data don't have permission:
      root@ntx-010b:/srv/dev-disk-by-label-Local/www/nextcloud# su -s /bin/bash www-data
      www-data@ntx-010b:/srv/dev-disk-by-label-Local/www/nextcloud$ ./occ
      bash: ./occ: Permission denied

    What is wrong?
    Everything worked fine before.


    Thank you.


    Best regards,

  • Hello,


    Thank you for your replies :-).


    I checked and yes but for me, user is www-data and group is www-data recursively Read + Write + Execute.
    Same thing with user permissions.
    I tried with owner root and owner www-data and it's doesn't work again.
    I tried after reboot and no way :(.


    Logs:
    {"reqId":"bXhexvZxPYjhRf29uwHq","level":3,"time":"2017-07-06T22:25:29+00:00","remoteAddr":"80.12.63.105","user":"--","app":"PHP","method":"HEAD","url":"\/remote.php\/webdav\/InstantUpload\/Camera\/","message":"include(): Failed opening '\/srv\/dev-disk-by-label-Local\/www\/nextcloud\/lib\/composer\/composer\/..\/..\/..\/lib\/private\/L10N\/LanguageNotFoundException.php' for inclusion (include_path='\/srv\/dev-disk-by-label-Local\/www\/nextcloud\/3rdparty\/pear\/console_getopt:\/srv\/dev-disk-by-label-Local\/www\/nextcloud\/3rdparty\/pear\/pear_exception:\/srv\/dev-disk-by-label-Local\/www\/nextcloud\/3rdparty\/pear\/archive_tar:\/srv\/dev-disk-by-label-Local\/www\/nextcloud\/3rdparty\/pear\/pear-core-minimal\/src:\/srv\/dev-disk-by-label-Local\/www\/nextcloud\/apps') at \/srv\/dev-disk-by-label-Local\/www\/nextcloud\/lib\/composer\/composer\/ClassLoader.php#444","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/1.4.3","version":"12.0.0.29"}
    {"reqId":"bXhexvZxPYjhRf29uwHq","level":3,"time":"2017-07-06T22:25:29+00:00","remoteAddr":"80.12.63.105","user":"--","app":"PHP","method":"HEAD","url":"\/remote.php\/webdav\/InstantUpload\/Camera\/","message":"Class 'OC\\L10N\\LanguageNotFoundException' not found at \/srv\/dev-disk-by-label-Local\/www\/nextcloud\/lib\/private\/L10N\/Factory.php#270","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/1.4.3","version":"12.0.0.29"}
    {"reqId":"2cei9B1aAUWcrlncckV4","level":3,"time":"2017-07-06T22:25:40+00:00","remoteAddr":"80.12.63.105","user":"--","app":"PHP","method":"HEAD","url":"\/remote.php\/webdav\/InstantUpload\/Camera\/","message":"include(\/srv\/dev-disk-by-label-Local\/www\/nextcloud\/lib\/composer\/composer\/..\/..\/..\/lib\/private\/L10N\/LanguageNotFoundException.php:( failed to open stream: Input\/output error at \/srv\/dev-disk-by-label-Local\/www\/nextcloud\/lib\/composer\/composer\/ClassLoader.php#444","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/1.4.3","version":"12.0.0.29"}


    Thank you.

  • I refer to the PHP pool:


    I set


    max children = 5
    start server = 2
    min spare server = 1
    max spare server = 3
    max requests = 0


    memory limit = 128 MB



    sometimes I get an error within php-fpm, saying I have to increase max children. Is there a recommendation what to set depending on thread + RAM size? I use a quad with 16 GB of RAM. Is it any good to increase max. memory?


    Code
    [13-Jul-2017 08:21:28] WARNING: [pool xxxx-xxxx-xxxx-xxxx] server reached pm.max_children setting (5), consider raising it

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

  • I found that post as well, but it states no clear reason why using a specific size. Example:


    You have 4 GB RAM -> use 5 children
    8 GB -> 10 children
    16 GB -> 20 children

    Chaos is found in greatest abundance wherever order is being sought.
    It always defeats order, because it is better organized.
    Terry Pratchett

  • Actually the post does state a pretty clear method for determining exactly what you'll require.


    In general you could probably allow quite a high number of fpm servers to be spawned, as long as they are reaped quickly enough to keep up with the number of users on the system and the aren't any major issues in the code (php i mean) it shouldn't cause issues on your box. Very conservative fpm pool conf (maybe even the default) can handle a very large number of concurrent requests under nginx. I'm talking 500+/s which you wouldn't be hitting in even a small business environment.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!