error when db create and db migrate is run multiple times #6

Open
opened 2023-11-11 12:24:06 +00:00 by p4u1 · 2 comments
Member

The command is set as sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run". This throws an error, when the database was already created or migrated. In the official documentation it says at least for db createdb should not be run multiple times.

The command is set as `sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run"`. This throws an error, when the database was already created or migrated. In [the official documentation](https://plausible.io/docs/self-hosting#3-external-databases) it says at least for `db createdb` should not be run multiple times.
Owner

thanks for the report @p4u1 ! what error do you get? we've been running this recipe in production for a while and so far the only issue we've hit has been that migrations sometimes aren't run completely, requiring manual database changes.

thanks for the report @p4u1 ! what error do you get? we've been running this recipe in production for a while and so far the only issue we've hit has been that migrations sometimes aren't run completely, requiring manual database changes.
Author
Member

Maybe, our plausible instance is somehow messed up. I get those errors on startup and the container aborts afterwards:

32023-11-12T16:06:35.421093373Z Loading plausible..
72023-11-12T16:06:35.432821139Z Starting dependencies..
02023-11-12T16:06:35.561241329Z Starting repos..
R2023-11-12T16:06:35.643459016Z create Plausible.Repo database if it doesn't exist
X2023-11-12T16:06:35.741941966Z create Plausible.IngestRepo database if it doesn't exist
�2023-11-12T16:06:35.757921510Z 2023.11.12 16:06:35.757492 [ 56 ] {406bf4c4-04fe-4fef-a228-5792505214a3} <Error> executeQuery: Code: 82. DB::Exception: Database plausible_events_db alr
eady exists. (DATABASE_ALREADY_EXISTS) (version 23.4.2.11 (official build)) (from 10.0.2.4:52938) (in query: CREATE DATABASE "plausible_events_db"), Stack trace (when copying this mess
age, always include the lines below):
 2023-11-12T16:06:35.757949750Z 
�2023-11-12T16:06:35.757953510Z 0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0xbc87ee4 in /usr/bin/clickhouse
G2023-11-12T16:06:35.757956910Z 1. ? @ 0x81dc1b0 in /usr/bin/clickhouse
�2023-11-12T16:06:35.757959630Z 2. DB::InterpreterCreateQuery::createDatabase(DB::ASTCreateQuery&) @ 0x104a441c in /usr/bin/clickhouse
l2023-11-12T16:06:35.757962510Z 3. DB::InterpreterCreateQuery::execute() @ 0x104bd1d8 in /usr/bin/clickhouse
H2023-11-12T16:06:35.757965510Z 4. ? @ 0x1097d198 in /usr/bin/clickhouse
�2023-11-12T16:06:35.757976750Z 5. DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, std::shared_ptr<DB::Context>, std::function<void (DB::QueryResultDetails const&)>, std::opt
ional<DB::FormatSettings> const&) @ 0x10981890 in /usr/bin/clickhouse
�2023-11-12T16:06:35.757981110Z 6. DB::HTTPHandler::processQuery(DB::HTTPServerRequest&, DB::HTMLForm&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&, std::optional<DB::CurrentThre
ad::QueryScope>&) @ 0x114e91ac in /usr/bin/clickhouse
�2023-11-12T16:06:35.757984590Z 7. DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0x114ec824 in /usr/bin/clickhouse
f2023-11-12T16:06:35.757987470Z 8. DB::HTTPServerConnection::run() @ 0x1154c908 in /usr/bin/clickhouse
n2023-11-12T16:06:35.757990350Z 9. Poco::Net::TCPServerConnection::start() @ 0x121b0604 in /usr/bin/clickhouse
m2023-11-12T16:06:35.757993030Z 10. Poco::Net::TCPServerDispatcher::run() @ 0x121b1b20 in /usr/bin/clickhouse
a2023-11-12T16:06:35.757995710Z 11. Poco::PooledThread::run() @ 0x1235ac7c in /usr/bin/clickhouse
n2023-11-12T16:06:35.757998510Z 12. Poco::ThreadImpl::runnableEntry(void*) @ 0x12358544 in /usr/bin/clickhouse
Q2023-11-12T16:06:35.758001190Z 13. start_thread @ 0x7624 in /lib/libpthread.so.0
A2023-11-12T16:06:35.758003830Z 14. ? @ 0xd149c in /lib/libc.so.6
 2023-11-12T16:06:35.758006390Z 
/2023-11-12T16:06:35.758008870Z 2023.11.12 16:06:35.757670 [ 56 ] {406bf4c4-04fe-4fef-a228-5792505214a3} <Error> DynamicQueryHandler: Code: 82. DB::Exception: Database plausible_events
_db already exists. (DATABASE_ALREADY_EXISTS), Stack trace (when copying this message, always include the lines below):
 2023-11-12T16:06:35.758012310Z 
�2023-11-12T16:06:35.758015670Z 0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0xbc87ee4 in /usr/bin/clickhouse
G2023-11-12T16:06:35.758018630Z 1. ? @ 0x81dc1b0 in /usr/bin/clickhouse
�2023-11-12T16:06:35.758021390Z 2. DB::InterpreterCreateQuery::createDatabase(DB::ASTCreateQuery&) @ 0x104a441c in /usr/bin/clickhouse
l2023-11-12T16:06:35.758024270Z 3. DB::InterpreterCreateQuery::execute() @ 0x104bd1d8 in /usr/bin/clickhouse
H2023-11-12T16:06:35.758026950Z 4. ? @ 0x1097d198 in /usr/bin/clickhouse
�2023-11-12T16:06:35.758029590Z 5. DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, std::shared_ptr<DB::Context>, std::function<void (DB::QueryResultDetails const&)>, std::opt
ional<DB::FormatSettings> const&) @ 0x10981890 in /usr/bin/clickhouse
�2023-11-12T16:06:35.758033110Z 6. DB::HTTPHandler::processQuery(DB::HTTPServerRequest&, DB::HTMLForm&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&, std::optional<DB::CurrentThre
ad::QueryScope>&) @ 0x114e91ac in /usr/bin/clickhouse
�2023-11-12T16:06:35.758036670Z 7. DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0x114ec824 in /usr/bin/clickhouse
f2023-11-12T16:06:35.758039670Z 8. DB::HTTPServerConnection::run() @ 0x1154c908 in /usr/bin/clickhouse
n2023-11-12T16:06:35.758042310Z 9. Poco::Net::TCPServerConnection::start() @ 0x121b0604 in /usr/bin/clickhouse
m2023-11-12T16:06:35.758047790Z 10. Poco::Net::TCPServerDispatcher::run() @ 0x121b1b20 in /usr/bin/clickhouse
a2023-11-12T16:06:35.758050630Z 11. Poco::PooledThread::run() @ 0x1235ac7c in /usr/bin/clickhouse
n2023-11-12T16:06:35.758053270Z 12. Poco::ThreadImpl::runnableEntry(void*) @ 0x12358544 in /usr/bin/clickhouse
Q2023-11-12T16:06:35.758055950Z 13. start_thread @ 0x7624 in /lib/libpthread.so.0
A2023-11-12T16:06:35.758058510Z 14. ? @ 0xd149c in /lib/libc.so.6
E2023-11-12T16:06:35.758061030Z  (version 23.4.2.11 (official build))
:2023-11-12T16:06:35.763360011Z Creation of Db successful!
32023-11-12T16:06:36.311172786Z Loading plausible..
72023-11-12T16:06:36.323521435Z Starting dependencies..
02023-11-12T16:06:36.447556567Z Starting repos..
L2023-11-12T16:06:36.520619457Z Running migrations for Elixir.Plausible.Repo
R2023-11-12T16:06:36.661674777Z Running migrations for Elixir.Plausible.IngestRepo
�2023-11-12T16:06:37.228720788Z 2023.11.12 16:06:37.228536 [ 57 ] {2172b8eb-8eea-4df7-b700-5c6a4a422b5a} <Error> executeQuery: Code: 15. DB::Exception: Cannot add column `utm_medium`: 
column with this name already exists. (DUPLICATE_COLUMN) (version 23.4.2.11 (official build)) (from 10.0.2.4:52944) (in query: ALTER TABLE "events" ADD COLUMN "utm_medium" String), Sta
ck trace (when copying this message, always include the lines below):
 2023-11-12T16:06:37.228766229Z 
�2023-11-12T16:06:37.228774469Z 0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0xbc87ee4 in /usr/bin/clickhouse
G2023-11-12T16:06:37.228780389Z 1. ? @ 0x7e7cc90 in /usr/bin/clickhouse
�2023-11-12T16:06:37.228785149Z 2. DB::AlterCommands::validate(std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::Context const>) const @ 0x10bf625c in /usr/bin/clickhouse
�2023-11-12T16:06:37.228790989Z 3. DB::InterpreterAlterQuery::executeToTable(DB::ASTAlterQuery const&) @ 0x10533110 in /usr/bin/clickhouse
H2023-11-12T16:06:37.228796229Z 4. ? @ 0x1097d198 in /usr/bin/clickhouse
�2023-11-12T16:06:37.228800829Z 5. DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, std::shared_ptr<DB::Context>, std::function<void (DB::QueryResultDetails const&)>, std::opt
ional<DB::FormatSettings> const&) @ 0x10981890 in /usr/bin/clickhouse
�2023-11-12T16:06:37.228807389Z 6. DB::HTTPHandler::processQuery(DB::HTTPServerRequest&, DB::HTMLForm&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&, std::optional<DB::CurrentThre
ad::QueryScope>&) @ 0x114e91ac in /usr/bin/clickhouse
�2023-11-12T16:06:37.228813669Z 7. DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0x114ec824 in /usr/bin/clickhouse
f2023-11-12T16:06:37.228822869Z 8. DB::HTTPServerConnection::run() @ 0x1154c908 in /usr/bin/clickhouse
n2023-11-12T16:06:37.228828029Z 9. Poco::Net::TCPServerConnection::start() @ 0x121b0604 in /usr/bin/clickhouse
m2023-11-12T16:06:37.228833469Z 10. Poco::Net::TCPServerDispatcher::run() @ 0x121b1b20 in /usr/bin/clickhouse
a2023-11-12T16:06:37.228838909Z 11. Poco::PooledThread::run() @ 0x1235ac7c in /usr/bin/clickhouse
n2023-11-12T16:06:37.228843749Z 12. Poco::ThreadImpl::runnableEntry(void*) @ 0x12358544 in /usr/bin/clickhouse
Q2023-11-12T16:06:37.228848709Z 13. start_thread @ 0x7624 in /lib/libpthread.so.0
A2023-11-12T16:06:37.228853469Z 14. ? @ 0xd149c in /lib/libc.so.6
 2023-11-12T16:06:37.228858029Z 
A2023-11-12T16:06:37.228910709Z 2023.11.12 16:06:37.228811 [ 57 ] {2172b8eb-8eea-4df7-b700-5c6a4a422b5a} <Error> DynamicQueryHandler: Code: 15. DB::Exception: Cannot add column `utm_me
dium`: column with this name already exists. (DUPLICATE_COLUMN), Stack trace (when copying this message, always include the lines below):
 2023-11-12T16:06:37.228934789Z 
�2023-11-12T16:06:37.228950789Z 0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0xbc87ee4 in /usr/bin/clickhouse
G2023-11-12T16:06:37.228956669Z 1. ? @ 0x7e7cc90 in /usr/bin/clickhouse
�2023-11-12T16:06:37.228960589Z 2. DB::AlterCommands::validate(std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::Context const>) const @ 0x10bf625c in /usr/bin/clickhouse
�2023-11-12T16:06:37.228965109Z 3. DB::InterpreterAlterQuery::executeToTable(DB::ASTAlterQuery const&) @ 0x10533110 in /usr/bin/clickhouse
H2023-11-12T16:06:37.228969069Z 4. ? @ 0x1097d198 in /usr/bin/clickhouse
�2023-11-12T16:06:37.228972669Z 5. DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, std::shared_ptr<DB::Context>, std::function<void (DB::QueryResultDetails const&)>, std::opt
ional<DB::FormatSettings> const&) @ 0x10981890 in /usr/bin/clickhouse
�2023-11-12T16:06:37.228977629Z 6. DB::HTTPHandler::processQuery(DB::HTTPServerRequest&, DB::HTMLForm&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&, std::optional<DB::CurrentThre
ad::QueryScope>&) @ 0x114e91ac in /usr/bin/clickhouse
�2023-11-12T16:06:37.228982309Z 7. DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0x114ec824 in /usr/bin/clickhouse
f2023-11-12T16:06:37.228986310Z 8. DB::HTTPServerConnection::run() @ 0x1154c908 in /usr/bin/clickhouse
n2023-11-12T16:06:37.228990110Z 9. Poco::Net::TCPServerConnection::start() @ 0x121b0604 in /usr/bin/clickhouse
m2023-11-12T16:06:37.228993870Z 10. Poco::Net::TCPServerDispatcher::run() @ 0x121b1b20 in /usr/bin/clickhouse
a2023-11-12T16:06:37.228997590Z 11. Poco::PooledThread::run() @ 0x1235ac7c in /usr/bin/clickhouse
n2023-11-12T16:06:37.229001270Z 12. Poco::ThreadImpl::runnableEntry(void*) @ 0x12358544 in /usr/bin/clickhouse
Q2023-11-12T16:06:37.229005110Z 13. start_thread @ 0x7624 in /lib/libpthread.so.0
A2023-11-12T16:06:37.229009670Z 14. ? @ 0xd149c in /lib/libc.so.6
E2023-11-12T16:06:37.229013230Z  (version 23.4.2.11 (official build))
�2023-11-12T16:06:37.235525295Z ** (Ch.Error) Code: 15. DB::Exception: Cannot add column `utm_medium`: column with this name already exists. (DUPLICATE_COLUMN) (version 23.4.2.11 (offi
cial build))
 2023-11-12T16:06:37.235573136Z 
{2023-11-12T16:06:37.235583136Z     (ecto_sql 3.9.2) lib/ecto/adapters/sql.ex:913: Ecto.Adapters.SQL.raise_sql_call_error/1
d2023-11-12T16:06:37.235592016Z     (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
Maybe, our plausible instance is somehow messed up. I get those errors on startup and the container aborts afterwards: ``` 32023-11-12T16:06:35.421093373Z Loading plausible.. 72023-11-12T16:06:35.432821139Z Starting dependencies.. 02023-11-12T16:06:35.561241329Z Starting repos.. R2023-11-12T16:06:35.643459016Z create Plausible.Repo database if it doesn't exist X2023-11-12T16:06:35.741941966Z create Plausible.IngestRepo database if it doesn't exist �2023-11-12T16:06:35.757921510Z 2023.11.12 16:06:35.757492 [ 56 ] {406bf4c4-04fe-4fef-a228-5792505214a3} <Error> executeQuery: Code: 82. DB::Exception: Database plausible_events_db alr eady exists. (DATABASE_ALREADY_EXISTS) (version 23.4.2.11 (official build)) (from 10.0.2.4:52938) (in query: CREATE DATABASE "plausible_events_db"), Stack trace (when copying this mess age, always include the lines below): 2023-11-12T16:06:35.757949750Z �2023-11-12T16:06:35.757953510Z 0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0xbc87ee4 in /usr/bin/clickhouse G2023-11-12T16:06:35.757956910Z 1. ? @ 0x81dc1b0 in /usr/bin/clickhouse �2023-11-12T16:06:35.757959630Z 2. DB::InterpreterCreateQuery::createDatabase(DB::ASTCreateQuery&) @ 0x104a441c in /usr/bin/clickhouse l2023-11-12T16:06:35.757962510Z 3. DB::InterpreterCreateQuery::execute() @ 0x104bd1d8 in /usr/bin/clickhouse H2023-11-12T16:06:35.757965510Z 4. ? @ 0x1097d198 in /usr/bin/clickhouse �2023-11-12T16:06:35.757976750Z 5. DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, std::shared_ptr<DB::Context>, std::function<void (DB::QueryResultDetails const&)>, std::opt ional<DB::FormatSettings> const&) @ 0x10981890 in /usr/bin/clickhouse �2023-11-12T16:06:35.757981110Z 6. DB::HTTPHandler::processQuery(DB::HTTPServerRequest&, DB::HTMLForm&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&, std::optional<DB::CurrentThre ad::QueryScope>&) @ 0x114e91ac in /usr/bin/clickhouse �2023-11-12T16:06:35.757984590Z 7. DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0x114ec824 in /usr/bin/clickhouse f2023-11-12T16:06:35.757987470Z 8. DB::HTTPServerConnection::run() @ 0x1154c908 in /usr/bin/clickhouse n2023-11-12T16:06:35.757990350Z 9. Poco::Net::TCPServerConnection::start() @ 0x121b0604 in /usr/bin/clickhouse m2023-11-12T16:06:35.757993030Z 10. Poco::Net::TCPServerDispatcher::run() @ 0x121b1b20 in /usr/bin/clickhouse a2023-11-12T16:06:35.757995710Z 11. Poco::PooledThread::run() @ 0x1235ac7c in /usr/bin/clickhouse n2023-11-12T16:06:35.757998510Z 12. Poco::ThreadImpl::runnableEntry(void*) @ 0x12358544 in /usr/bin/clickhouse Q2023-11-12T16:06:35.758001190Z 13. start_thread @ 0x7624 in /lib/libpthread.so.0 A2023-11-12T16:06:35.758003830Z 14. ? @ 0xd149c in /lib/libc.so.6 2023-11-12T16:06:35.758006390Z /2023-11-12T16:06:35.758008870Z 2023.11.12 16:06:35.757670 [ 56 ] {406bf4c4-04fe-4fef-a228-5792505214a3} <Error> DynamicQueryHandler: Code: 82. DB::Exception: Database plausible_events _db already exists. (DATABASE_ALREADY_EXISTS), Stack trace (when copying this message, always include the lines below): 2023-11-12T16:06:35.758012310Z �2023-11-12T16:06:35.758015670Z 0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0xbc87ee4 in /usr/bin/clickhouse G2023-11-12T16:06:35.758018630Z 1. ? @ 0x81dc1b0 in /usr/bin/clickhouse �2023-11-12T16:06:35.758021390Z 2. DB::InterpreterCreateQuery::createDatabase(DB::ASTCreateQuery&) @ 0x104a441c in /usr/bin/clickhouse l2023-11-12T16:06:35.758024270Z 3. DB::InterpreterCreateQuery::execute() @ 0x104bd1d8 in /usr/bin/clickhouse H2023-11-12T16:06:35.758026950Z 4. ? @ 0x1097d198 in /usr/bin/clickhouse �2023-11-12T16:06:35.758029590Z 5. DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, std::shared_ptr<DB::Context>, std::function<void (DB::QueryResultDetails const&)>, std::opt ional<DB::FormatSettings> const&) @ 0x10981890 in /usr/bin/clickhouse �2023-11-12T16:06:35.758033110Z 6. DB::HTTPHandler::processQuery(DB::HTTPServerRequest&, DB::HTMLForm&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&, std::optional<DB::CurrentThre ad::QueryScope>&) @ 0x114e91ac in /usr/bin/clickhouse �2023-11-12T16:06:35.758036670Z 7. DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0x114ec824 in /usr/bin/clickhouse f2023-11-12T16:06:35.758039670Z 8. DB::HTTPServerConnection::run() @ 0x1154c908 in /usr/bin/clickhouse n2023-11-12T16:06:35.758042310Z 9. Poco::Net::TCPServerConnection::start() @ 0x121b0604 in /usr/bin/clickhouse m2023-11-12T16:06:35.758047790Z 10. Poco::Net::TCPServerDispatcher::run() @ 0x121b1b20 in /usr/bin/clickhouse a2023-11-12T16:06:35.758050630Z 11. Poco::PooledThread::run() @ 0x1235ac7c in /usr/bin/clickhouse n2023-11-12T16:06:35.758053270Z 12. Poco::ThreadImpl::runnableEntry(void*) @ 0x12358544 in /usr/bin/clickhouse Q2023-11-12T16:06:35.758055950Z 13. start_thread @ 0x7624 in /lib/libpthread.so.0 A2023-11-12T16:06:35.758058510Z 14. ? @ 0xd149c in /lib/libc.so.6 E2023-11-12T16:06:35.758061030Z (version 23.4.2.11 (official build)) :2023-11-12T16:06:35.763360011Z Creation of Db successful! 32023-11-12T16:06:36.311172786Z Loading plausible.. 72023-11-12T16:06:36.323521435Z Starting dependencies.. 02023-11-12T16:06:36.447556567Z Starting repos.. L2023-11-12T16:06:36.520619457Z Running migrations for Elixir.Plausible.Repo R2023-11-12T16:06:36.661674777Z Running migrations for Elixir.Plausible.IngestRepo �2023-11-12T16:06:37.228720788Z 2023.11.12 16:06:37.228536 [ 57 ] {2172b8eb-8eea-4df7-b700-5c6a4a422b5a} <Error> executeQuery: Code: 15. DB::Exception: Cannot add column `utm_medium`: column with this name already exists. (DUPLICATE_COLUMN) (version 23.4.2.11 (official build)) (from 10.0.2.4:52944) (in query: ALTER TABLE "events" ADD COLUMN "utm_medium" String), Sta ck trace (when copying this message, always include the lines below): 2023-11-12T16:06:37.228766229Z �2023-11-12T16:06:37.228774469Z 0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0xbc87ee4 in /usr/bin/clickhouse G2023-11-12T16:06:37.228780389Z 1. ? @ 0x7e7cc90 in /usr/bin/clickhouse �2023-11-12T16:06:37.228785149Z 2. DB::AlterCommands::validate(std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::Context const>) const @ 0x10bf625c in /usr/bin/clickhouse �2023-11-12T16:06:37.228790989Z 3. DB::InterpreterAlterQuery::executeToTable(DB::ASTAlterQuery const&) @ 0x10533110 in /usr/bin/clickhouse H2023-11-12T16:06:37.228796229Z 4. ? @ 0x1097d198 in /usr/bin/clickhouse �2023-11-12T16:06:37.228800829Z 5. DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, std::shared_ptr<DB::Context>, std::function<void (DB::QueryResultDetails const&)>, std::opt ional<DB::FormatSettings> const&) @ 0x10981890 in /usr/bin/clickhouse �2023-11-12T16:06:37.228807389Z 6. DB::HTTPHandler::processQuery(DB::HTTPServerRequest&, DB::HTMLForm&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&, std::optional<DB::CurrentThre ad::QueryScope>&) @ 0x114e91ac in /usr/bin/clickhouse �2023-11-12T16:06:37.228813669Z 7. DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0x114ec824 in /usr/bin/clickhouse f2023-11-12T16:06:37.228822869Z 8. DB::HTTPServerConnection::run() @ 0x1154c908 in /usr/bin/clickhouse n2023-11-12T16:06:37.228828029Z 9. Poco::Net::TCPServerConnection::start() @ 0x121b0604 in /usr/bin/clickhouse m2023-11-12T16:06:37.228833469Z 10. Poco::Net::TCPServerDispatcher::run() @ 0x121b1b20 in /usr/bin/clickhouse a2023-11-12T16:06:37.228838909Z 11. Poco::PooledThread::run() @ 0x1235ac7c in /usr/bin/clickhouse n2023-11-12T16:06:37.228843749Z 12. Poco::ThreadImpl::runnableEntry(void*) @ 0x12358544 in /usr/bin/clickhouse Q2023-11-12T16:06:37.228848709Z 13. start_thread @ 0x7624 in /lib/libpthread.so.0 A2023-11-12T16:06:37.228853469Z 14. ? @ 0xd149c in /lib/libc.so.6 2023-11-12T16:06:37.228858029Z A2023-11-12T16:06:37.228910709Z 2023.11.12 16:06:37.228811 [ 57 ] {2172b8eb-8eea-4df7-b700-5c6a4a422b5a} <Error> DynamicQueryHandler: Code: 15. DB::Exception: Cannot add column `utm_me dium`: column with this name already exists. (DUPLICATE_COLUMN), Stack trace (when copying this message, always include the lines below): 2023-11-12T16:06:37.228934789Z �2023-11-12T16:06:37.228950789Z 0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0xbc87ee4 in /usr/bin/clickhouse G2023-11-12T16:06:37.228956669Z 1. ? @ 0x7e7cc90 in /usr/bin/clickhouse �2023-11-12T16:06:37.228960589Z 2. DB::AlterCommands::validate(std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::Context const>) const @ 0x10bf625c in /usr/bin/clickhouse �2023-11-12T16:06:37.228965109Z 3. DB::InterpreterAlterQuery::executeToTable(DB::ASTAlterQuery const&) @ 0x10533110 in /usr/bin/clickhouse H2023-11-12T16:06:37.228969069Z 4. ? @ 0x1097d198 in /usr/bin/clickhouse �2023-11-12T16:06:37.228972669Z 5. DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, std::shared_ptr<DB::Context>, std::function<void (DB::QueryResultDetails const&)>, std::opt ional<DB::FormatSettings> const&) @ 0x10981890 in /usr/bin/clickhouse �2023-11-12T16:06:37.228977629Z 6. DB::HTTPHandler::processQuery(DB::HTTPServerRequest&, DB::HTMLForm&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&, std::optional<DB::CurrentThre ad::QueryScope>&) @ 0x114e91ac in /usr/bin/clickhouse �2023-11-12T16:06:37.228982309Z 7. DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0x114ec824 in /usr/bin/clickhouse f2023-11-12T16:06:37.228986310Z 8. DB::HTTPServerConnection::run() @ 0x1154c908 in /usr/bin/clickhouse n2023-11-12T16:06:37.228990110Z 9. Poco::Net::TCPServerConnection::start() @ 0x121b0604 in /usr/bin/clickhouse m2023-11-12T16:06:37.228993870Z 10. Poco::Net::TCPServerDispatcher::run() @ 0x121b1b20 in /usr/bin/clickhouse a2023-11-12T16:06:37.228997590Z 11. Poco::PooledThread::run() @ 0x1235ac7c in /usr/bin/clickhouse n2023-11-12T16:06:37.229001270Z 12. Poco::ThreadImpl::runnableEntry(void*) @ 0x12358544 in /usr/bin/clickhouse Q2023-11-12T16:06:37.229005110Z 13. start_thread @ 0x7624 in /lib/libpthread.so.0 A2023-11-12T16:06:37.229009670Z 14. ? @ 0xd149c in /lib/libc.so.6 E2023-11-12T16:06:37.229013230Z (version 23.4.2.11 (official build)) �2023-11-12T16:06:37.235525295Z ** (Ch.Error) Code: 15. DB::Exception: Cannot add column `utm_medium`: column with this name already exists. (DUPLICATE_COLUMN) (version 23.4.2.11 (offi cial build)) 2023-11-12T16:06:37.235573136Z {2023-11-12T16:06:37.235583136Z (ecto_sql 3.9.2) lib/ecto/adapters/sql.ex:913: Ecto.Adapters.SQL.raise_sql_call_error/1 d2023-11-12T16:06:37.235592016Z (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2 ```
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/plausible#6
No description provided.