Replies: 1 comment 1 reply
-
Same error with mysql, postgres also had some issues but with this config it works for me: services: |
Beta Was this translation helpful? Give feedback.
-
Same error with mysql, postgres also had some issues but with this config it works for me: services: |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm currently experiencing a problem when I try to deploy semaphore in docker with its database, I get this error message that indicates a connection problem with the db, I'm however based on the docker compose that is in the doc, I also use the latest version of the image available (latest) :
time="2024-08-07T20:15:19+02:00" level=warning msg="Error 1045 (28000): Access denied for user 'semaphore_user'@'172.24.0.3' (using password: YES)"
panic: Error 1045 (28000): Access denied for user 'semaphore_user'@'172.24.0.3' (using password: YES)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xae4711]
goroutine 1 [running]:
github.com/ansible-semaphore/semaphore/db/sql.(*SqlDb).Close(0x43b045?, {0xc0000061c0?, 0xc0000061c0?})
/go/src/semaphore/db/sql/SqlDb.go:272 +0x11
panic({0xbb4cc0?, 0xc0002900d8?})
/usr/local/go/src/runtime/panic.go:770 +0x132
github.com/ansible-semaphore/semaphore/db/sql.(*SqlDb).Connect(0xc000078740, {0xc000078050?, 0xc00020f978?})
/go/src/semaphore/db/sql/SqlDb.go:299 +0x9b6
github.com/ansible-semaphore/semaphore/cli/cmd.doSetup()
/go/src/semaphore/cli/cmd/setup.go:42 +0x14c
github.com/ansible-semaphore/semaphore/cli/cmd.init.func7(0xc000186f00?, {0xc74890?, 0x4?, 0xc74894?})
/go/src/semaphore/cli/cmd/setup.go:23 +0xf
github.com/spf13/cobra.(*Command).execute(0x1de1120, {0xc0000496a0, 0x1, 0x1})
/go/src/semaphore/vendor/github.com/spf13/cobra/command.go:987 +0xab1
github.com/spf13/cobra.(*Command).ExecuteC(0x1de02c0)
/go/src/semaphore/vendor/github.com/spf13/cobra/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
/go/src/semaphore/vendor/github.com/spf13/cobra/command.go:1039
github.com/ansible-semaphore/semaphore/cli/cmd.Execute()
/go/src/semaphore/cli/cmd/root.go:37 +0x54
main.main()
/go/src/semaphore/cli/main.go:8 +0x
This is my docker-compose (I hid sensitive information with the X character), I also used the command for the encrypted key (head -c32 /dev/urandom | base64) :
version: '3.8'
services:
mysql:
restart: unless-stopped
image: mysql:8.0
hostname: mysql
volumes:
- semaphore-mysql:/var/lib/mysql
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_DATABASE: semaphore_db
MYSQL_USER: semaphore_user
MYSQL_PASSWORD: XXXXXXXXXX
semaphore:
restart: unless-stopped
ports:
- 24777:3000
image: semaphoreui/semaphore:latest
environment:
SEMAPHORE_DB_USER: semaphore_user
SEMAPHORE_DB_PASS: XXXXXXXXXX
SEMAPHORE_DB_HOST: mysql
SEMAPHORE_DB_PORT: 3306
SEMAPHORE_DB_DIALECT: mysql
SEMAPHORE_DB: semaphore_db
SEMAPHORE_PLAYBOOK_PATH: /tmp/semaphore/
SEMAPHORE_ADMIN_PASSWORD: XXXXXXXXXXXXX
SEMAPHORE_ADMIN_NAME: admin
SEMAPHORE_ADMIN_EMAIL: [email protected]
SEMAPHORE_ADMIN: admin
SEMAPHORE_ACCESS_KEY_ENCRYPTION: XXXXXXXXXXXXXXXXXX
SEMAPHORE_LDAP_ACTIVATED: 'yes'
SEMAPHORE_LDAP_HOST: XXXXXX.com
SEMAPHORE_LDAP_PORT: '636'
SEMAPHORE_LDAP_NEEDTLS: 'yes'
SEMAPHORE_LDAP_DN_BIND: 'CN=XXXXX,OU=XXXXX,OU=XXXXX,DC=XXXXXX,DC=XXX,DC=XX'
SEMAPHORE_LDAP_PASSWORD: 'XXXXXXXXXXXX'
SEMAPHORE_LDAP_DN_SEARCH: 'dc=XXXX,dc=XXXX,dc=XXX'
SEMAPHORE_LDAP_SEARCH_FILTER: "(\u0026(uid=%s)(memberOf=CN=XXXXXXX,OU=XXXX,OU=XXXXXX,OU=XXXX,OU=XXXXX,OU=XXXXX,DC=XXX,DC=XXXX,C=XXXX))"
TZ: Europe/Zurich
depends_on:
- mysql
volumes:
semaphore-mysql:
Beta Was this translation helpful? Give feedback.
All reactions