Single n9e instance started via docker-compose (9.1.1) redirects back to the login page ~3s after a successful login

Author: xiaoyuan2019Created Sep 23, 2026Updated Sep 23, 2026

Question and Steps to reproduce

使用的是默认账密:root/root.2020,页面没有提示账密错误,点登陆后3s后自动跳转到登陆页面 docker-compose配置: [root@10 n9e]# docker-compose ps WARN[0000] /data/kube/n9e/docker-compose.yml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS n9e flashcatcloud/nightingale:9.1.1 "/app/n9e" n9e 8 minutes ago Up 8 minutes
[root@10 n9e]# cat docker-compose.yml version: "3.8"

services: n9e: image: flashcatcloud/nightingale:9.1.1 container_name: n9e hostname: n9e restart: always environment: GIN_MODE: release TZ: Asia/Shanghai volumes: - ./etc:/app/etc - ./data:/app/data network_mode: host command: - /app/n9e [root@10 n9e]#

Relevant logs and configurations

配置文件:
[root@10 n9e]# cat etc/config.toml 
[Global]
RunMode = "release"

[Log]
# stdout, stderr, file
Output = "stdout"
# log write dir
Dir = "logs"
# log level: DEBUG INFO WARNING ERROR
Level = "DEBUG"
# # rotate by time
# KeepHours = 4
# # rotate by size
# RotateNum = 3
# # unit: MB
# RotateSize = 256

[HTTP]
# http listening address
Host = "0.0.0.0"
# http listening port
Port = 17000
# https cert file path
CertFile = ""
# https key file path
KeyFile = ""
# whether print access log
PrintAccessLog = false
# whether enable pprof
PProf = true
# expose prometheus /metrics?
ExposeMetrics = true
# http graceful shutdown timeout, unit: s
ShutdownTimeout = 30
# max content length: 64M
MaxContentLength = 67108864
# http server read timeout, unit: s
ReadTimeout = 20
# http server write timeout, unit: s
WriteTimeout = 40
# http server idle timeout, unit: s
IdleTimeout = 120

[DB]
# mysql postgres sqlite
DBType = "mysql"
# postgres: host=%s port=%s user=%s dbname=%s password=%s sslmode=%s
# postgres: DSN="host=127.0.0.1 port=5432 user=root dbname=n9e_v6 password=1234 sslmode=disable"
# mysql: DSN="root:1234@tcp(localhost:3306)/n9e_v6?charset=utf8mb4&parseTime=True&loc=Local"
DSN = "root:Gxxxxxxxxx0A@tcp(0.0.0.0:3306)/n9e_v6?charset=utf8mb4&parseTime=True&loc=Local"
# enable debug mode or not
Debug = false
# unit: s
MaxLifetime = 7200
# max open connections
MaxOpenConns = 32
# max idle connections
MaxIdleConns = 8


[Redis]
# standalone cluster sentinel miniredis
RedisType = "miniredis"
# address, ip:port or ip1:port,ip2:port for cluster and sentinel(SentinelAddrs)
Address = "10.1.1.1:1111"
# Username = ""
Password = "0utBwxxxxxxxN0Ui"
DB = 3
# UseTLS = false
# TLSMinVersion = "1.2"
# Mastername for sentinel type
# MasterName = "mymaster"
# SentinelUsername = ""
# SentinelPassword = ""


[root@10 n9e]# 


日志没有异常:
n9e  | 2026-09-23 14:29:14.394647 DEBUG memsto/notify_channel_cache.go:300 starting notify consumer for channel 4
n9e  | 2026-09-23 14:29:14.394654 DEBUG memsto/notify_channel_cache.go:300 starting notify consumer for channel 5
n9e  | 2026-09-23 14:29:14.394659 DEBUG memsto/notify_channel_cache.go:300 starting notify consumer for channel 2
n9e  | 2026-09-23 14:29:14.394662 DEBUG memsto/notify_channel_cache.go:300 starting notify consumer for channel 5
n9e  | 2026-09-23 14:29:14.394664 DEBUG memsto/notify_channel_cache.go:300 starting notify consumer for channel 4
n9e  | 2026-09-23 14:29:14.394671 DEBUG memsto/notify_channel_cache.go:300 starting notify consumer for channel 5
n9e  | 2026-09-23 14:29:14.394676 DEBUG memsto/notify_channel_cache.go:300 starting notify consumer for channel 6
n9e  | 2026-09-23 14:29:14.394666 DEBUG memsto/notify_channel_cache.go:300 starting notify consumer for channel 2
n9e  | 2026-09-23 14:29:14.394689 DEBUG memsto/notify_channel_cache.go:300 starting notify consumer for channel 6
n9e  | 2026-09-23 14:29:14.394679 DEBUG memsto/notify_channel_cache.go:300 starting notify consumer for channel 6
n9e  | 2026-09-23 14:29:14.394677 DEBUG memsto/notify_channel_cache.go:300 starting notify consumer for channel 2
n9e  | 2026-09-23 14:29:14.394697 DEBUG memsto/notify_channel_cache.go:535 start email sender... conf.Host:smtp.host,conf.Port:25
n9e  | 2026-09-23 14:29:14.394686 DEBUG memsto/notify_channel_cache.go:300 starting notify consumer for channel 5
n9e  | 2026-09-23 14:29:14.394690 DEBUG memsto/notify_channel_cache.go:300 starting notify consumer for channel 6
n9e  | 2026-09-23 14:29:30.338764 INFO logx/logx.go:77 trace_id=8cbcd3a7-29a1-42da-bf75-2837c4266a33 username:root login from:10.213.40.101
n9e  | 2026-09-23 14:30:07.935587 DEBUG router/ai_skill_sync.go:121 [AISkillSync] synced 0 db skills to skill in 1.55458ms
n9e  | 2026-09-23 14:31:07.935676 DEBUG router/ai_skill_sync.go:121 [AISkillSync] synced 0 db skills to skill in 1.434891ms
n9e  | 2026-09-23 14:32:07.935564 DEBUG router/ai_skill_sync.go:121 [AISkillSync] synced 0 db skills to skill in 1.712136ms
n9e  | 2026-09-23 14:33:07.935369 DEBUG router/ai_skill_sync.go:121 [AISkillSync] synced 0 db skills to skill in 1.130206ms
n9e  | 2026-09-23 14:34:07.935357 DEBUG router/ai_skill_sync.go:121 [AISkillSync] synced 0 db skills to skill in 1.341056ms
n9e  | 2026-09-23 14:34:21.237098 INFO logx/logx.go:77 trace_id=ed53e4d9-5223-4857-94e1-305473f278d1 username:root login from:10.213.40.101
n9e  | 2026-09-23 14:35:07.935434 DEBUG router/ai_skill_sync.go:121 [AISkillSync] synced 0 db skills to skill in 1.207224ms
n9e  | 2026-09-23 14:36:07.934966 DEBUG router/ai_skill_sync.go:121 [AISkillSync] synced 0 db skills to skill in 1.201821ms
n9e  | 2026-09-23 14:37:07.935159 DEBUG router/ai_skill_sync.go:121 [AISkillSync] synced 0 db skills to skill in 1.166761ms

Version

flashcatcloud/nightingale:9.1.1