Open alavarre opened 9 years ago
I had a similar issue and had somethig to do with some clients (mosly on Android) are sending the server port number with their http request. There was a change in OwnCloud which rejected this behaviour. You can fix it by changing the trusted_domains config option like so:
Old:
'trusted_domains' =>
array (
0 => '192.168.5.2',
),
New
'trusted_domains' =>
array (
0 => '192.168.5.2',
1 => '192.168.5.2:80',
2 => '192.168.5.2:443',
),
Give it a try.
Hello, thank you for the input. I tried this but there is no change. I did restart ther Apache2 server and then repeated the actions above: we can find URLs that display the calendar folders and show the .ics file contents in a browser (from both the 'droid and the main machine) but for whatever reason the app fails to load them. We have tried both the version from f-droid and Google PlayStore.
Are there other possible port numbers?
Thank you again. Cheers, Andy
Nope, in your logs it looks like you use default HTTP (port 80). By the way, this port issue should be fixed with the 7.0.4 release of OwnCloud. I updated yesterday and it looks fixed.
But, looks like this is not your problem. I'm sorry.
I truly hope the AndroidCaldavSyncAdapater development is being continued by someone (what's the story on this @Griffon26?). It's the only free CalDav App that works for me and my OwnCloud enviroment... :(
On Wed, 2014-12-10 at 08:06 -0800, Ralf wrote:
this port issue should be fixed with the 7.0.4 release of OwnCloud. I updated yesterday and it looks fixed.
Woohoo! Yes it is!
I just upgrade OC to 7.0.4 and now it works as it did before.
Well done, thank you.
Cheers, Andy
Great! I'm glad I did mention it ;-) Credits for the fix (and the break...) go to the OC Team off course.
On Wed, 2014-12-10 at 13:18 -0800, Ralf wrote:
and the break...
:-)
Thanks again. All the best, Andy
Oh my... A month later and the same problem has returned. It worked last month with the first issue of OC 7.0.4, but now I'm on OC 7.0.4-16.1 and entering the parameters for Android calDAV now responds. Invalid server answer, check URL.
I've checked the trusted_domains config option as above and it is correct.
Thanks in advance, Andy
You should not need to add the ports in the trusted domains config anymore as far as I know. Try removing them. And do you have the exact name you configure in the sync adapter mentioned in the trusted domains config?
Hello ervee thank you.
I have removed the ports, but it still fails.
How do I enter the "exact name you configure in the sync adapter" into config.php?
The data I enter in the Android sync adapter settings are: • username • password • Account name (optional)
config.php now reads: <?php $CONFIG = array ( 'instanceid' => 'oc1fd9da744f', 'passwordsalt' => '2e191e52aeecaaa057ded162f15227', 'trusted_domains' => array ( 0 => '192.168.5.2', ), 'datadirectory' => '/srv/www/htdocs/owncloud/data', 'dbtype' => 'sqlite3', 'version' => '6.0.3.1', 'installed' => true, );
Where might I study more about how to write config.php?
Thank you again for the prompt response.
Kind regards, Andy
The URL I am setting in the Android is the one in the settings screen of OC on the PC: Primary CalDAV address gives http://localhost/owncloud/remote.php/caldav/
So I use http://192.168.5.2/owncloud/remote.php/caldav/
which is what worked before. I experimented with various others, none of which worked.
Hi Andy. Your config array looks okay with the URL you use. So I don't know why your OC connection stopped working. There should be documentation on the Owncloud website on how to increase logging and debug this problem. Perhaps the logs can give you a clue...
Ralf hi.
Problem solved:
.../owncloud/config/config.php
is very particular. In particular, you must list your "Trusted Domains". It is sort of a firewall on top of the main system firewall.
So even if dmesg didn't show any dropped packets, owncloud was doing its own dropping, ignoring calls from domains not listed in config.php.
Adding my LAN network and in particular my main machine solved the problem:
'trusted_domains' =>
array (
0 => 'localhost',
1 => '192.168.5.0',
2 => '192.168.5.2',
),
Awesome victory. :-)
I find that I do eventually sort out these problems, but sometimes it takes DAYS to do so.
Thank you again for the help.
Kind regards, Andy
On Tue, 2015-01-20 at 13:12 -0800, Ralf wrote:
Hi Andy. Your config array looks okay with the URL you use. So I don't know why your OC connection stopped working. There should be documentation on the Owncloud website on how to increase logging and debug this problem. Perhaps the logs can give you a clue...
— Reply to this email directly or view it on GitHub.
Hi Andy. Great news! Thanks for sharing your solution, it could be helpful to others!
I want to sync with the Nexus 4 Android. We had this working before, but things have changed. I now get
no matter what I've tried.
I am running OwnCloud 7.0.3 under an Apache2 server under Linux openSUSE 13.2. The 'droid is the Nexus 4. (and the Nexus 7). I have tried using the app from both Google PlayStore (v. 1.8.1) and F-droid (v 1.8.10)
OwnCloud works fine, no issues.
Evolution calendar syncs perfectly well with the DAV protocol dav:andy@http://192.168.5.2/owncloud/index.php/apps/calendar/remote.php/caldav/calendar
----------------------- Details ----------------------- 12/3/14
What worked before as a URL is http://192.168.5.2/owncloud/remote.php/caldav/
In summary of the experimentation: we can find URLs that display the calendar folders and show the .ics file contents in a browser (from both the 'droid and the main machine) but for whatever reason the app fails to load them. We have tried both the version from f-droid and Google PlayStore.
Initially we had a warning that the configuration file did not have 192.168.5.2 as a trusted client, so we added that. We also added the 'droid address, (and restarted the server: service apache2 restart) but no joy.
So we must conclude that, since the URLs display correctly in the browsers, the application must be at fault.
This used to work: http://192.168.5.2/owncloud/remote.php/caldav/ Loading this in a browser brings first a demand for username and password User: andy Password: OWNCLOUDbbs14@
Sabre\DAV\Exception\MethodNotAllowed
/s:exception
Listing members of this collection is disabled/s:message
1.8.10/s:sabredav-version
/d:error
Then shows two subdirectories: principals calendars both of which refuse to show their contents: <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
Thanks in advance.
Cheers, Andy