Hi there,
we have a similar problem:
root@otrs5:/opt/otrs/var/log# cat otrs.log
[Tue Dec 5 14:35:23 2017][Error][Kernel::System::Ticket::Article::Backend::Base::_MetaArticleCreate][367] ERROR: duplicate key value violates unique constraint "article_pkey1"
DETAIL: Key (id)=(1) already exists., SQL: 'INSERT INTO article
(ticket_id, article_sender_type_id, is_visible_for_customer, communication_channel_id, insert_fingerprint, create_time, create_by, change_time, change_by)
VALUES (?, ?, ?, ?, ?, '2017-12-05 14:35:23', ?, '2017-12-05 14:35:23', ?)'
[Tue Dec 5 14:35:23 2017][Error][Kernel::System::Ticket::Article::Backend::MIMEBase::ArticleCreate][343] Can't create meta article (TicketID=2338)!
root@otrs5:/opt/otrs/var/log# cat otrs.log
[Tue Dec 5 14:35:23 2017][Error][Kernel::System::Ticket::Article::Backend::Base::_MetaArticleCreate][367] ERROR: duplicate key value violates unique constraint "article_pkey1"
DETAIL: Key (id)=(1) already exists., SQL: 'INSERT INTO article
(ticket_id, article_sender_type_id, is_visible_for_customer, communication_channel_id, insert_fingerprint, create_time, create_by, change_time, change_by)
VALUES (?, ?, ?, ?, ?, '2017-12-05 14:35:23', ?, '2017-12-05 14:35:23', ?)'
[Tue Dec 5 14:35:23 2017][Error][Kernel::System::Ticket::Article::Backend::MIMEBase::ArticleCreate][343] Can't create meta article (TicketID=2338)!
[Tue Dec 5 15:08:17 2017][Error][Kernel::System::Ticket::Article::Backend::Base::_MetaArticleCreate][367] ERROR: duplicate key value violates unique constraint "article_pkey1"
DETAIL: Key (id)=(2) already exists., SQL: 'INSERT INTO article
(ticket_id, article_sender_type_id, is_visible_for_customer, communication_channel_id, insert_fingerprint, create_time, create_by, change_time, change_by)
VALUES (?, ?, ?, ?, ?, '2017-12-05 15:08:17', ?, '2017-12-05 15:08:17', ?)'
[Tue Dec 5 15:08:17 2017][Error][Kernel::System::Ticket::Article::Backend::MIMEBase::ArticleCreate][343] Can't create meta article (TicketID=3318)!
Output \d article:
Table "public.article"
Column | Type | Modifiers
----------------------------+--------------------------------+-------------------------------------------------------
id | bigint | not null default nextval('article_id_seq1'::regclass)
ticket_id | bigint | not null
article_sender_type_id | smallint | not null
communication_channel_id | bigint | not null
is_visible_for_customer | smallint | not null
search_index_needs_rebuild | smallint | not null default 1
insert_fingerprint | character varying(64) |
create_time | timestamp(0) without time zone | not null
create_by | integer | not null
change_time | timestamp(0) without time zone | not null
change_by | integer | not null
Indexes:
"article_pkey1" PRIMARY KEY, btree (id)
"article_article_sender_type_id" btree (article_sender_type_id)
"article_communication_channel_id" btree (communication_channel_id)
"article_search_index_needs_rebuild" btree (search_index_needs_rebuild)
"article_ticket_id" btree (ticket_id)
Foreign-key constraints:
"fk_article_article_sender_type_id_id" FOREIGN KEY (article_sender_type_id) REFERENCES article_sender_type(id)
"fk_article_change_by_id" FOREIGN KEY (change_by) REFERENCES users(id)
"fk_article_communication_channel_id_id" FOREIGN KEY (communication_channel_id) REFERENCES communication_channel(id)
"fk_article_create_by_id" FOREIGN KEY (create_by) REFERENCES users(id)
"fk_article_ticket_id_id" FOREIGN KEY (ticket_id) REFERENCES ticket(id)
Referenced by:
TABLE "article_data_mime" CONSTRAINT "fk_article_data_mime_article_id_id" FOREIGN KEY (article_id) REFERENCES article(id)
TABLE "article_data_mime_attachment" CONSTRAINT "fk_article_data_mime_attachment_article_id_id" FOREIGN KEY (article_id) REFERENCES article(id)
TABLE "article_data_mime_plain" CONSTRAINT "fk_article_data_mime_plain_article_id_id" FOREIGN KEY (article_id) REFERENCES article(id)
TABLE "article_data_mime_send_error" CONSTRAINT "fk_article_data_mime_send_error_article_id_id" FOREIGN KEY (article_id) REFERENCES article(id)
TABLE "article_data_otrs_chat" CONSTRAINT "fk_article_data_otrs_chat_article_id_id" FOREIGN KEY (article_id) REFERENCES article(id)
TABLE "article_flag" CONSTRAINT "fk_article_flag_article_id_id" FOREIGN KEY (article_id) REFERENCES article(id)
TABLE "article_search_index" CONSTRAINT "fk_article_search_index_article_id_id" FOREIGN KEY (article_id) REFERENCES article(id)
TABLE "mail_queue" CONSTRAINT "fk_mail_queue_article_id_id" FOREIGN KEY (article_id) REFERENCES article(id)
TABLE "ticket_history" CONSTRAINT "fk_ticket_history_article_id_id" FOREIGN KEY (article_id) REFERENCES article(id)
TABLE "time_accounting" CONSTRAINT "fk_time_accounting_article_id_id" FOREIGN KEY (article_id) REFERENCES article(id)
Output SELECT...:
otrs2=> SELECT c.relname FROM pg_class c WHERE c.relkind = 'S' and c.relname like 'article%';
relname
-------------------------------------
article_attachment_id_seq
article_id_seq
article_search_index_id_seq
article_plain_id_seq
article_sender_type_id_seq
article_id_seq1
article_data_mime_send_error_id_seq
article_data_otrs_chat_id_seq
(8 rows)
Hope you can help