Problem: Incorrect login or password on a fresh docker swarm installation
Issue
Hello all,
After a fresh install of semaphore in docker swarm, I am unable to login, getting Incorrect login or password in the UI. I have tried mysql and postgres still same issues. I can see my user info in the DB.
I have tired to follow the troubleshooting issue such as executing semaphore user list I get the following error Loading config Cannot Find configuration! Use --config parameter to point to a JSON file generated by semaphore setup.
I even tired to run semaphore user change-by-login --login serveradmin --password Pa$$word!01 I get
semaphore user change-by-login --login serveradmin --password Pa$$wordexport LANG=C.UTF-8 Loading config Cannot Find configuration! Use --config parameter to point to a JSON file generated by semaphore setup. again!
I tired semaphore --config /etc/semaphore/config.json or semaphore server --config /etc/semaphore/config.json still same issue.
I know the config.json file is there and can read it within the container 4ba5a67e371c:/# ls -ahl /etc/semaphore/config.json -rw-r--r-- 1 semaphor root 1.8K Oct 2 17:56 /etc/semaphore/config.json
Is there a bug with Loading config file? Is there anything else I can provide to help me resolving this issue?
I have provided all of the necessary details below, please review and let me know.
Thank you very much
Sammy
Impact
Configuration, Docker, Other
Installation method
Docker
Database
MySQL, Postgres
Browser
Chrome, Safari
Semaphore Version
v2.10.22-e44910d-1721658561
Ansible Version
No response
Logs & errors
Docker semaphore’s logs
sudo docker service logs mgmt_semaphore
mgmt_semaphore.1.tc8f0eu11q4u@docker-prod-worker3 | Attempting to connect to database semaphore on postgres:5432 with user semaphore ...
mgmt_semaphore.1.uqbprufjimke@docker-prod-worker3 | Attempting to connect to database semaphore on postgres:5432 with user semaphore ...
mgmt_semaphore.1.uqbprufjimke@docker-prod-worker3 | No additional system dependencies to install
mgmt_semaphore.1.tc8f0eu11q4u@docker-prod-worker3 | No additional system dependencies to install
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Attempting to connect to database semaphore on postgres:5432 with user semaphore ...
mgmt_semaphore.1.uqbprufjimke@docker-prod-worker3 | No additional python dependencies to install
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Generating /tmp/semaphore/config.stdin ...
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing semaphore setup
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Hello! You will now be guided through a setup to:
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | 1. Set up configuration for a MySQL/MariaDB database
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | 2. Set up a path for your playbooks (auto-created)
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | 3. Run database Migrations
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | 4. Set up initial semaphore user & password
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | What database to use:
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | 1 - MySQL
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | 2 - BoltDB
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | 3 - PostgreSQL
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | (default 1):
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | db Hostname (default 127.0.0.1:5432):
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | db User (default root):
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | db Password:
mgmt_semaphore.1.tc8f0eu11q4u@docker-prod-worker3 | No additional python dependencies to install
mgmt_semaphore.1.tc8f0eu11q4u@docker-prod-worker3 | Starting semaphore server
mgmt_semaphore.1.uqbprufjimke@docker-prod-worker3 | Starting semaphore server
mgmt_semaphore.1.uqbprufjimke@docker-prod-worker3 | Loading config
mgmt_semaphore.1.tc8f0eu11q4u@docker-prod-worker3 | Loading config
mgmt_semaphore.1.uqbprufjimke@docker-prod-worker3 | Validating config
mgmt_semaphore.1.tc8f0eu11q4u@docker-prod-worker3 | Validating config
mgmt_semaphore.1.uqbprufjimke@docker-prod-worker3 | Postgres semaphore@postgres:5432 semaphore_db
mgmt_semaphore.1.tc8f0eu11q4u@docker-prod-worker3 | Postgres semaphore@postgres:5432 semaphore_db
mgmt_semaphore.1.uqbprufjimke@docker-prod-worker3 | Tmp Path (projects home) /tmp/semaphore
mgmt_semaphore.1.tc8f0eu11q4u@docker-prod-worker3 | Tmp Path (projects home) /tmp/semaphore
mgmt_semaphore.1.uqbprufjimke@docker-prod-worker3 | Semaphore v2.10.22-e44910d-1721658561
mgmt_semaphore.1.tc8f0eu11q4u@docker-prod-worker3 | Semaphore v2.10.22-e44910d-1721658561
mgmt_semaphore.1.uqbprufjimke@docker-prod-worker3 | Interface
mgmt_semaphore.1.tc8f0eu11q4u@docker-prod-worker3 | Interface
mgmt_semaphore.1.uqbprufjimke@docker-prod-worker3 | Port :3000
mgmt_semaphore.1.tc8f0eu11q4u@docker-prod-worker3 | Port :3000
mgmt_semaphore.1.uqbprufjimke@docker-prod-worker3 | Server is running
mgmt_semaphore.1.tc8f0eu11q4u@docker-prod-worker3 | Server is running
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | db Name (default semaphore):
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Playbook path (default /tmp/semaphore):
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Public URL (optional, example: https://example.com/semaphore):
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Enable email alerts? (yes/no) (default no):
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Enable telegram alerts? (yes/no) (default no):
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Enable slack alerts? (yes/no) (default no):
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Enable Rocket.Chat alerts? (yes/no) (default no):
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Enable Microsoft Team Channel alerts? (yes/no) (default no):
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Enable LDAP authentication? (yes/no) (default no):
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Config output directory (default /home/semaphore):
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Running: mkdir -p /etc/semaphore..
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Configuration written to /etc/semaphore/config.json..
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Loading config
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Validating config
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Pinging db..
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Running db Migrations..
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v0.0.0 (at 2024-10-02 17:56:45.37119296 +0000 UTC m=+0.019370458)...
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Creating migrations table
[12/0]8]phore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v1.0.0 (at 2024-10-02 17:56:51.850668001 +0000 UTC m=+6.498845498)...
[4/87]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v1.2.0 (at 2024-10-02 17:56:52.14289408 +0000 UTC m=+6.791071578)...
[2/0]6]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v1.3.0 (at 2024-10-02 17:56:52.485435562 +0000 UTC m=+7.133613049)...
[4/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v1.4.0 (at 2024-10-02 17:56:52.551766326 +0000 UTC m=+7.199944014)...
[5/0]]]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v1.5.0 (at 2024-10-02 17:56:52.811340709 +0000 UTC m=+7.459518406)...
[4/0]]]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v1.6.0 (at 2024-10-02 17:56:53.562861717 +0000 UTC m=+8.211039414)...
[5/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v1.7.0 (at 2024-10-02 17:56:53.678803743 +0000 UTC m=+8.326981441)...
[2/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v1.8.0 (at 2024-10-02 17:56:53.750841148 +0000 UTC m=+8.399018645)...
[2/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v1.9.0 (at 2024-10-02 17:56:53.823860092 +0000 UTC m=+8.472037780)...
[2/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.2.1 (at 2024-10-02 17:56:53.894182284 +0000 UTC m=+8.542359781)...
[5/0]]]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.3.0 (at 2024-10-02 17:56:54.826187742 +0000 UTC m=+9.474365239)...
[4/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.3.1 (at 2024-10-02 17:56:54.835804972 +0000 UTC m=+9.483982459)...
[7/0]]]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.3.2 (at 2024-10-02 17:56:54.92999097 +0000 UTC m=+9.578168468)...
[6/0]]]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.4.0 (at 2024-10-02 17:56:54.956459314 +0000 UTC m=+9.604636812)...
[2/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.5.0 (at 2024-10-02 17:56:54.96320801 +0000 UTC m=+9.611385707)...
[2/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.5.2 (at 2024-10-02 17:56:54.970928754 +0000 UTC m=+9.619106252)...
[2/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.7.1 (at 2024-10-02 17:56:54.978403138 +0000 UTC m=+9.626580836)...
[2/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.7.4 (at 2024-10-02 17:56:54.986708555 +0000 UTC m=+9.634886263)...
[2/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.7.6 (at 2024-10-02 17:56:54.99482418 +0000 UTC m=+9.643001868)...
[2/0]6]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.7.8 (at 2024-10-02 17:56:55.003362503 +0000 UTC m=+9.651540010)...
[4/57]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.7.9 (at 2024-10-02 17:56:55.012924655 +0000 UTC m=+9.661102162)...
[2/77]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.7.10 (at 2024-10-02 17:56:55.022375179 +0000 UTC m=+9.670552677)...
[1/43]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.7.12 (at 2024-10-02 17:56:55.031310356 +0000 UTC m=+9.679488045)...
[3/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.7.13 (at 2024-10-02 17:56:55.040819245 +0000 UTC m=+9.688996742)...
[3/0]2]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.8.0 (at 2024-10-02 17:56:55.065342698 +0000 UTC m=+9.713520215)...
[8/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.8.1 (at 2024-10-02 17:56:55.074912796 +0000 UTC m=+9.723090303)...
[1/63]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.8.7 (at 2024-10-02 17:56:55.082106802 +0000 UTC m=+9.730284609)...
[1/43]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.8.8 (at 2024-10-02 17:56:55.091119752 +0000 UTC m=+9.739297249)...
[2/98]]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.8.20 (at 2024-10-02 17:56:55.111897887 +0000 UTC m=+9.760075434)...
[3/0]9]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.8.25 (at 2024-10-02 17:56:55.148107473 +0000 UTC m=+9.796285180)...
[5/0]]]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.8.26 (at 2024-10-02 17:56:55.157888302 +0000 UTC m=+9.806066130)...
[2/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.8.36 (at 2024-10-02 17:56:55.165019445 +0000 UTC m=+9.813196992)...
[4/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.8.38 (at 2024-10-02 17:56:55.173090003 +0000 UTC m=+9.821267701)...
[9/0]]]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.8.39 (at 2024-10-02 17:56:55.208753943 +0000 UTC m=+9.856931490)...
[8/0]]]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.8.40 (at 2024-10-02 17:56:55.251438298 +0000 UTC m=+9.899615986)...
[7/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.8.42 (at 2024-10-02 17:56:55.261240539 +0000 UTC m=+9.909418027)...
[1/26]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.8.51 (at 2024-10-02 17:56:55.268189326 +0000 UTC m=+9.916367024)...
[3/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.8.57 (at 2024-10-02 17:56:55.276657141 +0000 UTC m=+9.924834638)...
[3/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.8.58 (at 2024-10-02 17:56:55.285788852 +0000 UTC m=+9.933966649)...
[1/57]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.8.91 (at 2024-10-02 17:56:55.2936954 +0000 UTC m=+9.941873167)...
[3/46]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.9.6 (at 2024-10-02 17:56:55.302614546 +0000 UTC m=+9.950792343)...
[1/341]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.9.46 (at 2024-10-02 17:56:55.341695121 +0000 UTC m=+9.989872939)...
[2/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.9.60 (at 2024-10-02 17:56:55.350966836 +0000 UTC m=+9.999144654)...
[5/0]6]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.9.61 (at 2024-10-02 17:56:55.464250858 +0000 UTC m=+10.112428355)...
[9/0]4]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.9.62 (at 2024-10-02 17:56:55.622938589 +0000 UTC m=+10.271116076)...
[5/0]4]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.9.70 (at 2024-10-02 17:56:55.657363788 +0000 UTC m=+10.305541486)...
[3/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.9.97 (at 2024-10-02 17:56:55.665951928 +0000 UTC m=+10.314129625)...
[1/106]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.9.100 (at 2024-10-02 17:56:55.691595189 +0000 UTC m=+10.339772887)...
[1/118]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.10.12 (at 2024-10-02 17:56:55.699864005 +0000 UTC m=+10.348041702)...
[3/75]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.10.15 (at 2024-10-02 17:56:55.709651477 +0000 UTC m=+10.357828974)...
[4/100]aphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Executing migration v2.10.16 (at 2024-10-02 17:56:55.718199137 +0000 UTC m=+10.366376835)...
[3/0]]maphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Migrations Finished
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | time="2024-10-02T17:56:55Z" level=warning msg="no rows in result set" fields.level=Warn
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | > Username: > Email: > Your name: > Password:
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | You are all setup "Sammy Farida"!
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Re-launch this program pointing to the configuration file
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | ./semaphore server --config /etc/semaphore/config.json
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | To run as daemon:
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | nohup ./semaphore server --config /etc/semaphore/config.json &
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 |
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | You can login with [email protected] or serveradmin.
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | No additional system dependencies to install
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | No additional python dependencies to install
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Starting semaphore server
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Loading config
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Validating config
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Postgres semaphore@postgres:5432 semaphore_db
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Tmp Path (projects home) /tmp/semaphore
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Semaphore v2.10.22-e44910d-1721658561
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Interface
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Port :3000
mgmt_semaphore.1.9kjz38y0bmmg@docker-prod-worker1 | Server is running
Docker postgres's logs
sudo docker service logs mgmt_postgres
mgmt_postgres.1.6tiezo5dw9ce@docker-prod-worker1 |
mgmt_postgres.1.6tiezo5dw9ce@docker-prod-worker1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
mgmt_postgres.1.6tiezo5dw9ce@docker-prod-worker1 |
mgmt_postgres.1.6tiezo5dw9ce@docker-prod-worker1 | 2024-10-02 17:56:42.775 UTC [1] LOG: starting PostgreSQL 14.13 (Debian 14.13-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
mgmt_postgres.1.6tiezo5dw9ce@docker-prod-worker1 | 2024-10-02 17:56:42.775 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
mgmt_postgres.1.6tiezo5dw9ce@docker-prod-worker1 | 2024-10-02 17:56:42.775 UTC [1] LOG: listening on IPv6 address "::", port 5432
mgmt_postgres.1.6tiezo5dw9ce@docker-prod-worker1 | 2024-10-02 17:56:43.486 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
mgmt_postgres.1.6tiezo5dw9ce@docker-prod-worker1 | 2024-10-02 17:56:44.295 UTC [27] LOG: database system was shut down at 2024-10-02 17:55:33 UTC
mgmt_postgres.1.6tiezo5dw9ce@docker-prod-worker1 | 2024-10-02 17:56:44.402 UTC [1] LOG: database system is ready to accept connections
mgmt_postgres.1.6tiezo5dw9ce@docker-prod-worker1 | 2024-10-02 17:56:45.370 UTC [35] ERROR: relation "migrations" does not exist at character 22
mgmt_postgres.1.6tiezo5dw9ce@docker-prod-worker1 | 2024-10-02 17:56:45.370 UTC [35] STATEMENT: select count(1) from migrations
mgmt_postgres.1.6tiezo5dw9ce@docker-prod-worker1 | 2024-10-02 17:56:45.371 UTC [35] ERROR: relation "migrations" does not exist at character 22
mgmt_postgres.1.6tiezo5dw9ce@docker-prod-worker1 | 2024-10-02 17:56:45.371 UTC [35] STATEMENT: select count(1) from migrations
Manual installation - system information
Linux 4ba5a67e371c 5.15.0-119-generic #129-Ubuntu SMP Fri Aug 2 19:25:20 UTC 2024 x86_64 Linux
proxy is traefik:v3.1.3
Configuration
docker swarm compose file
version: '3.8'
services:
semaphore:
image: semaphoreui/semaphore:v2.10.22
user: "${UID}:${GID}"
ports:
- "3000:3000"
environment:
#- PUID=1000
#- PGID=1000
- SEMAPHORE_DB_DIALECT=postgres
- SEMAPHORE_DB_HOST=postgres
- SEMAPHORE_DB_NAME=semaphore_db
- SEMAPHORE_DB_USER=semaphore
- SEMAPHORE_DB_PORT=5432
- SEMAPHORE_DB_PASS=/run/secrets/semaphore_db_password
- SEMAPHORE_ADMIN=serveradmin
- SEMAPHORE_ADMIN_NAME="Sammy Farida"
- [email protected]
- SEMAPHORE_ADMIN_PASSWORD=/run/secrets/semaphore_admin_password
- SEMAPHORE_WEB_ROOT=https://semaphore.local.itsecurity.network
- SEMAPHORE_EMAIL_ALERT=y
- SEMAPHORE_EMAIL_SENDER="Semaphor It Security Network"
- SEMAPHORE_EMAIL_HOST=smtp.gmail.com
- SEMAPHORE_EMAIL_PORT=465
- [email protected]
- SEMAPHORE_EMAIL_PASSWORD=/run/secrets/faridanoreply_email_password
- SEMAPHORE_EMAIL_SECURE=true
- SEMAPHORE_ACCESS_KEY_ENCRYPTION=/run/secrets/semaphore_access_key_encryption
- SEMAPHORE_PLAYBOOK_PATH=/tmp/semaphore
secrets:
- semaphore_admin_password
- semaphore_db_password
- faridanoreply_email_password
- semaphore_access_key_encryption
volumes:
- type: bind
source: /mnt/cephfs/docker-shared-prod/semaphore/data/
target: /var/lib/semaphore/
- type: bind
source: /mnt/cephfs/docker-shared-prod/semaphore/config/
target: /etc/semaphore/
- type: bind
source: /mnt/cephfs/docker-shared-prod/semaphore/tmp_config/
target: /tmp/semaphore/
networks:
- semaphore_network
- traefik-public
depends_on:
- postgres
deploy:
restart_policy:
condition: on-failure
mode: replicated
replicas: 1
placement:
constraints: [node.role == worker]
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-public"
- "traefik.http.routers.semaphore.rule=Host(`semaphore.local.itsecurity.network`)"
- "traefik.http.services.semaphore.loadbalancer.server.port=3000"
- "traefik.http.routers.semaphore.entrypoints=https"
- "traefik.http.routers.semaphore.tls=true"
- "traefik.http.routers.semaphore.tls.certresolver=cloudflare"
postgres:
image: postgres:14
volumes:
- type: bind
source: /mnt/cephfs/docker-shared-prod/semaphore/postgres/data/
target: /var/lib/postgresql/data/
environment:
POSTGRES_USER: semaphore
POSTGRES_PASSWORD: /run/secrets/semaphore_db_password
POSTGRES_DB: semaphore_db
secrets:
- semaphore_db_password
networks:
- semaphore_network
deploy:
restart_policy:
condition: on-failure
mode: replicated
replicas: 1
placement:
constraints: [node.role == worker]
secrets:
semaphore_admin_password:
external: true
semaphore_db_password:
external: true
faridanoreply_email_password:
external: true
semaphore_access_key_encryption:
external: true
networks:
semaphore_network:
driver: overlay
attachable: true
traefik-public:
external: true
config.json details
{
"mysql": {
"host": "",
"user": "",
"pass": "",
"name": "",
"options": null
},
"bolt": {
"host": "",
"user": "",
"pass": "",
"name": "",
"options": null
},
"postgres": {
"host": "postgres:5432",
"user": "semaphore",
"pass": "/run/secrets/semaphore_db_password",
"name": "semaphore",
"options": {
"sslmode": "disable"
}
},
"dialect": "postgres",
"port": "",
"interface": "",
"tmp_path": "/tmp/semaphore",
"ssh_config_path": "",
"git_client": "",
"web_host": "https://semaphore.local.itsecurity.network",
"cookie_hash": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"cookie_encryption": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"access_key_encryption": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"email_alert": false,
"email_sender": "",
"email_host": "",
"email_port": "",
"email_username": "",
"email_password": "",
"email_secure": false,
"ldap_enable": false,
"ldap_binddn": "",
"ldap_bindpassword": "",
"ldap_server": "",
"ldap_searchdn": "",
"ldap_searchfilter": "",
"ldap_mappings": {
"dn": "",
"mail": "",
"uid": "",
"cn": ""
},
"ldap_needtls": false,
"telegram_alert": false,
"telegram_chat": "",
"telegram_token": "",
"slack_alert": false,
"slack_url": "",
"rocketchat_alert": false,
"rocketchat_url": "",
"microsoft_teams_alert": false,
"microsoft_teams_url": "",
"oidc_providers": null,
"max_task_duration_sec": 0,
"max_tasks_per_template": 0,
"max_parallel_tasks": 0,
"runner_registration_token": "",
"password_login_disable": false,
"non_admin_can_create_project": false,
"use_remote_runner": false,
"runner": {
"api_url": "",
"registration_token": "",
"config_file": "",
"one_off": false,
"webhook": "",
"max_parallel_tasks": 0
},
"global_integration_alias": "",
"apps": null
Additional information
Semaphore troubleshooting output
4ba5a67e371c:/#
4ba5a67e371c:/# semaphore user list
Loading config
Cannot Find configuration! Use --config parameter to point to a JSON file generated by `semaphore setup`.
4ba5a67e371c:/#
4ba5a67e371c:/# ls -ahl /etc/semaphore/config.json
-rw-r--r-- 1 semaphor root 1.8K Oct 2 17:56 /etc/semaphore/config.json
4ba5a67e371c:/#
4ba5a67e371c:/#
4ba5a67e371c:/# semaphore user change-by-login --login serveradmin --password Pa$$word!01
semaphore user change-by-login --login serveradmin --password Pa$$wordexport LANG=C.UTF-8
Loading config
Cannot Find configuration! Use --config parameter to point to a JSON file generated by `semaphore setup`.
4ba5a67e371c:/#
4ba5a67e371c:/# semaphore --config /etc/semaphore/config.json
Semaphore UI is a beautiful web UI for Ansible.
Source code is available at https://github.com/ansible-semaphore/semaphore.
Complete documentation is available at https://ansible-semaphore.com.
Usage:
semaphore [flags]
semaphore [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
migrate Execute migrations
runner Run in runner mode
server Run in server mode
setup Perform interactive setup
user Manage users
vault Manage access keys and other secrets
version Print the version of Semaphore
Flags:
--config string Configuration file path
-h, --help help for semaphore
Use "semaphore [command] --help" for more information about a command.
4ba5a67e371c:/# semaphore server --config /etc/semaphore/config.json
Loading config
Validating config
Postgres semaphore@postgres semaphore_db
Tmp Path (projects home) /tmp/semaphore
Semaphore v2.10.22-e44910d-1721658561
Interface
Port :3000
Server is running
PANI[0000] listen tcp :3000: bind: address already in use
panic: (*logrus.Entry) 0xc000341110
goroutine 1 [running]:
github.com/sirupsen/logrus.(*Entry).log(0xc0003410a0, 0x0, {0xc000248a20, 0x2e})
/go/src/semaphore/vendor/github.com/sirupsen/logrus/entry.go:260 +0x491
github.com/sirupsen/logrus.(*Entry).Log(0xc0003410a0, 0x0, {0xc00009fc00?, 0xe8?, 0xb81fba?})
/go/src/semaphore/vendor/github.com/sirupsen/logrus/entry.go:304 +0x48
github.com/sirupsen/logrus.(*Logger).Log(0x1dde4c0, 0x0, {0xc00009fc00, 0x1, 0x1})
/go/src/semaphore/vendor/github.com/sirupsen/logrus/logger.go:204 +0x58
github.com/sirupsen/logrus.(*Logger).Panic(...)
/go/src/semaphore/vendor/github.com/sirupsen/logrus/logger.go:253
github.com/sirupsen/logrus.Panic(...)
/go/src/semaphore/vendor/github.com/sirupsen/logrus/exported.go:129
github.com/ansible-semaphore/semaphore/cli/cmd.runService()
/go/src/semaphore/cli/cmd/root.go:94 +0x997
github.com/ansible-semaphore/semaphore/cli/cmd.init.func6(0xc00016af00?, {0xc74890?, 0x4?, 0xc74894?})
/go/src/semaphore/cli/cmd/server.go:18 +0xf
github.com/spf13/cobra.(*Command).execute(0x1de0e40, {0xc00004fcc0, 0x2, 0x2})
/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 +0xf
4ba5a67e371c:/#
DB table output
root@7bc4436c0d6b:/# psql -U semaphore -d semaphore_db
psql (14.13 (Debian 14.13-1.pgdg120+1))
Type "help" for help.
semaphore_db=# \dt
List of relations
Schema | Name | Type | Owner
--------+------------------------------------+-------+-----------
public | access_key | table | semaphore
public | event | table | semaphore
public | event_backup_5784568 | table | semaphore
public | migrations | table | semaphore
public | option | table | semaphore
public | project | table | semaphore
public | project__environment | table | semaphore
public | project__integration | table | semaphore
public | project__integration_alias | table | semaphore
public | project__integration_extract_value | table | semaphore
public | project__integration_matcher | table | semaphore
public | project__inventory | table | semaphore
public | project__repository | table | semaphore
public | project__schedule | table | semaphore
public | project__template | table | semaphore
public | project__user | table | semaphore
public | project__view | table | semaphore
public | runner | table | semaphore
public | session | table | semaphore
public | task | table | semaphore
public | task__output | table | semaphore
public | user | table | semaphore
public | user__token | table | semaphore
(23 rows)
semaphore_db=#
semaphore_db=#
semaphore_db=#
semaphore_db=# SELECT id, username, email FROM "user";
id | username | email
----+-------------+------------------------
1 | serveradmin | [email protected]
(1 row)
semaphore_db=#
Additionally, I even tired to add a new user
120aac66ba70:/home/semaphore# semaphore user add --admin --login user123 --name User123 --email [email protected] --password jVWjQ7vUm1
I get the same following error
Loading config
Cannot Find configuration! Use --config parameter to point to a JSON file generated by `semaphore setup`.
120aac66ba70:/home/semaphore#
There is something wrong with the loading config task or something!
again the config.json file is good an accessible from within the container with no issue
120aac66ba70:/home/semaphore# more /etc/semaphore/config.json
{
"mysql": {
"host": "",
"user": "",
"pass": "",
"name": "",
"options": null
},
"bolt": {
"host": "",
"user": "",
"pass": "",
"name": "",
"options": null
},
"postgres": {
"host": "postgres:5432",
"user": "semaphore",
"pass": "/run/secrets/semaphore_db_password",
"name": "semaphore",
"options": {
"sslmode": "disable"
}
},
"dialect": "postgres",
"port": "",
"interface": "",
"tmp_path": "/tmp/semaphore",
"ssh_config_path": "",
--More-- (27% of 1893 bytes)
I can't tell you why semaphore says the configuration is missing, but it looks like you have a bit of misconfiguration with your passwords.
Looking at https://github.com/semaphoreui/semaphore/blob/v2.10.22/deployment/docker/server/server-wrapper#L47 if you want to pass e.g. SEMAPHORE_ADMIN_PASSWORD=/run/secrets/semaphore_admin_password as a file, you need to use SEMAPHORE_ADMIN_PASSWORD_FILE instead. The same goes for SEMAPHORE_DB_PASS.
Also, notice when you run this command:
I even tired to run semaphore user change-by-login --login serveradmin --password Pa$$word!01 I get semaphore user change-by-login --login serveradmin --password Pa$$wordexport LANG=C.UTF-8 Loading config Cannot Find configuration! Use --config parameter to point to a JSON file generated by semaphore setup. again!
The ! in Pa$$word!01 is expanded in bash to the last command you've run, in this case the resulting log gives you --password Pa$$wordexport LANG=C.UTF-8, so I'm guessing you just ran export LANG=C.UTF-8.
So either don't use a ! or wrap the string in single-quotes like here: https://stackoverflow.com/a/11025130/1104755