Nextcloud stopped working page load error 504

    • OMV 4.x
    • Resolved
    • Nextcloud stopped working page load error 504

      to fix the issue, i re installed nextcloud, letsencrypt, amd mariadb.
      I followed this guide and it worked perfectly.
      Don't let the command line scare you, it's not that hard.

      Hi All,

      I have been away for a while and was not using my nextcloud for sometime (maybe 2 months).
      I tried to open the web gui the other day and i get a 504 error on the page. (made sure time the zone was setup properly in omv, saw this an a fix. does nexcloud in docker have a time zone setting?)
      I have checked the settings in mariadb and nextcloud and they seem to be correct.
      i have restarted the both images in docker, still the same.
      i have read the logs and it seems i have a connection issue between nextcloud and the mariadb. i'll post the logs.
      Hopefully someone can lend me hand.

      mariadb log

      Source Code

      1. [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
      2. [s6-init] ensuring user provided files have correct perms...exited 0.
      3. [fix-attrs.d] applying ownership & permissions fixes...
      4. [fix-attrs.d] done.
      5. [cont-init.d] executing container initialization scripts...
      6. [cont-init.d] 10-adduser: executing...
      7. -------------------------------------
      8. _ ()
      9. | | ___ _ __
      10. | | / __| | | / \
      11. | | \__ \ | | | () |
      12. |_| |___/ |_| \__/
      13. Brought to you by linuxserver.io
      14. We gratefully accept donations at:
      15. https://www.linuxserver.io/donate/
      16. -------------------------------------
      17. GID/UID
      18. -------------------------------------
      19. User uid: 1000
      20. User gid: 100
      21. -------------------------------------
      22. [cont-init.d] 10-adduser: exited 0.
      23. [cont-init.d] 30-config: executing...
      24. [cont-init.d] 30-config: exited 0.
      25. [cont-init.d] 40-initialise-db: executing...
      26. [cont-init.d] 40-initialise-db: exited 0.
      27. [cont-init.d] 99-custom-scripts: executing...
      28. [custom-init] no custom files found exiting...
      29. [cont-init.d] 99-custom-scripts: exited 0.
      30. [cont-init.d] done.
      31. [services.d] starting services
      32. [services.d] done.
      33. Warning: World-writable config file '/etc/mysql/conf.d/custom.cnf' is ignored
      34. Warning: World-writable config file '/etc/mysql/conf.d/custom.cnf' is ignored
      35. 190916 19:50:33 mysqld_safe Logging to syslog.
      36. 190916 19:50:33 mysqld_safe Starting mysqld daemon with databases from /config/databases
      Display All

      Nexctloud logs

      Source Code

      1. [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
      2. [s6-init] ensuring user provided files have correct perms...exited 0.
      3. [fix-attrs.d] applying ownership & permissions fixes...
      4. [fix-attrs.d] done.
      5. [cont-init.d] executing container initialization scripts...
      6. [cont-init.d] 10-adduser: executing...
      7. usermod: no changes
      8. -------------------------------------
      9. _ ()
      10. | | ___ _ __
      11. | | / __| | | / \
      12. | | \__ \ | | | () |
      13. |_| |___/ |_| \__/
      14. Brought to you by linuxserver.io
      15. We gratefully accept donations at:
      16. https://www.linuxserver.io/donate/
      17. -------------------------------------
      18. GID/UID
      19. -------------------------------------
      20. User uid: 911
      21. User gid: 911
      22. -------------------------------------
      23. [cont-init.d] 10-adduser: exited 0.
      24. [cont-init.d] 20-config: executing...
      25. [cont-init.d] 20-config: exited 0.
      26. [cont-init.d] 30-keygen: executing...
      27. using keys found in /config/keys
      28. [cont-init.d] 30-keygen: exited 0.
      29. [cont-init.d] 40-config: executing...
      30. [cont-init.d] 40-config: exited 0.
      31. [cont-init.d] 50-install: executing...
      32. [cont-init.d] 50-install: exited 0.
      33. [cont-init.d] 60-memcache: executing...
      34. [cont-init.d] 60-memcache: exited 0.
      35. [cont-init.d] 99-custom-files: executing...
      36. [custom-init] no custom files found exiting...
      37. [cont-init.d] 99-custom-files: exited 0.
      38. [cont-init.d] done.
      39. [services.d] starting services
      40. [services.d] done.
      41. PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] Operation timed out in /config/www/nextcloud/lib/private/DB/Connection.php:64
      Display All

      The post was edited 1 time, last by HackitZ: changed to save people from knowing what resolved the issue. ().

    • ok,
      So way back i used tdl guide on youtube, please dont ask to go look in the youtube thread. tdl just says to come here.

      Ok so i opened docker and stopped nextcloud and then stopped mariadb. in that order.
      I then change the permission to nextcloud using ssh. i changed them to 775.
      I then statred mariadb and then started nextcloud.
      I'm still unable to load the sign in page, i'm met with a 504 timed out error.
      As i'm reading more, it seems i might be better off scraping my nextcloud and starting over.
      Is this guide complete and working?
      nextcloud omv guide.

      The post was edited 1 time, last by HackitZ ().

    • A you just using nextcloud locally, or did you follow the secure access video (ie, duckdns and letsencryt)..

      If you're using the secure access... is your letsencrypt certificate expired? Those expire every 90 days (you should have gotten an email)

      Also if you're using secure access... try restarting in this order (I'd also give it about 10sec between each, to make sure it's fully up and running)...

      1. nextclouddb
      2. nextcloud
      3. duckdns
      4. letsencrypt
      Air Conditioners are a lot like PC's... They work great until you open Windows.

    • Unless you did something completely on your own, if you didn't set up letsencrypt, then there is no cert (no matter what Chrome says) so it can't be expired... Again assuming you followed TDL's video... do you have the duckdns container running?
      Air Conditioners are a lot like PC's... They work great until you open Windows.

    • HackitZ wrote:

      looks like i pulled the images but never set them up.
      thinking it might be easier to do a fresh install.
      is this a working guide
      Yes this is the most up to date guide for setting nextcoud up right now.

      Maybe try one other thing first.
      Join your Nextcloud container and the Mariadb (Nextclouddb) Conntainer in a docker network via the Network tab of the Docker Gui. Then open the CLI and edit your config.php in the appdata/nextcloud/www/nextcloud/config folder.
      change the line 'dbhost' => 'your-ip:3306', to 'dbhost' => 'nextclouddb',
      Then restart your Nextclouddb and Nextcloud containers.
    • Ok I'm a dumb ass.
      I changed my router setup to a mesh system about 2 months ago.
      I had gone in and edited my conf file and it turns out i edited the wrong file. so nextcloud is working now.
      Thanks for the help and time you took to lend a hand.

      I have a question though,
      i have been using dyndns for years, do i need a docker plugin for dyndns to work?
      also does anyone pay for an ssl? i know ill forget down the road and would rather just pay.
      FYI, if you have not heard of google takeout, go check it out. this will allow you to move your google info to a new cloud service.

      The post was edited 1 time, last by HackitZ ().

    • wow i'm having such a hard time getting this all setup.
      here's where im at.

      1. duckdns setup and working

      2. letsencrypt setup and working, except i was unable to add the extra arg --network my-net. left it out and i could save.
      error was:conflicting options: cannot attach both user-defined and non-user-defined network-modes.

      3. nextcloud was working without letsencrypt, so i changed the settings in config to match new login info. at this point i had no errors per say but i was unable to load nextcloud, i was stuck at the welcome to our server page.
      i re watched the guide and realized i forgot to add the --network my-net into nextcloud. so i try to add --network my-net into extra args (second option from the bottom, tdl guide just says bottom) and was presented with the same error as i received in letsencrypt.
      error:conflicting options: cannot attach both user-defined and non-user-defined network-modes.

      So at this point i tried to hit cancel in the nextcloud settings, the window closed and now nextcloud does not show up in running docker images.
      My question is how do i know it's gone? i restarted omv, still not showing up. do i need to start over with nextcloud? or is it like a ghost and just, i dont know hiding.
      Thanks
    • ok i re added nextcloud, but still cant login

      i tried to add -- network my-net to the extra args option again. this time in letsencrypt container and i get the same error. now when the error pops up i hit ok and remove the extra arg and try to save. i get the error that theirs no container. so it's gone.
      so i just lost letsencrypt container. i guess i need to re add it.
      why does trying to add --network my-net give me an error and why does this cause the container to disappear?

      what am i doing wrong?
      Thanks

      Ok just played around, as soon as i add --network my-net to the extra args, i get the error, at this point i cant do anything other that hit ok. this makes the container (all of them) disappear.

      The post was edited 1 time, last by HackitZ: add more info ().

    • ok duckdns is ok, letsencrypt is ok, and nextcloud is ok. ok meaning they are setup.

      i'm stuck at the nextcloud login, i dont get one. i just see the page that says

      Welcome to our server

      The website is currently being setup under this address.
      For help and support, please contact: me@example.com

      So i have missed a simple step i'm sure. i just cant seem to figure out what it is i'm missing.

      edit.
      can my duckdns look like some-thing.duckdns.org. can i use the dash? just asking

      edit, ok i went into the network tan in docker and connected letsencrypt and nextcloud there, as i'm unable to put the info into the extra args of each docker. still stuck at the welcome to our server login page.

      The post was edited 1 time, last by HackitZ: add more info add more info ().

    • If you have the welcome to our server message means, that the reverse proxy inside the letsencrypt docker is working and thats there is only a small config change missing. Which one is sometimes hard to find out.
      The option --network my net does not work anymore. I would suggest that you stick to this up-to-date guide also because it uses docker-compose which makes updating or porting your dockers to omv5 much easier.
    • well i'm no furthur ahead, trying to sort out whats not right is becoming useless.

      so last night i removed nextcloud and mariadb.
      i re set nextcloud and the db up to work on my local network, everything was fine.

      i did not touch duckdns or letsebcrypt.

      i re-watched tdl video and undid the configs i did following his vid, it was really only the letsencrypt nextcloud.subdoain.conf file. so all i did was remove the file. i stll have the nextcloud.subdoain.conf.sample.

      i then went into the nextcloud config.php with nano and added,
      1. 'trusted_proxies' =>
      2. array (
      3. 0 => 'letsencrypt',
      4. ),
      5. 'overwritewebroot' => '/nextcloud',
      6. 'overwrite.cli.url' => 'https://my.org/nextcloud',
      7. 'trusted_domains' =>
      8. array (
      9. 0 => 'my.org:443',
      10. ),
      i also removed the extra settings from letsencrypt container that were not included with the guide here.

      in the guide we remove the sample from (/appdata/letsencrypt/nginx/proxy-confs/nextcloud.subfolder.conf) do we not adjust anything in this file? remove any #. i tired with no luck so it's back to original.

      here's where i'm at, my duckdns/nextcloud loads nothing, my local url 192.168.4.22 loads:

      Nextcloud


      Please contact your administrator. If you are an administrator, edit the "trusted_domains" setting in config/config.php like the example in config.sample.php.


      i have tried to play with the settings but am stuck, if someone is willing to help this old soul would be much appreciative.
      TNX
    • HackitZ wrote:

      in the nextcloud config.php following the guide we end up with 2 entries for trusted domains. is that so we can access nextcloud from both home and outside our network?
      in theory, yes.
      Did I understand right, that you did a mixture of setting up nextcloud by the guide of tdl? And the by the guide of macom? Cause these differ a but while setting up the ports. This might cause problems.

      It would strongly advise to start over again only sticking to the guide by @macom