Hi eveybody, I am having a problem with federated file sharing which is when I try to do remote share it is not working and instead it is showing an error like could not reach admin@…com,server currently unreachable. The federation app is enabled and all the settings are done properly. The owncloud log shows the following error
{“reqId”:“X7tea3CuvE95KptuR@IbfAAAAAI”,“level”:3,“time”:“2020-11-23T07:02:04+00:00”,“remoteAddr”:“10.180.6.12”,“user”:“admin”,“app”:“no app in context”,“method”:“POST”,“url”:"/owncloud/ocs/v2.php/apps/files_sharing/api/v1/shares?format=json",“message”:“Failed to notify remote server of federated share, removing share (Sharing index.jpg failed, could not find admin@10.180.136.167/owncloud, maybe the server is currently unreachable.)”}
On your first ownCloud instance, open a shell and run curl -I http://10.180.136.167/owncloud
If the other ownCloud instance is using https, you should obviously test it instead of http by adjusting the curl command.
If you get a certificate error with https because you’re using self signed certs, I would recommend to import them into the OS certificate store (this is different on every distribution, consult the manual for yours).
This should show 200 OK But perhaps just paste the result here.
Finally 10.0.4 is quite old, and there have been a lot of bugfixes since then, so it would definitely make sense to upgrade to 10.5.0.
Thank you for quick reply , I upgraded to 10.5.0 and when I executed the curl command it is not showing 200 status , instead it is showing this
HTTP/1.1 301 Moved Permanently
Date: Mon, 23 Nov 2020 11:44:21 GMT
Server: Apache/2.4.6 (CentOS) PHP/7.2.34
Location: http://10.180.136.167/owncloud/
Content-Type: text/html; charset=iso-8859-1
Try your curl again this time with the URL that was given back from the Location response header: curl -I http://10.180.136.167/owncloud/
There is also a special flag for curl to immediately follow redirects, but I don’t know it by heart at the moment.
If that was your ownCloud on the other end, it should redirect you to the login page. Perhaps the second owncloud is accessible on another URL on the server? Perhaps you need to access it with a specific hostname on the IP?
What do you put into your browser address bar if you try to open the second ownCloud? (the one on 10.180.136.167)
@eneubauer Thank you for that, the problem here is that only these two systems(10.180.137.164 and 10.180.136.167) are not accepting federated shares with each other. I tried doing remote shares to and from another instance and it is working perfectly fine. Do you have any idea about that?
Check the admin sharing settings for federation, you need to specifically enable it after the trust relationship between the two servers has been established (they appear green). Check the docs:
Just having a quick glance on it I noticed the following:
For security reasons federated sharing strictly requires HTTPS (SSL/TLS) .
Yes, the problem was with HTTP and I have to add the following line in config
‘sharing.federation.allowHttpFallback’ ⇒ true to make the app accept http and now it is working fine.