Browse Source

Updated post.

dev
Franco Masotti 8 months ago
parent
commit
f8359f6be7
Signed by: frnmst
GPG Key ID: 24116ED85666780A
  1. 60
      _posts/2021-09-13-problems-and-solutions-with-gitea-1-15.md

60
_posts/2021-09-13-problems-and-solutions-with-gitea-1-15.md

@ -1,7 +1,7 @@
---
title: Problems and solutions with Gitea 1.15
tags: [tutorial, gitea, mariadb, postgresql]
updated: 2021-10-29 13:49:10
updated: 2021-12-10 17:28:08
description: This blog is now self-hosted
---
@ -36,6 +36,8 @@ to something more scalable: [MariaDB](https://mariadb.org/).
- [Updating gitea next time](#updating-gitea-next-time)
- [Apache2 reverse proxy for Gitea](#apache2-reverse-proxy-for-gitea)
- [Updates](#updates)
- [1.15.2 -> 1.15.6](#1152---1156)
- [1.15.6 -> 1.15.7](#1156---1157)
- [GitHub issues](#github-issues)
<!--TOC-->
@ -552,14 +554,18 @@ QUEUE_CONN_STR = network=unix,addr=/var/run/redis/redis-server.sock,db=2,pool_si
### Updating gitea next time
1. temporarly disable the service
1. wait at least one week before updating. Check
[issues](https://github.com/go-gitea/gitea/issues)
for the new version
```
2. temporarly disable the service
```shell
systemctl stop gitea.service
systemctl mask gitea.service
```
2. copy the original database into a new one
3. copy the original database into a new one
```shell
sudo -i -u postgres
@ -572,7 +578,7 @@ QUEUE_CONN_STR = network=unix,addr=/var/run/redis/redis-server.sock,db=2,pool_si
where `major`, `minor` and `patch` correspond to the current Gitea version.
3. run the doctor on the original database
4. run the doctor on the original database
```shell
exit
@ -582,7 +588,7 @@ QUEUE_CONN_STR = network=unix,addr=/var/run/redis/redis-server.sock,db=2,pool_si
HOME=/var/lib/gitea GITEA_WORK_DIR=/var/lib/gitea /usr/bin/gitea -c /etc/gitea/app.ini doctor --all --fix
```
4. update Gitea
5. update Gitea
```shell
exit
@ -592,7 +598,7 @@ QUEUE_CONN_STR = network=unix,addr=/var/run/redis/redis-server.sock,db=2,pool_si
apt-get dist-upgrade
```
5. migrate the database
6. migrate the database
```bash
exit
@ -600,14 +606,14 @@ QUEUE_CONN_STR = network=unix,addr=/var/run/redis/redis-server.sock,db=2,pool_si
HOME=/var/lib/gitea GITEA_WORK_DIR=/var/lib/gitea /usr/bin/gitea -c /etc/gitea/app.ini migrate
```
3. run the doctor again
7. run the doctor again
```shell
HOME=/var/lib/gitea GITEA_WORK_DIR=/var/lib/gitea /usr/bin/gitea -c /etc/gitea/app.ini doctor --all
HOME=/var/lib/gitea GITEA_WORK_DIR=/var/lib/gitea /usr/bin/gitea -c /etc/gitea/app.ini doctor --all --fix
```
2. re-enable the service
8. re-enable the service
```shell
exit
@ -617,6 +623,17 @@ QUEUE_CONN_STR = network=unix,addr=/var/run/redis/redis-server.sock,db=2,pool_si
apt-mark hold gitea
```
9. if everything works remove the previous database dump if applicable:
```shell
sudo -i -u psql
psql
```
```SQL
DROP DATABASE backup_giteadb_${old_major}_${old_minor}_${old_patch}
```
### Apache2 reverse proxy for Gitea
1. modify Gitea configuration (`/etc/gitea/app.ini`):
@ -757,7 +774,9 @@ See these links for the UNIX socket explanation:
## Updates
After updating from 1.15.2 to 1.15.6, when running
### 1.15.2 -> 1.15.6
After updating from 1.15.2 to 1.15.6, when running:
```shell
HOME=/var/lib/gitea GITEA_WORK_DIR=/var/lib/gitea /usr/bin/gitea -c /etc/gitea/app.ini doctor --all --fix
@ -770,6 +789,27 @@ I get this:
- [C] Error: pq: syntax error at or near "." whilst counting Collaborations without existing user
```
### 1.15.6 -> 1.15.7
Still the same error:
```
[4] Check consistency of database
- [C] Error: pq: syntax error at or near "." whilst counting Collaborations without existing user
```
This happens after the migration:
```shell
HOME=/var/lib/gitea GITEA_WORK_DIR=/var/lib/gitea /usr/bin/gitea -c /etc/gitea/app.ini migrate
```
```
2021/12/10 18:16:38 ...om/urfave/cli/app.go:277:Run() [W] Table user Column max_repo_creation db default is '-1', struct default is -1
2021/12/10 18:16:38 ...om/urfave/cli/app.go:277:Run() [W] Table email_address Column lower_email db nullable is true, struct nullable is false
2021/12/10 18:16:38 ...om/urfave/cli/app.go:277:Run() [W] Table external_login_user column avatar_url db type is TEXT, struct type is VARCHAR(255)
```
### GitHub issues
- [16992](https://github.com/go-gitea/gitea/issues/16992)

Loading…
Cancel
Save