synology部署joplin-server访问异常

问题

env

  • synology ds920+
  • container-manager
  • joplin-server + pg

调整container-manager网络后,发现joplin-server不能连接上。

分析

分析日志如下:

  • 容器端测试连通性异常
  • 从joplin-server容器发现获取db地址异常导致启动一次
root@mvpbang:~# curl 172.17.0.5:22300
curl: (7) Failed to connect to 172.17.0.5 port 22300 after 0 ms: Error

root@mvpbang:~# docker logs -f 74e672011091
...
11:52:30 0|app    | 2025-01-11 11:52:30: App: Content driver: { type: 2, path: '/mnt/files' }
11:52:30 0|app    | 2025-01-11 11:52:30: App: Content driver (fallback): null
11:52:30 0|app    | 2025-01-11 11:52:30: App: Trying to connect to database...
11:52:30 0|app    | 2025-01-11 11:52:30: db: Could not connect. Will try again. getaddrinfo ENOTFOUND db
11:52:31 0|app    | 2025-01-11 11:52:31: db: Could not connect. Will try again. getaddrinfo ENOTFOUND db
11:52:32 0|app    | 2025-01-11 11:52:32: db: Could not connect. Will try again. getaddrinfo ENOTFOUND db
11:52:33 0|app    | 2025-01-11 11:52:33: db: Could not connect. Will try again. getaddrinfo ENOTFOUND db
11:52:34 0|app    | 2025-01-11 11:52:34: db: Could not connect. Will try again. getaddrinfo ENOTFOUND db
11:52:35 0|app    | 2025-01-11 11:52:35: db: Could not connect. Will try again. getaddrinfo ENOTFOUND db
11:52:36 0|app    | 2025-01-11 11:52:36: db: Could not connect. Will try again. getaddrinfo ENOTFOUND db

解决

  • 1.停止项目
  • 2.删除项目中涉及到容器
  • 3.项目->操作构建

6a5976d4b734d55b79a11ef87458c3fc.png

ee6805e2dd6fdb1294f970f5c5224c48.png

再次查看joplin-server地址正常,浏览器端访问正常