[SOLVED] Admin can login, but not users: Gateway 504 error


#1

Steps to reproduce

  1. Login as admin = OK
  2. Login as user = 504 Gateway Time-out
    3.

Expected behaviour

Simply login as user

Actual behaviour

504 Gateway Time-out

Server configuration

Operating system: Ubuntu 16.04.3 LTS, all updates applied
Web server: Apache
Database: MySQL 5.7.20
PHP version: 7.0.18
ownCloud version: (see ownCloud admin page) 10.0.3 (stable)
Updated from an older ownCloud or fresh install: Fresh install

Where did you install ownCloud from: installation script

Signing status (ownCloud 9.0 and above): ??
The content of config/config.php:
{
"config": {
"instanceid": "oct9c3w7wtcx",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"intranet.bcasmart.com"
],
"datadirectory": "\/var\/www\/vhosts\/bcasmart.com\/httpdocs\/oc\/data",
"overwrite.cli.url": "https:\/\/intranet.bcasmart.com",
"dbtype": "mysql",
"version": "10.0.3.3",
"dbname": "ocbcalive",
"dbhost": "localhost:3306",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"logtimezone": "UTC",
"installed": true,
"memcache.local": "\OC\Memcache\Redis",
"memcache.locking": "\OC\Memcache\Redis",
"memcache.distributed": "\OC\Memcache\Redis",
"filelocking.enabled": "true",
"redis": {
"host": "localhost",
"port": 6379,
"timeout": 0,
"dbindex": 0
},
"files_external_allow_create_new_local": true
},
"integritychecker": {
"passing": true,
"enabled": true,
"result": []
},

**List of activated apps:**
Enabled:
  - comments: 0.3.0
  - configreport: 0.1.1
  - dav: 0.3.0
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.1
  - files_external: 0.7.1
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - market: 0.2.2
  - notifications: 0.3.1
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.1
  - updatenotification: 0.2.1
Disabled:
  - encryption
  - external
  - files_antivirus
  - files_sharing
  - theme-example
  - user_external

Are you using external storage, if yes which one: local

Are you using encryption: no

Are you using an external user-backend, if yes which one: none

Client configuration

Browser: Chrome latest version

Operating system: Win10

Logs

Web server error log:

don't know how to retrieve it

ownCloud log (data/owncloud.log)

I had to delete it as it was around 70Gb!

Browser log: don't know how to retrieve it


I've struggled a lot with files permissions and finally managed to get all accesses after applying the standard OC permissions (script found on the forum). By the way, admin access is now fully working, but user access always returns this "Gateway 504 error - nginx" message...

I'm not a system administrator (or you'd have to torture me), so I don't really know how to troubleshoot this... By the way, I'm disconcerted by the size of the OC logfile: any clue here?

Thanks in advance for any help!


#2

How can the error come from a nginx server if you are using apache?

Can you check if there is a nginx service running on your system with

service --status-all


#3

Hi dmitry!

What I know:
* Plesk console provide a menu to modify Apache settings
* The error message says > 504 Gateway Time-out - nginx

The command returns
[ + ] acpid
[ + ] apache-htcacheclean
[ + ] apache2
[ + ] apparmor
[ + ] apport
[ + ] atd
[ + ] bind9
[ - ] bootmisc.sh
[ - ] checkfs.sh
[ - ] checkroot-bootclean.sh
[ - ] checkroot.sh
[ + ] console-setup
[ + ] cron
[ - ] cryptdisks
[ - ] cryptdisks-early
[ + ] dbus
[ + ] docker
[ + ] dovecot
[ + ] grub-common
[ - ] hostname.sh
[ - ] hwclock.sh
[ + ] irqbalance
[ + ] iscsid
[ - ] keyboard-setup.dpkg-bak
[ - ] killprocs
[ + ] kmod
[ - ] lvm2
[ + ] lvm2-lvmetad
[ + ] lvm2-lvmpolld
[ + ] lxcfs
[ - ] lxd
[ + ] mdadm
[ - ] mdadm-waitidle
[ - ] mountall-bootclean.sh
[ - ] mountall.sh
[ - ] mountdevsubfs.sh
[ - ] mountkernfs.sh
[ - ] mountnfs-bootclean.sh
[ - ] mountnfs.sh
[ + ] mysql
[ + ] networking
[ + ] nginx
[ + ] ondemand
[ + ] open-iscsi
[ - ] open-vm-tools
[ + ] pc-remote
[ + ] php7.0-fpm
[ - ] plesk-php56-fpm
[ - ] plesk-php70-fpm
[ - ] plesk-php71-fpm
[ - ] plymouth
[ - ] plymouth-log
[ + ] postfix
[ + ] procps
[ + ] psa
[ + ] rc.local
[ + ] redis_6379
[ + ] resolvconf
[ - ] rsync
[ + ] rsyslog
[ - ] screen-cleanup
[ - ] sendsigs
[ + ] ssh
[ - ] sw-collectd
[ + ] sw-cp-server
[ + ] sw-engine
[ + ] udev
[ + ] ufw
[ - ] umountfs
[ - ] umountnfs.sh
[ - ] umountroot
[ + ] unattended-upgrades
[ + ] urandom
[ - ] uuidd
[ - ] x11-common
[ + ] xinetd

I've read that nginx could be used as a kind of "front-end" for apache, this may be the case on my server...

Thanks for your help!


#4

You could try disabling nginx and see if the error still occured.


#5

This seems a radical solution! :wink: I can give a try if I can reverse back to the current status...

What is the command to stop this server? I've found a sudo systemctl stop nginx, but don't know if I should restart the whole server after issuing the command (or if nginx will restart too)...

Thanks in advance for your advice.


#6

To run owncloud you need apache, I don't know what nginx is doing there nor how it's configured.

So I would try to stop it, service nginx stop


#7

Did the test seconds ago! ownCloud just doesn't start when nginx is stopped (service not available)... :frowning:

I guess Plesk is using nginx to launch ownCloud, so I'll turn to Plesk support to see if the 504 error is known on their forum...

Come back later, thanks again!


#8

Plesk support returned "get rid of ownCloud and migrate to nextCloud" ! :confounded:

OK, where do I go now?

What is strange is that my "dev" instance works with admin and users with no problem! I've compared file permissions between "dev" and "live": same on files and folders. I even created the user folder manually but to no avail...

Any help will be greatly appreciated!


#9

generally speaking you either run apache or nginx to serve web content. this setup looks strange at the first glance.


#10

LOL - this will for sure help if the there are configuration issues with apache/nginx


#11

Hi all,

I've finally found a solution to my issue: installed nextCloud in a breathe, checked that everything was running fine (no permissions mess, no command line tweak requested, just logon and access to the files), ditched ownCloud, switched to production mode.

It took only 15mn, so I'm sorry ownCloud, but nextCloud looks definitively better!

Bye, see you maybe on nextCloud forum! :slight_smile:

Thanks again for all your help!