coolify icon indicating copy to clipboard operation
coolify copied to clipboard

[Bug]: Posthog Template not working

Open pranavp10 opened this issue 1 year ago • 22 comments

Error Message and Logs

2024-09-27T03:10:09.781573969Z 2024-09-27T03:10:09.781458Z [info ] AXES: BEGIN LOG [axes.apps] pid=1221 tid=129749577902400 2024-09-27T03:10:09.782463528Z 2024-09-27T03:10:09.782345Z [info ] AXES: Using django-axes version 5.9.0 [axes.apps] pid=1221 tid=129749577902400 2024-09-27T03:10:09.782531305Z 2024-09-27T03:10:09.782456Z [info ] AXES: blocking by IP only. [axes.apps] pid=1221 tid=129749577902400 2024-09-27T03:10:10.128720044Z 2024/09/27 03:10:10 [info] 1353#1353 "posthog" application started 2024-09-27T03:10:16.303566220Z 2024-09-27T03:10:16.303147Z [warning ] Skipping async migrations setup. This is unsafe in production! [posthog.apps] pid=1353 tid=129749577902400 2024-09-27T03:10:16.306121412Z 2024-09-27T03:10:16.305753Z [info ] AXES: BEGIN LOG [axes.apps] pid=1353 tid=129749577902400 2024-09-27T03:10:16.306664004Z 2024-09-27T03:10:16.306577Z [info ] AXES: Using django-axes version 5.9.0 [axes.apps] pid=1353 tid=129749577902400 2024-09-27T03:10:16.306741452Z 2024-09-27T03:10:16.306679Z [info ] AXES: blocking by IP only. [axes.apps] pid=1353 tid=129749577902400 2024-09-27T03:10:16.649950175Z 2024/09/27 03:10:16 [info] 1485#1485 "posthog" application started 2024-09-27T03:10:22.845515928Z 2024-09-27T03:10:22.845242Z [warning ] Skipping async migrations setup. This is unsafe in production! [posthog.apps] pid=1485 tid=129749577902400 2024-09-27T03:10:22.847924233Z 2024-09-27T03:10:22.847717Z [info ] AXES: BEGIN LOG [axes.apps] pid=1485 tid=129749577902400 2024-09-27T03:10:22.848425456Z 2024-09-27T03:10:22.848331Z [info ] AXES: Using django-axes version 5.9.0 [axes.apps] pid=1485 tid=129749577902400 2024-09-27T03:10:22.848498636Z 2024-09-27T03:10:22.848434Z [info ] AXES: blocking by IP only. [axes.apps] pid=1485 tid=129749577902400 2024-09-27T03:10:23.199552262Z 2024/09/27 03:10:23 [info] 1617#1617 "metrics" prototype started 2024-09-27T03:10:23.200194551Z 2024/09/27 03:10:23 [info] 1618#1618 "metrics" application started 2024-09-27T03:10:23.287747978Z /usr/local/bin/docker-entrypoint.sh: OK: HTTP response status code is '200' 2024-09-27T03:10:23.287768203Z { "success": "Reconfiguration done." }

2024-09-27T03:10:23.287771533Z /usr/local/bin/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/... 2024-09-27T03:10:23.290202283Z /usr/local/bin/docker-entrypoint.sh: Ignoring /docker-entrypoint.d/unit.json.tpl 2024-09-27T03:10:23.290241436Z /usr/local/bin/docker-entrypoint.sh: Stopping Unit daemon after initial configuration... 2024-09-27T03:10:23.291316883Z 2024/09/27 03:10:23 [notice] 1076#1076 process 1080 exited with code 0 2024-09-27T03:10:23.292086857Z /usr/local/bin/docker-entrypoint.sh: Waiting for control socket to be removed... 2024-09-27T03:10:23.294635567Z 2024/09/27 03:10:23 [notice] 1076#1076 process 1081 exited with code 0 2024-09-27T03:10:23.301168507Z 2024/09/27 03:10:23 [notice] 1617#1617 app process 1618 exited with code 0 2024-09-27T03:10:23.301174889Z 2024/09/27 03:10:23 [alert] 1617#1617 sendmsg(13, -1, -1, 2) failed (32: Broken pipe) 2024-09-27T03:10:23.301660725Z 2024/09/27 03:10:23 [notice] 1076#1076 process 1617 exited with code 0 2024-09-27T03:10:24.293454148Z /usr/local/bin/docker-entrypoint.sh: Waiting for control socket to be removed... 2024-09-27T03:10:24.725867632Z 2024/09/27 03:10:24 [notice] 1088#1088 app process 1353 exited with code 0 2024-09-27T03:10:24.725895226Z 2024/09/27 03:10:24 [alert] 1088#1088 sendmsg(13, -1, -1, 2) failed (32: Broken pipe) 2024-09-27T03:10:24.797608182Z 2024/09/27 03:10:24 [notice] 1088#1088 app process 1485 exited with code 0 2024-09-27T03:10:24.797633340Z 2024/09/27 03:10:24 [alert] 1088#1088 sendmsg(13, -1, -1, 2) failed (32: Broken pipe) 2024-09-27T03:10:25.185013085Z 2024/09/27 03:10:25 [notice] 1088#1088 app process 1089 exited with code 0 2024-09-27T03:10:25.185034919Z 2024/09/27 03:10:25 [alert] 1088#1088 sendmsg(13, -1, -1, 2) failed (32: Broken pipe) 2024-09-27T03:10:25.294728911Z /usr/local/bin/docker-entrypoint.sh: Waiting for control socket to be removed... 2024-09-27T03:10:25.746830798Z 2024/09/27 03:10:25 [notice] 1088#1088 app process 1221 exited with code 0 2024-09-27T03:10:25.746850296Z 2024/09/27 03:10:25 [alert] 1088#1088 sendmsg(13, -1, -1, 2) failed (32: Broken pipe) 2024-09-27T03:10:25.747422558Z 2024/09/27 03:10:25 [notice] 1076#1076 process 1088 exited with code 0 2024-09-27T03:10:26.296386743Z 2024-09-27T03:10:26.296435751Z /usr/local/bin/docker-entrypoint.sh: Unit initial configuration complete; ready for start up... 2024-09-27T03:10:26.296442646Z 2024-09-27T03:10:26.298848524Z 2024/09/27 03:10:26 [info] 672#672 unit 1.32.0 started 2024-09-27T03:10:26.299270167Z 2024/09/27 03:10:26 [info] 1696#1696 discovery started 2024-09-27T03:10:26.300686069Z 2024/09/27 03:10:26 [notice] 1696#1696 module: python 3.11.8 "/usr/lib/unit/modules/python3.unit.so" 2024-09-27T03:10:26.300864982Z 2024/09/27 03:10:26 [info] 672#672 controller started 2024-09-27T03:10:26.301231095Z 2024/09/27 03:10:26 [notice] 672#672 process 1696 exited with code 0 2024-09-27T03:10:26.301428809Z 2024/09/27 03:10:26 [info] 1698#1698 router started 2024-09-27T03:10:26.302463316Z 2024/09/27 03:10:26 [info] 1698#1698 OpenSSL 1.1.1w 11 Sep 2023, 1010117f 2024-09-27T03:10:26.310623602Z 2024/09/27 03:10:26 [info] 1699#1699 "posthog" prototype started 2024-09-27T03:10:26.311111570Z 2024/09/27 03:10:26 [info] 1700#1700 "posthog" application started 2024-09-27T03:10:32.789296023Z 2024-09-27T03:10:32.788910Z [warning ] Skipping async migrations setup. This is unsafe in production! [posthog.apps] pid=1700 tid=130324734585152 2024-09-27T03:10:32.791708667Z 2024-09-27T03:10:32.791568Z [info ] AXES: BEGIN LOG [axes.apps] pid=1700 tid=130324734585152 2024-09-27T03:10:32.792530166Z 2024-09-27T03:10:32.792408Z [info ] AXES: Using django-axes version 5.9.0 [axes.apps] pid=1700 tid=130324734585152 2024-09-27T03:10:32.792577450Z 2024-09-27T03:10:32.792517Z [info ] AXES: blocking by IP only. [axes.apps] pid=1700 tid=130324734585152 2024-09-27T03:10:33.145526088Z 2024/09/27 03:10:33 [info] 1832#1832 "posthog" application started 2024-09-27T03:10:39.505471046Z 2024-09-27T03:10:39.505118Z [warning ] Skipping async migrations setup. This is unsafe in production! [posthog.apps] pid=1832 tid=130324734585152 2024-09-27T03:10:39.507812418Z 2024-09-27T03:10:39.507650Z [info ] AXES: BEGIN LOG [axes.apps] pid=1832 tid=130324734585152 2024-09-27T03:10:39.508450125Z 2024-09-27T03:10:39.508359Z [info ] AXES: Using django-axes version 5.9.0 [axes.apps] pid=1832 tid=130324734585152 2024-09-27T03:10:39.508521986Z 2024-09-27T03:10:39.508458Z [info ] AXES: blocking by IP only. [axes.apps] pid=1832 tid=130324734585152 2024-09-27T03:10:39.858560984Z 2024/09/27 03:10:39 [info] 1964#1964 "posthog" application started 2024-09-27T03:10:46.148900703Z 2024-09-27T03:10:46.148628Z [warning ] Skipping async migrations setup. This is unsafe in production! [posthog.apps] pid=1964 tid=130324734585152 2024-09-27T03:10:46.151232216Z 2024-09-27T03:10:46.151132Z [info ] AXES: BEGIN LOG [axes.apps] pid=1964 tid=130324734585152 2024-09-27T03:10:46.151836593Z 2024-09-27T03:10:46.151751Z [info ] AXES: Using django-axes version 5.9.0 [axes.apps] pid=1964 tid=130324734585152 2024-09-27T03:10:46.151911382Z 2024-09-27T03:10:46.151855Z [info ] AXES: blocking by IP only. [axes.apps] pid=1964 tid=130324734585152 2024-09-27T03:10:46.502052707Z 2024/09/27 03:10:46 [info] 2096#2096 "posthog" application started 2024-09-27T03:10:52.829043105Z 2024-09-27T03:10:52.828777Z [warning ] Skipping async migrations setup. This is unsafe in production! [posthog.apps] pid=2096 tid=130324734585152 2024-09-27T03:10:52.831396055Z 2024-09-27T03:10:52.831297Z [info ] AXES: BEGIN LOG [axes.apps] pid=2096 tid=130324734585152 2024-09-27T03:10:52.831988275Z 2024-09-27T03:10:52.831905Z [info ] AXES: Using django-axes version 5.9.0 [axes.apps] pid=2096 tid=130324734585152 2024-09-27T03:10:52.832063098Z 2024-09-27T03:10:52.832009Z [info ] AXES: blocking by IP only. [axes.apps] pid=2096 tid=130324734585152 2024-09-27T03:10:53.189821319Z 2024/09/27 03:10:53 [info] 2228#2228 "metrics" prototype started 2024-09-27T03:10:53.190348025Z 2024/09/27 03:10:53 [info] 2229#2229 "metrics" application started

Steps to Reproduce

  1. Log in to Coolify.
  2. Select the PostHog template.
  3. Click on "Deploy."
  4. Visit the provided URL.

Example Repository URL

No response

Coolify Version

v4.0.0-beta.340

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

No response

Additional Information

The VM hosted on AWS has a 16-core processor and 64GB of RAM. It shows a "Bad Gateway" error, and even after checking back two days later, the issue persists.

pranavp10 avatar Sep 27 '24 03:09 pranavp10

Hey,

I noticed there was a bug fix related to this issue (https://github.com/coollabsio/coolify/pull/3784) that was recently implemented, but unfortunately, it hasn’t resolved the problem on my end.

I’ve upgraded to the latest version of Coolify, but the default PostHog template still behaves inconsistently. It throws a "bad gateway" error randomly—sometimes the site works fine, but other times it fails without any clear pattern.

Additionally, when I try changing the domain for the service (instead of using the default one generated by Coolify), it never works and always returns an error.

Any insights or suggestions on how to fix this would be really appreciated!

Thanks in advance!

arthur-crahe avatar Oct 11 '24 07:10 arthur-crahe

As of right now (v4.0.0-beta364), the Posthog template is not working.

When deployed via the one-click app, the Posthog services all start up and fine, however the webui does not load due to a bunch of 502 errors when loading the javascript for the webui.

Fractal-Tess avatar Nov 11 '24 01:11 Fractal-Tess

snot working for me either. setup a valide FQDN, updated docker-compose file to include SERVICE_FQDN_WEB rather then SERVICE_FQDN_WEB_8000` didn't work. it still unhealthy.

I 've logged in inside the container and made curl localhost:8000, didn't respond with anything

I somehow can see something going on, like requests are terminating in the posthug web when trying to access from inside the container but nothing happen when you access via fqdn.

2024-11-12T21:40:50.160662Z [info     ] request_started                [django_structlog.middlewares.request] container_hostname=6fee42600749 host=172.24.0.11:8000 ip=172.24.0.1 pid=237 request=<WSGIRequest: GET '/'> request_id=c9afeb19-bb90-471b-af1b-fa3ca2fad204 tid=140346526570816 user_agent=curl/7.88.1 x_forwarded_for=
2024-11-12T21:40:50.400021Z [info     ] request_finished               [django_structlog.middlewares.request] code=302 container_hostname=6fee42600749 host=172.24.0.11:8000 ip=172.24.0.1 pid=237 request=<WSGIRequest: GET '/'> request_id=c9afeb19-bb90-471b-af1b-fa3ca2fad204 tid=140346526570816 user_id=None x_forwarded_for=

magixus avatar Nov 12 '24 21:11 magixus

snot working for me either. setup a valide FQDN, updated docker-compose file to include SERVICE_FQDN_WEB rather then SERVICE_FQDN_WEB_8000` didn't work. it still unhealthy.

I 've logged in inside the container and made curl localhost:8000, didn't respond with anything

I somehow can see something going on, like requests are terminating in the posthug web when trying to access from inside the container but nothing happen when you access via fqdn.

2024-11-12T21:40:50.160662Z [info     ] request_started                [django_structlog.middlewares.request] container_hostname=6fee42600749 host=172.24.0.11:8000 ip=172.24.0.1 pid=237 request=<WSGIRequest: GET '/'> request_id=c9afeb19-bb90-471b-af1b-fa3ca2fad204 tid=140346526570816 user_agent=curl/7.88.1 x_forwarded_for=
2024-11-12T21:40:50.400021Z [info     ] request_finished               [django_structlog.middlewares.request] code=302 container_hostname=6fee42600749 host=172.24.0.11:8000 ip=172.24.0.1 pid=237 request=<WSGIRequest: GET '/'> request_id=c9afeb19-bb90-471b-af1b-fa3ca2fad204 tid=140346526570816 user_id=None x_forwarded_for=

Finally got it to work! Enable a large swap Change SERVICE_FQDN_WEB_8000 to SERVICE_FQDN_WEB After starting posthog, give it a few minutes to boot up

johnpccd avatar Nov 13 '24 23:11 johnpccd

what does Enable a large swap mean ?

a large swap Change SERVICE_FQDN_WEB_8000 to SERVICE_FQDN_WEB

developerautomationkit avatar Dec 04 '24 19:12 developerautomationkit

what does Enable a large swap mean ?

a large swap Change SERVICE_FQDN_WEB_8000 to SERVICE_FQDN_WEB

https://github.com/coollabsio/coolify/issues/2110#issuecomment-2331620705

johnpccd avatar Dec 04 '24 19:12 johnpccd

what does Enable a large swap mean ?

a large swap Change SERVICE_FQDN_WEB_8000 to SERVICE_FQDN_WEB

#2110 (comment)

did you change anything else ? i did both changes .. but all the posthog services are unhealthy and i still get bad gateway

developerautomationkit avatar Dec 04 '24 19:12 developerautomationkit

what does Enable a large swap mean ?

a large swap Change SERVICE_FQDN_WEB_8000 to SERVICE_FQDN_WEB

#2110 (comment)

did you change anything else ? i did both changes .. but all the posthog services are unhealthy and i still get bad gateway

can u show memory and swap usage after a few minutes from starting the service (make sure logs stabilize)? also what hardware do you have?

johnpccd avatar Dec 05 '24 01:12 johnpccd

what does Enable a large swap mean ?

a large swap Change SERVICE_FQDN_WEB_8000 to SERVICE_FQDN_WEB

#2110 (comment)

did you change anything else ? i did both changes .. but all the posthog services are unhealthy and i still get bad gateway

can u show memory and swap usage after a few minutes from starting the service (make sure logs stabilize)? also what hardware do you have?

iam on a hetzner cloud server i switched to posthog eu (hosted version for now since its free)... the logs didnt show any kind of errors so i couldnt figure out whats the problem

developerautomationkit avatar Dec 09 '24 15:12 developerautomationkit

I couldn't get it to work either. I also needed to include a new shard for Clickhouse in the Storages section, just look for </posthog> and add this below:

https://github.com/PostHog/posthog/blob/6c58e55f0c1dcafc0883ae336c51e2adb3741f97/docker/clickhouse/config.xml#L174-L181

It's worth mentioning I subtituted this entire config at one point. Didn't seem to hurt either.

Regardless, I was able to obfuscate the error but I still received the 502.

After some debugging I see the the plugins container crashes every minute or so with:

2024-12-27T18:10:44.773309471Z {"level":"error","time":1735323044772,"pid":205,"hostname":"7a65bb2ce0e4","errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":6479,"msg":"[MAIN] 😡 Redis error encountered! Enough of this, I quit!\n"}

I wasn't able to fix this, I think the plugins container isn't correctly loading the REDIS_URL variable there and for some reason uses the default one. The kafka variable works fine, so IDK really what's happening.

When I map the ports manually in the Edit Compose file in the Service Stack tab and add ports to the web: section:

  web:
    image: 'posthog/posthog:latest'
    command: /compose/start
    ports:
      - 8001:8000
      - 8002:8001
      - 81:80

I was able to get the panel to load... I signed myself up but I'm not able to get beyond the login...

maarteNNNN avatar Dec 27 '24 18:12 maarteNNNN

Any update on this? The PostHog template is broken for me too. :/

wottpal avatar Jan 27 '25 15:01 wottpal

Same issue, template is broken for me!

christophemenager avatar Jan 29 '25 21:01 christophemenager

Still completely broken.

Clickhouse

2025-01-31T13:31:25.979544727Z Processing configuration file '/etc/clickhouse-server/config.xml'.
2025-01-31T13:31:26.067250293Z Poco::Exception. Code: 1000, e.code() = 13, Access to file denied: /etc/clickhouse-server/config.xml, Stack trace (when copying this message, always include the lines below):
2025-01-31T13:31:26.067278450Z 
2025-01-31T13:31:26.067285841Z 0. Poco::FileAccessDeniedException::FileAccessDeniedException(String const&, int) @ 0x0000000014d34629 in /usr/bin/clickhouse
2025-01-31T13:31:26.067292954Z 1. Poco::FileImpl::handleLastErrorImpl(String const&) @ 0x0000000014d35c70 in /usr/bin/clickhouse
2025-01-31T13:31:26.067299150Z 2. ? @ 0x0000000014d37606 in /usr/bin/clickhouse
2025-01-31T13:31:26.067305340Z 3. ? @ 0x0000000014d43029 in /usr/bin/clickhouse
2025-01-31T13:31:26.067311135Z 4. Poco::FileInputStream::FileInputStream(String const&, unsigned int) @ 0x0000000014d435bb in /usr/bin/clickhouse
2025-01-31T13:31:26.067316373Z 5. Poco::FileStreamFactory::open(Poco::Path const&) @ 0x0000000014d72825 in /usr/bin/clickhouse
2025-01-31T13:31:26.067322372Z 6. Poco::URIStreamOpener::open(String const&) const @ 0x0000000014d71979 in /usr/bin/clickhouse
2025-01-31T13:31:26.067328823Z 7. Poco::XML::EntityResolverImpl::resolveSystemId(String const&) @ 0x0000000014ca7b15 in /usr/bin/clickhouse
2025-01-31T13:31:26.067334714Z 8. Poco::XML::EntityResolverImpl::resolveEntity(String const*, String const&) @ 0x0000000014ca7879 in /usr/bin/clickhouse
2025-01-31T13:31:26.067341289Z 9. Poco::XML::SAXParser::parse(String const&) @ 0x0000000014ca0492 in /usr/bin/clickhouse
2025-01-31T13:31:26.067347752Z 10. Poco::XML::DOMBuilder::parse(String const&) @ 0x0000000014c91b18 in /usr/bin/clickhouse
2025-01-31T13:31:26.067353510Z 11. Poco::XML::DOMParser::parse(String const&) @ 0x0000000014c90fe2 in /usr/bin/clickhouse
2025-01-31T13:31:26.067360120Z 12. DB::ConfigProcessor::processConfig(bool*, zkutil::ZooKeeperNodeCache*, std::shared_ptr<Poco::Event> const&) @ 0x00000000128c2168 in /usr/bin/clickhouse
2025-01-31T13:31:26.067380626Z 13. DB::ConfigProcessor::loadConfig(bool) @ 0x00000000128c59b4 in /usr/bin/clickhouse
2025-01-31T13:31:26.067389082Z 14. BaseDaemon::initialize(Poco::Util::Application&) @ 0x000000000c7cfd40 in /usr/bin/clickhouse
2025-01-31T13:31:26.067395199Z 15. DB::Server::initialize(Poco::Util::Application&) @ 0x000000000c587518 in /usr/bin/clickhouse
2025-01-31T13:31:26.067401991Z 16. Poco::Util::Application::run() @ 0x0000000014c7eaba in /usr/bin/clickhouse
2025-01-31T13:31:26.067408224Z 17. DB::Server::run() @ 0x000000000c5872d1 in /usr/bin/clickhouse
2025-01-31T13:31:26.067413851Z 18. Poco::Util::ServerApplication::run(int, char**) @ 0x0000000014c87819 in /usr/bin/clickhouse
2025-01-31T13:31:26.067423181Z 19. mainEntryClickHouseServer(int, char**) @ 0x000000000c58418a in /usr/bin/clickhouse
2025-01-31T13:31:26.067429570Z 20. main @ 0x00000000071c10ce in /usr/bin/clickhouse
2025-01-31T13:31:26.067435065Z 21. ? @ 0x00007ff498a13083 in ?
2025-01-31T13:31:26.067440196Z 22. _start @ 0x0000000005e9e1ae in /usr/bin/clickhouse
2025-01-31T13:31:26.067459110Z  (version 23.11.2.11 (official build))

DB

2025-01-31T13:31:26.585931594Z server stopped
2025-01-31T13:31:26.586979998Z 
2025-01-31T13:31:26.586997821Z PostgreSQL init process complete; ready for start up.
2025-01-31T13:31:26.587005983Z 
2025-01-31T13:31:26.606061738Z 2025-01-31 13:31:26.605 UTC [1] LOG:  starting PostgreSQL 12.22 on x86_64-pc-linux-musl, compiled by gcc (Alpine 14.2.0) 14.2.0, 64-bit
2025-01-31T13:31:26.606088556Z 2025-01-31 13:31:26.605 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2025-01-31T13:31:26.606094356Z 2025-01-31 13:31:26.605 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2025-01-31T13:31:26.607068839Z 2025-01-31 13:31:26.606 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-01-31T13:31:26.620735765Z 2025-01-31 13:31:26.620 UTC [63] LOG:  database system was shut down at 2025-01-31 13:31:26 UTC
2025-01-31T13:31:26.625883239Z 2025-01-31 13:31:26.625 UTC [1] LOG:  database system is ready to accept connections
2025-01-31T13:31:29.595441621Z 2025-01-31 13:31:29.592 UTC [85] ERROR:  database "temporal" already exists
2025-01-31T13:31:29.595482798Z 2025-01-31 13:31:29.592 UTC [85] STATEMENT:  CREATE DATABASE temporal
2025-01-31T13:31:29.776813341Z 2025-01-31 13:31:29.776 UTC [88] ERROR:  database "temporal_visibility" already exists
2025-01-31T13:31:29.776845080Z 2025-01-31 13:31:29.776 UTC [88] STATEMENT:  CREATE DATABASE temporal_visibility
2025-01-31T13:31:30.899746488Z 2025-01-31 13:31:30.899 UTC [99] ERROR:  database "temporal" already exists
2025-01-31T13:31:30.899789856Z 2025-01-31 13:31:30.899 UTC [99] STATEMENT:  CREATE DATABASE temporal
2025-01-31T13:31:31.095861392Z 2025-01-31 13:31:31.091 UTC [102] ERROR:  database "temporal_visibility" already exists
2025-01-31T13:31:31.095899876Z 2025-01-31 13:31:31.091 UTC [102] STATEMENT:  CREATE DATABASE temporal_visibility
2025-01-31T13:31:32.615738619Z 2025-01-31 13:31:32.615 UTC [107] ERROR:  database "temporal" already exists
2025-01-31T13:31:32.615795597Z 2025-01-31 13:31:32.615 UTC [107] STATEMENT:  CREATE DATABASE temporal
2025-01-31T13:31:32.811291789Z 2025-01-31 13:31:32.810 UTC [117] ERROR:  database "temporal_visibility" already exists
2025-01-31T13:31:32.811324866Z 2025-01-31 13:31:32.810 UTC [117] STATEMENT:  CREATE DATABASE temporal_visibility
2025-01-31T13:31:34.671984988Z 2025-01-31 13:31:34.671 UTC [121] ERROR:  database "temporal" already exists
2025-01-31T13:31:34.672027122Z 2025-01-31 13:31:34.671 UTC [121] STATEMENT:  CREATE DATABASE temporal
2025-01-31T13:31:34.920030123Z 2025-01-31 13:31:34.919 UTC [131] ERROR:  database "temporal_visibility" already exists
2025-01-31T13:31:34.920072862Z 2025-01-31 13:31:34.919 UTC [131] STATEMENT:  CREATE DATABASE temporal_visibility
2025-01-31T13:31:37.300586089Z 2025-01-31 13:31:37.300 UTC [142] ERROR:  database "temporal" already exists
2025-01-31T13:31:37.300622579Z 2025-01-31 13:31:37.300 UTC [142] STATEMENT:  CREATE DATABASE temporal
2025-01-31T13:31:37.427813733Z 2025-01-31 13:31:37.427 UTC [145] ERROR:  database "temporal_visibility" already exists
2025-01-31T13:31:37.427856993Z 2025-01-31 13:31:37.427 UTC [145] STATEMENT:  CREATE DATABASE temporal_visibility
2025-01-31T13:31:41.421536009Z 2025-01-31 13:31:41.421 UTC [162] ERROR:  database "temporal" already exists
2025-01-31T13:31:41.421569696Z 2025-01-31 13:31:41.421 UTC [162] STATEMENT:  CREATE DATABASE temporal
2025-01-31T13:31:41.683590788Z 2025-01-31 13:31:41.683 UTC [165] ERROR:  database "temporal_visibility" already exists
2025-01-31T13:31:41.683628025Z 2025-01-31 13:31:41.683 UTC [165] STATEMENT:  CREATE DATABASE temporal_visibility
2025-01-31T13:31:48.877876832Z 2025-01-31 13:31:48.877 UTC [190] ERROR:  database "temporal" already exists
2025-01-31T13:31:48.877909840Z 2025-01-31 13:31:48.877 UTC [190] STATEMENT:  CREATE DATABASE temporal
2025-01-31T13:31:49.023471694Z 2025-01-31 13:31:49.019 UTC [193] ERROR:  database "temporal_visibility" already exists
2025-01-31T13:31:49.023501871Z 2025-01-31 13:31:49.019 UTC [193] STATEMENT:  CREATE DATABASE temporal_visibility
2025-01-31T13:32:00.360694474Z 2025-01-31 13:32:00.360 UTC [240] ERROR:  relation "graphile_worker.migrations" does not exist at character 16
2025-01-31T13:32:00.360732838Z 2025-01-31 13:32:00.360 UTC [240] STATEMENT:  select id from "graphile_worker".migrations order by id desc limit 1;
2025-01-31T13:32:00.435974122Z 2025-01-31 13:32:00.435 UTC [241] ERROR:  relation "posthog_pluginattachment" does not exist at character 95
2025-01-31T13:32:00.436016067Z 2025-01-31 13:32:00.435 UTC [241] STATEMENT:  /* plugin-server:COMMON_WRITE<fetchGeoIpAttachment> */ 
2025-01-31T13:32:00.436025389Z 	            SELECT *
2025-01-31T13:32:00.436031111Z 	            FROM posthog_pluginattachment
2025-01-31T13:32:00.436036282Z 	            WHERE key = $1
2025-01-31T13:32:00.436041750Z 	              AND plugin_config_id IS NULL
2025-01-31T13:32:00.436061992Z 	              AND team_id IS NULL
2025-01-31T13:32:00.436068052Z 	            ORDER BY file_name ASC
2025-01-31T13:32:00.436073701Z 	        
2025-01-31T13:32:02.614995187Z 2025-01-31 13:32:02.612 UTC [250] ERROR:  database "temporal" already exists
2025-01-31T13:32:02.615034401Z 2025-01-31 13:32:02.612 UTC [250] STATEMENT:  CREATE DATABASE temporal
2025-01-31T13:32:02.745034079Z 2025-01-31 13:32:02.742 UTC [253] ERROR:  database "temporal_visibility" already exists
2025-01-31T13:32:02.745071461Z 2025-01-31 13:32:02.742 UTC [253] STATEMENT:  CREATE DATABASE temporal_visibility
2025-01-31T13:32:18.434202425Z 2025-01-31 13:32:18.431 UTC [315] FATAL:  password authentication failed for user "netdata"
2025-01-31T13:32:18.434233316Z 2025-01-31 13:32:18.431 UTC [315] DETAIL:  Role "netdata" does not exist.
2025-01-31T13:32:18.434242494Z 	Connection matched pg_hba.conf line 99: "host all all all md5"
2025-01-31T13:32:21.742257731Z 2025-01-31 13:32:21.742 UTC [324] ERROR:  relation "posthog_pluginattachment" does not exist at character 95
2025-01-31T13:32:21.742298196Z 2025-01-31 13:32:21.742 UTC [324] STATEMENT:  /* plugin-server:COMMON_WRITE<fetchGeoIpAttachment> */ 
2025-01-31T13:32:21.742308212Z 	            SELECT *
2025-01-31T13:32:21.742315439Z 	            FROM posthog_pluginattachment
2025-01-31T13:32:21.742321664Z 	            WHERE key = $1
2025-01-31T13:32:21.742327717Z 	              AND plugin_config_id IS NULL
2025-01-31T13:32:21.742333935Z 	              AND team_id IS NULL
2025-01-31T13:32:21.742340034Z 	            ORDER BY file_name ASC
2025-01-31T13:32:21.742346506Z 	        
2025-01-31T13:32:28.828618705Z 2025-01-31 13:32:28.828 UTC [355] ERROR:  database "temporal" already exists
2025-01-31T13:32:28.828665728Z 2025-01-31 13:32:28.828 UTC [355] STATEMENT:  CREATE DATABASE temporal
2025-01-31T13:32:28.930172931Z 2025-01-31 13:32:28.930 UTC [358] ERROR:  database "temporal_visibility" already exists
2025-01-31T13:32:28.930205064Z 2025-01-31 13:32:28.930 UTC [358] STATEMENT:  CREATE DATABASE temporal_visibility
2025-01-31T13:32:43.221401153Z 2025-01-31 13:32:43.221 UTC [413] ERROR:  relation "posthog_pluginattachment" does not exist at character 95
2025-01-31T13:32:43.221427829Z 2025-01-31 13:32:43.221 UTC [413] STATEMENT:  /* plugin-server:COMMON_WRITE<fetchGeoIpAttachment> */ 
2025-01-31T13:32:43.221435863Z 	            SELECT *
2025-01-31T13:32:43.221440136Z 	            FROM posthog_pluginattachment
2025-01-31T13:32:43.221443845Z 	            WHERE key = $1
2025-01-31T13:32:43.221447541Z 	              AND plugin_config_id IS NULL
2025-01-31T13:32:43.221451088Z 	              AND team_id IS NULL
2025-01-31T13:32:43.221454592Z 	            ORDER BY file_name ASC
2025-01-31T13:32:43.221470087Z 	        
2025-01-31T13:33:04.407581121Z 2025-01-31 13:33:04.407 UTC [488] ERROR:  relation "posthog_pluginattachment" does not exist at character 95
2025-01-31T13:33:04.407621960Z 2025-01-31 13:33:04.407 UTC [488] STATEMENT:  /* plugin-server:COMMON_WRITE<fetchGeoIpAttachment> */ 
2025-01-31T13:33:04.407631058Z 	            SELECT *
2025-01-31T13:33:04.407637627Z 	            FROM posthog_pluginattachment
2025-01-31T13:33:04.407643696Z 	            WHERE key = $1
2025-01-31T13:33:04.407649742Z 	              AND plugin_config_id IS NULL
2025-01-31T13:33:04.407655927Z 	              AND team_id IS NULL
2025-01-31T13:33:04.407662323Z 	            ORDER BY file_name ASC
2025-01-31T13:33:04.407668450Z 	        
2025-01-31T13:33:20.639489168Z 2025-01-31 13:33:20.639 UTC [546] ERROR:  database "temporal" already exists
2025-01-31T13:33:20.639523772Z 2025-01-31 13:33:20.639 UTC [546] STATEMENT:  CREATE DATABASE temporal
2025-01-31T13:33:20.732340462Z 2025-01-31 13:33:20.732 UTC [549] ERROR:  database "temporal_visibility" already exists
2025-01-31T13:33:20.732388615Z 2025-01-31 13:33:20.732 UTC [549] STATEMENT:  CREATE DATABASE temporal_visibility
2025-01-31T13:33:25.730993568Z 2025-01-31 13:33:25.730 UTC [568] ERROR:  relation "posthog_pluginattachment" does not exist at character 95
2025-01-31T13:33:25.731028525Z 2025-01-31 13:33:25.730 UTC [568] STATEMENT:  /* plugin-server:COMMON_WRITE<fetchGeoIpAttachment> */ 
2025-01-31T13:33:25.731034087Z 	            SELECT *
2025-01-31T13:33:25.731037853Z 	            FROM posthog_pluginattachment
2025-01-31T13:33:25.731041380Z 	            WHERE key = $1
2025-01-31T13:33:25.731046048Z 	              AND plugin_config_id IS NULL
2025-01-31T13:33:25.731052602Z 	              AND team_id IS NULL
2025-01-31T13:33:25.731059230Z 	            ORDER BY file_name ASC
2025-01-31T13:33:25.731063051Z 	        

Temporal

2025-01-31T13:34:21.506111312Z Unable to create dynamic config client. Error: unable to read dynamic config: dynamic config file: config/dynamicconfig/development-sql.yaml: open config/dynamicconfig/development-sql.yaml: permission denied

Flower

2025-01-31T13:31:26.494092304Z [W 250131 13:31:26 inspector:44] Inspect method reserved failed
2025-01-31T13:31:26.494806310Z [W 250131 13:31:26 inspector:44] Inspect method stats failed
2025-01-31T13:31:26.495852677Z [W 250131 13:31:26 inspector:44] Inspect method revoked failed
2025-01-31T13:31:26.496208591Z [W 250131 13:31:26 inspector:44] Inspect method active failed
2025-01-31T13:31:26.498736676Z [W 250131 13:31:26 inspector:44] Inspect method active_queues failed
2025-01-31T13:31:26.501449816Z [W 250131 13:31:26 inspector:44] Inspect method scheduled failed
2025-01-31T13:31:26.501927621Z [W 250131 13:31:26 inspector:44] Inspect method registered failed
2025-01-31T13:31:26.514646491Z [W 250131 13:31:26 inspector:44] Inspect method conf failed

Not fatal, but:

Object Storage

2025-01-31T13:31:25.172065808Z  You are running an older version of MinIO released 2 years ago 

Bilge avatar Jan 31 '25 13:01 Bilge

For me it says posthof db not found ...

l4b4r4b4b4 avatar Feb 04 '25 15:02 l4b4r4b4b4

Fun thing.. Mine was partially "working" for months (no recordings tho), then I decided to "Pull latest images and Restart" and now I'm part of this thread.

luisjoserivera avatar Feb 10 '25 11:02 luisjoserivera

im also running into this issue with the DB not being found, i tried modifying the images to an different image version with no success

0pilatos0 avatar Feb 13 '25 20:02 0pilatos0

Has anyone managed to get around the situation by changing docker compose or something? I'm stuck here trying to get it to work too, without success.

sync-adm avatar Feb 19 '25 13:02 sync-adm

Has anyone managed to get around the situation by changing docker compose or something? I'm stuck here trying to get it to work too, without success.

Nope :/ @peaklabs-dev do you have any idea?

wottpal avatar Feb 20 '25 08:02 wottpal

Found this web migration failed ... DB::Exception: Requested cluster 'posthog_migrations' not found. Stack trace: ...

Lodimup avatar Feb 22 '25 15:02 Lodimup

adding - CLICKHOUSE_MIGRATIONS_CLUSTER=posthog to web allows the progress to proceed but still fail at

2025-02-22T15:43:40.070532920Z clickhouse_driver.errors.ServerException: Code: 139. 2025-02-22T15:43:40.070534800Z DB::Exception: No macro hostClusterType in config: While processing host_address, port, shard_num, replica_num, getMacro('hostClusterType') AS host_cluster_type, getMacro('hostClusterRole') AS host_cluster_role. Stack trace: 2025-02-22T15:43:40.070537280Z

Lodimup avatar Feb 22 '25 15:02 Lodimup

Any update on this ?

romainds-tech avatar Mar 17 '25 20:03 romainds-tech

So I managed to make it worked by modyfing config map chi-posthog-deploy-confd-posthog-0-0 - data.chop-generated-macros.xml property:

<macros>
    <!-- ... other macros ... -->

    <hostClusterType>online</hostClusterType>
    <hostClusterRole>data</hostClusterRole> <!-- this also can be set to coordinator when using coordinator instance -->
</macros>

Keep in mind this will affect how migrations will apply, so you need to add those macros before migration.

If you're using docker compose you need to add/modify configuration located on /etc/clickhouse-server/config.d/*.xml of your clickhouse instance

let me know if that helps

Aviuz avatar Mar 18 '25 13:03 Aviuz

snot working for me either. setup a valide FQDN, updated docker-compose file to include SERVICE_FQDN_WEB rather then SERVICE_FQDN_WEB_8000` didn't work. it still unhealthy. I 've logged in inside the container and made curl localhost:8000, didn't respond with anything I somehow can see something going on, like requests are terminating in the posthug web when trying to access from inside the container but nothing happen when you access via fqdn.

2024-11-12T21:40:50.160662Z [info     ] request_started                [django_structlog.middlewares.request] container_hostname=6fee42600749 host=172.24.0.11:8000 ip=172.24.0.1 pid=237 request=<WSGIRequest: GET '/'> request_id=c9afeb19-bb90-471b-af1b-fa3ca2fad204 tid=140346526570816 user_agent=curl/7.88.1 x_forwarded_for=
2024-11-12T21:40:50.400021Z [info     ] request_finished               [django_structlog.middlewares.request] code=302 container_hostname=6fee42600749 host=172.24.0.11:8000 ip=172.24.0.1 pid=237 request=<WSGIRequest: GET '/'> request_id=c9afeb19-bb90-471b-af1b-fa3ca2fad204 tid=140346526570816 user_id=None x_forwarded_for=

Finally got it to work! Enable a large swap Change SERVICE_FQDN_WEB_8000 to SERVICE_FQDN_WEB After starting posthog, give it a few minutes to boot up

enabled 4GB swap aswell removed :8000 from the url. Still buggy as hell

julianlangweb avatar Aug 29 '25 17:08 julianlangweb

What's the latest working template version ?

KaKi87 avatar Oct 06 '25 23:10 KaKi87

It seems the entire service has just been removed now.

Bilge avatar Oct 25 '25 00:10 Bilge

@arthur-crahe Hi do you have any update or position regarding the system update related to the posthog inside Coolify? Likewise, https://www.getlago.com/ isn’t working either — all my installation attempts have failed.

SauloSA avatar Nov 07 '25 15:11 SauloSA

Hey folks 👋 Just wanted to check if there’s any plan to fix this, or an ETA on when PostHog will be usable again through Coolify. I understand these things take time, but it’d be great to know if it’s on the "doing" roadmap, still in the backlog, or in the "someday we will look into it" category. Thanks a lot for the hard work! 🙏

oaris-dev avatar Nov 10 '25 13:11 oaris-dev

As far as I know there is no ETA, I even think the core developers even gave up on it after attempting it a couple of times without success. Atm they are also busy with more important things such as fixing bugs and Coolify v5.

Pull request are however always welcome if anyone else wants to fix it. Adding a bounty to this issue is also always an option.

Cinzya avatar Nov 10 '25 13:11 Cinzya