desktop icon indicating copy to clipboard operation
desktop copied to clipboard

ELB Can't Access Through Client

Open ibr123 opened this issue 8 years ago • 5 comments

Hello,

i have a case where i have two AWS EC2s Ubuntu 16.04 servers, i installed on them NextCLoud server version 14.0.0.0 (not from snap but through these steps and two servers are connected to an RDS for database and to an S3 storage as a primary storage, both servers are working fine, i can create users and sync files and files are visible on the S3 bucket. now the two servers are behind AWS ELB (Elastic Load Balancer) , i added in the config.php files for both servers the following domains as trusted domains: 0 => 'server A ip address', 1 => 'server B ip address', 2 => 'ELB's DNS',

in the browser i can open the NextCloud page using server A ip address, and using server B ip address but for ELB DNS its ask me first to add the DNS to trusted domain, although its already there in the config.php, and when i press add, the NextCloud page opens and in the config file it adds the DNS again in the client i can connect to server A, and server B, but i can't connect using ELB DNS, it sometimes gives the error: elb error but other times it pass while loading symbol is on but when i enter username and password for a user it doesn't connect, in the log i have the following error {"reqId":"erU0HRxZMZQr5B9FUWzZ","level":2,"time":"2018-02-01T08:08:54+00:00","remoteAddr":"172.31.22.72","user":"--","app":"core","method":"PROPFIND","url":"\/nextcloud\/remote.php\/webdav\/","message":"Trusted domain error. \"172.31.22.72\" tried to access using \"*********.elb.amazonaws.com\" as host.","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.3 (build 1) (Nextcloud)","version":"14.0.0.0"}

any idea? thanks

ibr123 avatar Feb 01 '18 08:02 ibr123

Can you open the web interface using the elb domain name? This looks more like a server configuration issue with the load balancer to me. The log message is pretty clear about that ***.ebl.amazonaws.com is not in the trusted domain list.

juliusknorr avatar Feb 01 '18 15:02 juliusknorr

Btw. the forum at https://help.nextcloud.com might be a better place to ask those kind of questions, since it clearly looks more like a setup issue than a client bug.

juliusknorr avatar Feb 01 '18 16:02 juliusknorr

Well, i thought about the forums, but the thing is that i already configured servers to be trusted and they worked fine, even the ELB's DSN is among the trusted domains, and i was able to open the web interface using the ELB domain, same configuration is worked fine to the servers (EC2s) but not for the ELB.

so i though if its not a bug, its just a matter of ELB isn't supported.

ibr123 avatar Feb 01 '18 18:02 ibr123

so i though if its not a bug, its just a matter of ELB isn't supported.

At least it is not a client bug. If the server responds with a trusted domain error, there's nothing we can do about that in the client. From my knowledge Amazon load balancers set proper X-Forwarded-For headers that will be used by Nextcloud. I'd recommend you to head over to the forum, where maybe some people with deeper ELB knowledge can help out first.

juliusknorr avatar Feb 01 '18 22:02 juliusknorr

is there logs for the NextCloud client? i mean other than server logs

ibr123 avatar Feb 04 '18 08:02 ibr123