Shiori Docker with Postgresql database, on Ubuntu Server 19.10.
My compose:
shiori:
image: radhifadlillah/shiori
container_name: shiori
depends_on:
- shioridb
restart: unless-stopped
ports:
- "8989:8080"
volumes:
- ${USERDIR}/docker/shiori:~/.local/share/shiori
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
# - SHIORI_DIR=${USERDIR}/docker/shiori
- SHIORI_DBMS=postgresql
- SHIORI_PG_USER=shiori
- SHIORI_PG_PASS=shioripass
- SHIORI_PG_NAME=shioridb
- SHIORI_PG_HOST=shioridb
- SHIORI_PG_PORT=5432
shioridb:
image: postgres:12-alpine
container_name: shioridb
restart: always
environment:
- POSTGRES_USER=shiori
- POSTGRES_PASSWORD=shioripass
- POSTGRES_DB=shioridb
volumes:
- ${USERDIR}/docker/shiori/db:/var/lib/postgresql/data
It was working fine at first but now, while trying to add bookmarks through gui I'm getting this error:
failed to save bookmark: pq: current transaction is aborted, commands ignored until end of transaction block (500)
I'm also seeing this in the shioridb logs:
2019-11-22 12:52:27.773 UTC [589] ERROR: insert or update on table "bookmark_tag" violates foreign key constraint "bookmark_tag_bookmark_id_fk"
2019-11-22 12:52:27.773 UTC [589] DETAIL: Key (bookmark_id)=(5) is not present in table "bookmark".
2019-11-22 12:52:27.773 UTC [589] STATEMENT: INSERT INTO bookmark_tag
(tag_id, bookmark_id) VALUES ($1, $2) ON CONFLICT DO NOTHING
2019-11-22 13:15:00.325 UTC [589] ERROR: insert or update on table "bookmark_tag" violates foreign key constraint "bookmark_tag_bookmark_id_fk"
2019-11-22 13:15:00.325 UTC [589] DETAIL: Key (bookmark_id)=(15) is not present in table "bookmark".
2019-11-22 13:15:00.325 UTC [589] STATEMENT: INSERT INTO bookmark_tag
(tag_id, bookmark_id) VALUES ($1, $2) ON CONFLICT DO NOTHING
2019-11-22 13:15:00.326 UTC [589] ERROR: current transaction is aborted, commands ignored until end of transaction block
2019-11-22 13:15:00.326 UTC [589] STATEMENT: SELECT id FROM tag WHERE name = $1
2019-11-22 13:17:25.315 UTC [589] ERROR: insert or update on table "bookmark_tag" violates foreign key constraint "bookmark_tag_bookmark_id_fk"
2019-11-22 13:17:25.315 UTC [589] DETAIL: Key (bookmark_id)=(22) is not present in table "bookmark".
2019-11-22 13:17:25.315 UTC [589] STATEMENT: INSERT INTO bookmark_tag
(tag_id, bookmark_id) VALUES ($1, $2) ON CONFLICT DO NOTHING
2019-11-22 13:17:25.316 UTC [589] ERROR: current transaction is aborted, commands ignored until end of transaction block
2019-11-22 13:17:25.316 UTC [589] STATEMENT: SELECT id FROM tag WHERE name = $1
2019-11-22 13:18:19.518 UTC [589] ERROR: insert or update on table "bookmark_tag" violates foreign key constraint "bookmark_tag_bookmark_id_fk"
2019-11-22 13:18:19.518 UTC [589] DETAIL: Key (bookmark_id)=(23) is not present in table "bookmark".
2019-11-22 13:18:19.518 UTC [589] STATEMENT: INSERT INTO bookmark_tag
(tag_id, bookmark_id) VALUES ($1, $2) ON CONFLICT DO NOTHING
2019-11-22 13:18:19.519 UTC [589] ERROR: current transaction is aborted, commands ignored until end of transaction block
2019-11-22 13:18:19.519 UTC [589] STATEMENT: SELECT id FROM tag WHERE name = $1
2019-11-22 13:19:51.411 UTC [589] ERROR: insert or update on table "bookmark_tag" violates foreign key constraint "bookmark_tag_bookmark_id_fk"
2019-11-22 13:19:51.411 UTC [589] DETAIL: Key (bookmark_id)=(24) is not present in table "bookmark".
2019-11-22 13:19:51.411 UTC [589] STATEMENT: INSERT INTO bookmark_tag
(tag_id, bookmark_id) VALUES ($1, $2) ON CONFLICT DO NOTHING
2019-11-22 13:19:51.412 UTC [589] ERROR: current transaction is aborted, commands ignored until end of transaction block
2019-11-22 13:19:51.412 UTC [589] STATEMENT: SELECT id FROM tag WHERE name = $1
What am I doing wrong?
type:bug component:backend database:sqlite