# After installing Joplin : "Error: Postgres version not supported"

**URL:** https://forum.yunohost.org/t/after-installing-joplin-error-postgres-version-not-supported/31741
**Category:** Support apps
**Tags:** \_others, english
**Created:** [November 2, 2024, 4:38pm UTC](https://forum.yunohost.org/t/after-installing-joplin-error-postgres-version-not-supported/31741 "2024-11-02T16:38:46Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![blodarn](https://forum.yunohost.org/user_avatar/forum.yunohost.org/blodarn/32/4072_2.png) [@blodarn](https://forum.yunohost.org/u/blodarn)
#### Post date: [November 2, 2024, 4:38pm UTC](https://forum.yunohost.org/t/after-installing-joplin-error-postgres-version-not-supported/31741/1 "2024-11-02T16:38:46Z")

</div>

**What type of hardware are you using** : Old laptop or computer  
**What YunoHost version are you running** : 12  
**What app is this about** : Joplin

### Describe your issue

Hi everyone! I tried to install Joplin after migrating to Yunohost 12 and I cannot access the app. I get a 502 Bad gateway.  
I checked the service and the one for Joplin is “failed”. I tried to restart it with no success.

Apparently, it would be related to Postgres version that is not supported.

After the migration, I got the 500 Internal server error but I read somewhere on the forum that it was normal. I refreshed the page after + log in and no problem.

 ![brave_OJAkGfJZly](https://forum.yunohost.org/uploads/default/original/2X/e/ea016b92e867dc337babcd0fa1c8eeae5029a49d.png)

I had to go back to the migration section and migrate “part” (i don’t remember what it was) of the migration that were not applied the first time.

Perhaps the Postgres version wasn’t updated correctly during the migration ?

Thanks.

### Share relevant logs or error messages

Save New Duplicate & Edit Just Text Twitter  
LOGFILE: journalctl

```auto
Nov 01 11:38:10 yarn[176023]: 2024-11-01 11:38:10: App: Trying to connect to database...
Nov 01 11:38:10 yarn[176023]: 2024-11-01 11:38:10: App: Connection check: { latestMigration: null, isCreated: false, error: null }
Nov 01 11:38:10 yarn[176023]: Error: Postgres version not supported: PostgreSQL 11.18 (Debian 11.18-0+deb10u1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit. Min required version is: 12.0
Nov 01 11:38:10 yarn[176023]: at versionCheck (/var/www/joplin/packages/server/src/db.ts:470:64)
Nov 01 11:38:10 yarn[176023]: at processTicksAndRejections (node:internal/process/task_queues:95:5)
Nov 01 11:38:10 yarn[176023]: at main (/var/www/joplin/packages/server/src/app.ts:327:3)
Nov 01 11:38:10 systemd[1]: joplin.service: Main process exited, code=exited, status=1/FAILURE
Nov 01 11:38:10 systemd[1]: joplin.service: Failed with result 'exit-code'.
Nov 01 11:38:10 systemd[1]: joplin.service: Consumed 4.381s CPU time.
-- Boot 90cf815c576443f4873d640d32f7538a --
Nov 02 11:51:26 systemd[1]: Started joplin.service - Joplin server.
Nov 02 11:51:30 yarn[12421]: 2024-11-02 11:51:30: App: Starting server v3.1.0 (prod) on port 22300 and PID 12421...
Nov 02 11:51:30 yarn[12421]: 2024-11-02 11:51:30: App: Checking for time drift using NTP server: pool.ntp.org:123
Nov 02 11:51:30 yarn[12421]: 2024-11-02 11:51:30: App: NTP time offset: -50ms
Nov 02 11:51:30 yarn[12421]: 2024-11-02 11:51:30: App: Running in Docker: false
Nov 02 11:51:30 yarn[12421]: 2024-11-02 11:51:30: App: Public base URL: https://joplin.macaques.ca
Nov 02 11:51:30 yarn[12421]: 2024-11-02 11:51:30: App: API base URL: https://joplin.macaques.ca
Nov 02 11:51:30 yarn[12421]: 2024-11-02 11:51:30: App: User content base URL: https://joplin.macaques.ca
Nov 02 11:51:30 yarn[12421]: 2024-11-02 11:51:30: App: Log dir: /var/www/joplin/packages/server/logs
Nov 02 11:51:30 yarn[12421]: 2024-11-02 11:51:30: App: DB Config: {
Nov 02 11:51:30 yarn[12421]: client: 'pg',
Nov 02 11:51:30 yarn[12421]: name: 'joplin',
Nov 02 11:51:30 yarn[12421]: slowQueryLogEnabled: false,
Nov 02 11:51:30 yarn[12421]: slowQueryLogMinDuration: 1000,
Nov 02 11:51:30 yarn[12421]: autoMigration: true,
Nov 02 11:51:30 yarn[12421]: user: 'joplin',
Nov 02 11:51:30 yarn[12421]: password: ' ********',
Nov 02 11:51:30 yarn[12421]: port: 5432,
Nov 02 11:51:30 yarn[12421]: host: 'localhost'
Nov 02 11:51:30 yarn[12421]: }
Nov 02 11:51:30 yarn[12421]: 2024-11-02 11:51:30: App: Mailer Config: {
Nov 02 11:51:30 yarn[12421]: enabled: true,
Nov 02 11:51:30 yarn[12421]: host: 'localhost',
Nov 02 11:51:30 yarn[12421]: port: 25,
Nov 02 11:51:30 yarn[12421]: security: 'tls',
Nov 02 11:51:30 yarn[12421]: authUser: 'joplin',
Nov 02 11:51:30 yarn[12421]: authPassword: ' ********',
Nov 02 11:51:30 yarn[12421]: noReplyName: 'joplin',
Nov 02 11:51:30 yarn[12421]: noReplyEmail: 'reply@joplin.macaques.ca'
Nov 02 11:51:30 yarn[12421]: }
Nov 02 11:51:30 yarn[12421]: 2024-11-02 11:51:30: App: Content driver: { type: 1 }
Nov 02 11:51:30 yarn[12421]: 2024-11-02 11:51:30: App: Content driver (fallback): null
Nov 02 11:51:30 yarn[12421]: 2024-11-02 11:51:30: App: Trying to connect to database...
Nov 02 11:51:30 yarn[12421]: 2024-11-02 11:51:30: App: Connection check: { latestMigration: null, isCreated: false, error: null }
Nov 02 11:51:30 yarn[12421]: Error: Postgres version not supported: PostgreSQL 11.18 (Debian 11.18-0+deb10u1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit. Min required version is: 12.0
Nov 02 11:51:30 yarn[12421]: at versionCheck (/var/www/joplin/packages/server/src/db.ts:470:64)
Nov 02 11:51:30 yarn[12421]: at processTicksAndRejections (node:internal/process/task_queues:95:5)
Nov 02 11:51:30 yarn[12421]: at main (/var/www/joplin/packages/server/src/app.ts:327:3)
Nov 02 11:51:30 systemd[1]: joplin.service: Main process exited, code=exited, status=1/FAILURE
Nov 02 11:51:30 systemd[1]: joplin.service: Failed with result 'exit-code'.
Nov 02 11:51:30 systemd[1]: joplin.service: Consumed 4.366s CPU time.

```

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [November 2, 2024, 6:57pm UTC](https://forum.yunohost.org/t/after-installing-joplin-error-postgres-version-not-supported/31741/2 "2024-11-02T18:57:09Z")

</div>

Can you share the output of `sudo pg_listclusters` ?

---

<div class="post-metadata">

### Author: ![blodarn](https://forum.yunohost.org/user_avatar/forum.yunohost.org/blodarn/32/4072_2.png) [@blodarn](https://forum.yunohost.org/u/blodarn)
#### Post date: [November 2, 2024, 8:02pm UTC](https://forum.yunohost.org/t/after-installing-joplin-error-postgres-version-not-supported/31741/3 "2024-11-02T20:02:33Z")

</div>

Hi @Aleks !

```auto
ssh admin@<domain>
admin@<domain>'s password:
Linux <domain> 6.1.0-26-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.112-1 (2024-09-30) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Nov 1 18:07:26 2024 from <IP>
admin@<domain>:~$ sudo pg_listclusters
[sudo] password for admin:
sudo: pg_listclusters: command not found
admin@<domain>:~$

```

Normal?

---

<div class="post-metadata">

### Author: ![blodarn](https://forum.yunohost.org/user_avatar/forum.yunohost.org/blodarn/32/4072_2.png) [@blodarn](https://forum.yunohost.org/u/blodarn)
#### Post date: [November 2, 2024, 8:03pm UTC](https://forum.yunohost.org/t/after-installing-joplin-error-postgres-version-not-supported/31741/4 "2024-11-02T20:03:31Z")

</div>

> [@Aleks](#):
>
> sudo pg\_listclusters

It was :

```auto
$ sudo pg_lsclusters
Ver Cluster Port Status Owner Data directory Log file
11 main 5432 online postgres /var/lib/postgresql/11/main /var/log/postgresql/postgresql-11-main.log
15 main 5433 online postgres /var/lib/postgresql/15/main /var/log/postgresql/postgresql-15-main.log

```

I don’t have the right version apparently : postgresql-15

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [November 2, 2024, 10:01pm UTC](https://forum.yunohost.org/t/after-installing-joplin-error-postgres-version-not-supported/31741/5 "2024-11-02T22:01:41Z")

</div>

Hmfokay so let’s look at : `sudo aptitude why postgresql-11`

---

<div class="post-metadata">

### Author: ![blodarn](https://forum.yunohost.org/user_avatar/forum.yunohost.org/blodarn/32/4072_2.png) [@blodarn](https://forum.yunohost.org/u/blodarn)
#### Post date: [November 2, 2024, 10:07pm UTC](https://forum.yunohost.org/t/after-installing-joplin-error-postgres-version-not-supported/31741/6 "2024-11-02T22:07:33Z")

</div>

> [@Aleks](#):
>
> sudo aptitude why postgresql-11

```auto
sudo aptitude why postgresql-11
i joplin-ynh-deps Depends postgresql-client
i A postgresql-client-11 Provides postgresql-client
i A postgresql-client-11 Suggests postgresql-11

```

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [November 2, 2024, 10:09pm UTC](https://forum.yunohost.org/t/after-installing-joplin-error-postgres-version-not-supported/31741/7 "2024-11-02T22:09:49Z")

</div>

Hmf okay, `postgresql-client-11 Provides postgresql-client` … but so does version 15 …

So let’s try to see what `apt remove postgresql-11 --dry-run` says, does it warn about important stuff that would get removed besides postgresql 11 ?

---

<div class="post-metadata">

### Author: ![blodarn](https://forum.yunohost.org/user_avatar/forum.yunohost.org/blodarn/32/4072_2.png) [@blodarn](https://forum.yunohost.org/u/blodarn)
#### Post date: [November 2, 2024, 10:26pm UTC](https://forum.yunohost.org/t/after-installing-joplin-error-postgres-version-not-supported/31741/8 "2024-11-02T22:26:09Z")

</div>

> [@Aleks](#):
>
> apt remove postgresql-11 --dry-run

```auto
apt remove postgresql-11 --dry-run
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libicu63 libldap-2.4-2 libllvm7
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  postgresql-11
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Remv postgresql-11 [11.18-0+deb10u1]

```

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [November 2, 2024, 10:55pm UTC](https://forum.yunohost.org/t/after-installing-joplin-error-postgres-version-not-supported/31741/9 "2024-11-02T22:55:39Z")

</div>

Alrighty it should be fine to remove it then, using `sudo apt remove postgresql-11`

And then we should check with `sudo pg_lsclusters` that postgresql 15 now listens to port 5432

---

<div class="post-metadata">

### Author: ![blodarn](https://forum.yunohost.org/user_avatar/forum.yunohost.org/blodarn/32/4072_2.png) [@blodarn](https://forum.yunohost.org/u/blodarn)
#### Post date: [November 2, 2024, 10:59pm UTC](https://forum.yunohost.org/t/after-installing-joplin-error-postgres-version-not-supported/31741/10 "2024-11-02T22:59:47Z")

</div>

> [@Aleks](#):
>
> sudo pg\_lsclusters

Executed : sudo apt remove postgresql-11

After :

```auto
sudo pg_lsclusters
Ver Cluster Port Status Owner Data directory Log file
11 main 5432 down,binaries_missing postgres /var/lib/postgresql/11/main /var/log/postgresql/postgresql-11-main.log
15 main 5433 online postgres /var/lib/postgresql/15/main /var/log/postgresql/postgresql-15-main.log

```

But instance Yunohost seems to be down now…

---

<div class="post-metadata">

### Author: ![Aleks](https://forum.yunohost.org/user_avatar/forum.yunohost.org/aleks/32/1704_2.png) [@Aleks](https://forum.yunohost.org/u/Aleks)
#### Post date: [November 2, 2024, 11:03pm UTC](https://forum.yunohost.org/t/after-installing-joplin-error-postgres-version-not-supported/31741/11 "2024-11-02T23:03:47Z")

</div>

hmmmoay so let’s try somthing else by changing the port in the config ? Using:

`sudo sed 's/5432/5499/g' -i /etc/postgresql/11/main/postgresql.conf`

and

`sudo sed 's/5433/5432/g' -i /etc/postgresql/15/main/postgresql.conf`

and then `sudo systemctl restart postgresql` and `sudo pg_lsclusters` to confirm the change ?

---

<div class="post-metadata">

### Author: ![blodarn](https://forum.yunohost.org/user_avatar/forum.yunohost.org/blodarn/32/4072_2.png) [@blodarn](https://forum.yunohost.org/u/blodarn)
#### Post date: [November 2, 2024, 11:09pm UTC](https://forum.yunohost.org/t/after-installing-joplin-error-postgres-version-not-supported/31741/12 "2024-11-02T23:09:59Z")

</div>

> [@Aleks](#):
>
> sudo pg\_lsclusters

Back online!  
I restarted Joplin service.

There is a new error regarding user joplin that doesn’t exist. It should be with my main user I guess.

Perhaps I should reinstall the app ?

Logs :  
[https://paste.yunohost.org/qiqefirero](https://paste.yunohost.org/qiqefirero)

---

<div class="post-metadata">

### Author: ![blodarn](https://forum.yunohost.org/user_avatar/forum.yunohost.org/blodarn/32/4072_2.png) [@blodarn](https://forum.yunohost.org/u/blodarn)
#### Post date: [November 3, 2024, 12:57am UTC](https://forum.yunohost.org/t/after-installing-joplin-error-postgres-version-not-supported/31741/13 "2024-11-03T00:57:04Z")

</div>

After re-installing Joplin, everything works !

Thank you @Aleks !

Complete solution :

1. Inspect : sudo pg\_lsclusters

```auto
Ver Cluster Port Status Owner Data directory Log file
11 main 5432 online postgres /var/lib/postgresql/11/main /var/log/postgresql/postgresql-11-main.log
15 main 5433 online postgres /var/lib/postgresql/15/main /var/log/postgresql/postgresql-15-main.log

```

1. sudo aptitude why postgresql-11

```auto
i joplin-ynh-deps Depends postgresql-client
i A postgresql-client-11 Provides postgresql-client
i A postgresql-client-11 Suggests postgresql-11

```

1. apt remove postgresql-11 --dry-run

```auto
apt remove postgresql-11 --dry-run
NOTE: This is only a simulation!
      apt needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libicu63 libldap-2.4-2 libllvm7
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  postgresql-11
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Remv postgresql-11 [11.18-0+deb10u1]

```

1. Remove wrong version of postgresql : sudo apt remove postgresql-11
2. Inspect : sudo pg\_lsclusters

```auto
Ver Cluster Port Status Owner Data directory Log file
11 main 5432 down,binaries_missing postgres /var/lib/postgresql/11/main /var/log/postgresql/postgresql-11-main.log
15 main 5433 online postgres /var/lib/postgresql/15/main /var/log/postgresql/postgresql-15-main.log

```

1. If no more access to Yunohost instance, try :
2. sudo sed ‘s/5432/5499/g’ -i /etc/postgresql/11/main/postgresql.conf
3. sudo sed ‘s/5433/5432/g’ -i /etc/postgresql/15/main/postgresql.conf
4. sudo systemctl restart postgresql
5. sudo pg\_lsclusters
6. Yunohost instance should be back online
7. Reinstall Joplin

---

<div class="post-metadata">

### Author: ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)
#### Post date: [November 18, 2024, 12:57am UTC](https://forum.yunohost.org/t/after-installing-joplin-error-postgres-version-not-supported/31741/14 "2024-11-18T00:57:46Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
