-
Hi All,
I hope someone can help me, I'm running Cloudron 7.4.2 with Nextcloud 26.01 (4.17.0) and Nextcloud fails to start. In the Event log it shows 'App Down'.
The problem started when I did the reboot in the message - Cloudron requires a reboot - to complete the install of 7.4.2. NC didn't restart. I tried to restart it, but that failed, I increased the memory and that made no difference. Event log showed App ran out of memory. In Cloudron Services Redis showed red, and out of memory so I increased it and restarted the whole server. Nothing helped.
In the logs I could see a db error: "Unknown database type polygon requested, Doctrine\DBAL\Platforms\PostgreSQL"
2023-06-02T07:51:17.000Z files_sharing recognize workflowengine
2023-06-02T07:51:18.000Z
2023-06-02T07:51:18.000Z
2023-06-02T07:51:18.000Z
2023-06-02T07:51:18.000Z [32mNextcloud is already latest version[39m
2023-06-02T07:51:18.000Z [32mdb:convert-filecache-bigint[39m
2023-06-02T07:51:18.000Z [33mIn AbstractPlatform.php line 396:[39m
2023-06-02T07:51:18.000Z [37;41m [39;49m
2023-06-02T07:51:18.000Z [37;41m [39;49m
2023-06-02T07:51:18.000Z [37;41m 100Platform may not support it. [39;49m
2023-06-02T07:51:18.000Z [37;41m Unknown database type polygon requested, Doctrine\DBAL\Platforms\PostgreSQL [39;49m
2023-06-02T07:51:25.000Z => Healtheck error: Error: connect EHOSTUNREACH 172.18.16.4:80
2023-06-02T07:51:33.000Z => Healtheck error: Error: connect EHOSTUNREACH 172.18.16.4:80I saw that there was an update to 26.02 (4.17.1) so I applied the update - this has fixed errors in the past. Unfortunately that didn't fix the db issue, and I now see in the logs:
Jun 02 15:19:50 ==> run migration
Jun 02 15:19:50 Nextcloud is in maintenance mode, no apps are loaded.Any idea how I can recover NC?
Thanks!!!
-
-
@max This feels like maybe one of the plugins you installed wants a specific database feature. Is there any plugin that requires some postgis/maps style feature? You can follow https://docs.cloudron.io/apps/nextcloud/#fixing-a-broken-install to disable the plugin and then start nextcloud.
-
@max turns out there was a memories plugin (https://apps.nextcloud.com/apps/memories) that you possibly installed in the past. This plugin had a table which was using some geometry stuff. I deleted that table manually (memory_geometry iirc) and the app starts up after that.
-
@girish thanks Girish, that's amazing!
I had disabled Memories and NC still wouldn't start.
I did recently install geolocations so Memories coukd worked with locations. I was suspicious that this was the app requiring polygons on Postgres, but I couldn't find anything else about it. It was running for 5 or 6 weeks after that, until the update of NC.
-
@max I can easily reproduce this.
- Install nextcloud
- Install memories
- Restart nextcloud
Jun 03 10:44:40 => Healtheck error: Error: connect ECONNREFUSED 172.18.20.56:80 Jun 03 10:44:40 Nextcloud is already latest version Jun 03 10:44:40 Jun 03 10:44:40 In AbstractPlatform.php line 396: Jun 03 10:44:40 Jun 03 10:44:40 Unknown database type polygon requested, Doctrine\DBAL\Platforms\PostgreSQL Jun 03 10:44:40 100Platform may not support it.
- I have to
DROP table oc_memories_planet_geometry
manually to get it working again . It seems disabling/removing the app does not remove the tables...
-
Hi @girish I have this exact issue also. I was trying out Memories over NC Photos, and my server updated and boom my instance won't start.
I have to DROP table oc_memories_planet_geometry manually to get it working again . It seems disabling/removing the app does not remove the tables...
Could you post the commands for dropping the relevant table? Databases are one thing I'm really not confident working with and it'd save me a lot of work. If it helps, I cannot get to the Nextcloud instance commandline as it won't start. Thanks.
-
@ei8fdb Something like:
- Enable recovery mode
- Open webterminal.
- Click MySQL button on top . This will paste a command. Press enter. This will give a MySQL shell.
- execute
DROP table oc_memories_planet_geometry;
(note the semicoloon at the end) - Disable recovery mode
-
@girish said in Nextcloud won't start :
;
Gah. I originally used that exact syntax, but forgot the ; !
Only when you highlighted it did I remember. Thanks very much @girish you saved me a lot of time. And even more so on a Saturday.
The one thing I could not figure out was how to make the connection between the error message (for others, bolded below)
Jun 03 10:45:37 In AbstractPlatform.php line 396: Jun 03 10:45:37 **Jun 03 10:45:37 Unknown database type polygon requested, Doctrine\DBAL\Platforms\PostgreSQL Jun 03 10:45:37 100Platform may not support it.**
and that it was related to 1) an pp, and 2) what app in particular.
I'd appreciate if you could explain how you made this connection. (When you have time. It's Saturday and everyone deserves their time off!)
-
@ei8fdb did you install geo locations for geo tagging your photos?
I recently installed geo, and I have been using memories for a long Time without issues, its a great plugin! So either the recent update killed it or it is the geo locations doing it.
-
I found the isssue here. The memories app needs the
postgis
extension in PostgreSQL. For some reason, it doesn't enable this, I guess it expects it to be enabled already.The fix if you want to use this app (for the future) is:
- Be sure to be on nextcloud package 4.17.2 atleast
- Open Web terminal and click the PostgreSQL button on top. Press enter and run
CREATE EXTENSION IF NOT EXISTS postgis;
. - Now the app works even after restarts
-
@ei8fdb said in Nextcloud won't start :
The one thing I could not figure out was how to make the connection between the error message
I mostly guessed from the
Unknown database type polygon requested
message. That pointed to some geometry related data type - http://postgis.net/ . From that I went digging into the database (from the dump file) as to who created this type. I gotoc_memories_planet_geometry
from that. Was quite tricky to figure because the memories app was not installed on the OPs server (but was installed sometime in the past) and this was just the remains of the app in the database.