Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: HTTP 409 Error When Deleting Terraform or OpenTofu Task Templates #2710

Open
1MoreTechGuy opened this issue Jan 24, 2025 · 1 comment
Assignees

Comments

@1MoreTechGuy
Copy link

Issue

After upgrading to version 2.11.X, Task Templates for Terraform and OpenTofu are unable to be deleted with an HTTP 409 error reported. These templates can be successfully created and ran. Only deleting these templates causes this error. All other default task template types delete with out issue. Downgrading to version 2.10.43 corrects the problem with these task templates being deleted.

Impact

Web-Frontend (what users interact with)

Installation method

Package

Database

BoltDB

Browser

Chrome

Semaphore Version

2.11.2-0e9490c-1735214524

Ansible Version

ansible [core 2.17.7]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/ryan/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/ryan/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.12.3 (main, Jan 17 2025, 18:03:48) [GCC 13.3.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True

Logs & errors

Jan 21 19:04:54 semaphore-prod-pve-01 systemd[1]: Started semaphore.service - Semaphore Ansible.
Jan 21 19:04:54 semaphore-prod-pve-01 semaphore[31987]: Loading config
Jan 21 19:04:54 semaphore-prod-pve-01 semaphore[31987]: Validating config
Jan 21 19:04:54 semaphore-prod-pve-01 semaphore[31987]: BoltDB /home/semaphore/database.boltdb
Jan 21 19:04:54 semaphore-prod-pve-01 semaphore[31987]: Tmp Path (projects home) /tmp/semaphore
Jan 21 19:04:54 semaphore-prod-pve-01 semaphore[31987]: Semaphore 2.11.2-0e9490c-1735214524
Jan 21 19:04:54 semaphore-prod-pve-01 semaphore[31987]: Interface
Jan 21 19:04:54 semaphore-prod-pve-01 semaphore[31987]: Port :3000
Jan 21 19:04:54 semaphore-prod-pve-01 semaphore[31987]: Server is running
Jan 21 19:05:00 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-21T19:05:00-06:00" level=error msg="websocket: close sent" fields.level=Error
Jan 21 19:05:00 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-21T19:05:00-06:00" level=error msg="close tcp 10.X.X.X:3000->10.1.1.185:55014: use of closed network connection" fields.level=Error
Jan 21 19:05:54 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-21T19:05:54-06:00" level=error msg="write tcp 10.X.X.X:3000->10.X.X.X:54244: use of closed network connection" fields.level=Error
Jan 21 19:05:54 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-21T19:05:54-06:00" level=error msg="close tcp 10.X.X.X:3000->10.X.X.X:54244: use of closed network connection" fields.level=Error
Jan 21 19:11:19 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-21T19:11:19-06:00" level=error msg="websocket: close sent" fields.level=Error
Jan 21 19:11:19 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-21T19:11:19-06:00" level=error msg="close tcp 10.X.X.X:3000->10.1.1.185:55030: use of closed network connection" fields.level=Error
Jan 21 19:11:21 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-21T19:11:21-06:00" level=error msg="websocket: close sent" fields.level=Error
Jan 21 19:11:21 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-21T19:11:21-06:00" level=error msg="close tcp 10.X.X.X:3000->10.1.1.185:56069: use of closed network connection" fields.level=Error
Jan 21 21:11:00 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-21T21:11:00-06:00" level=error msg="write tcp 10.X.X.X:3000->10.1.1.185:56071: use of closed network connection" fields.level=Error
Jan 21 21:11:00 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-21T21:11:00-06:00" level=error msg="close tcp 10.X.X.X:3000->10.1.1.185:56071: use of closed network connection" fields.level=Error
Jan 22 12:00:00 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-22T12:00:00-06:00" level=info msg="Task 2147482451 added to queue"
Jan 22 12:00:04 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-22T12:00:04-06:00" level=info msg="Set resource locker with TaskRunner 2147482451"
Jan 22 12:00:04 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-22T12:00:04-06:00" level=info msg="Task 2147482451 removed from queue"
Jan 22 12:00:54 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-22T12:00:54-06:00" level=error msg="remove /tmp/semaphore/inventory_2147482451: no such file or directory"
Jan 22 12:00:55 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-22T12:00:55-06:00" level=info msg="Stopped running TaskRunner 2147482451"
Jan 22 12:00:55 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-22T12:00:55-06:00" level=info msg="Release resource locker with TaskRunner 2147482451"
Jan 23 12:00:00 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-23T12:00:00-06:00" level=info msg="Task 2147482450 added to queue"
Jan 23 12:00:04 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-23T12:00:04-06:00" level=info msg="Set resource locker with TaskRunner 2147482450"
Jan 23 12:00:04 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-23T12:00:04-06:00" level=info msg="Task 2147482450 removed from queue"
Jan 23 12:00:43 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-23T12:00:43-06:00" level=error msg="remove /tmp/semaphore/inventory_2147482450: no such file or directory"
Jan 23 12:00:43 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-23T12:00:43-06:00" level=info msg="Stopped running TaskRunner 2147482450"
Jan 23 12:00:43 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-23T12:00:43-06:00" level=info msg="Release resource locker with TaskRunner 2147482450"
Jan 23 17:55:47 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-23T17:55:47-06:00" level=error msg="websocket: close sent" fields.level=Error
Jan 23 17:55:47 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-23T17:55:47-06:00" level=error msg="close tcp 10.X.X.X:3000->10.X.X.X:42440: use of closed network connection" fields.level=Error
Jan 23 18:04:16 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-23T18:04:16-06:00" level=error msg="websocket: close sent" fields.level=Error
Jan 23 18:04:16 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-23T18:04:16-06:00" level=error msg="close tcp 10.X.X.X:3000->10.X.X.X:43368: use of closed network connection" fields.level=Error
Jan 23 18:05:04 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-23T18:05:04-06:00" level=error msg="websocket: close sent" fields.level=Error
Jan 23 18:05:04 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-23T18:05:04-06:00" level=error msg="close tcp 10.X.X.X:3000->10.X.X.X:42066: use of closed network connection" fields.level=Error
Jan 23 18:05:21 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-23T18:05:21-06:00" level=error msg="websocket: close sent" fields.level=Error
Jan 23 18:05:21 semaphore-prod-pve-01 semaphore[31987]: time="2025-01-23T18:05:21-06:00" level=error msg="close tcp 10.X.X.X:3000->10.X.X.X:35386: use of closed network connection" fields.level=Error

Manual installation - system information

Server is a LXC Ubuntu 24.04 container running on Proxmox.

uname -a
Linux semaphore-prod-pve-01 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64 x86_64 x86_64 GNU/Linux

Configuration

config.json

{
 	"mysql": {
 		"host": "",
 		"user": "",
 		"pass": "",
 		"name": ""
 	},
 	"postgres": {
 		"host": "",
 		"user": "",
 		"pass": "",
 		"name": ""
 	},
 	"bolt": {
 		"host": "/home/semaphore/database.boltdb"
 	},
	"dialect":				"bolt",
 	"port": 				"",
 	"interface": 			"",
 	"tmp_path": 			"/tmp/semaphore",
 	"cookie_hash": 			"<REDACTED>",
 	"cookie_encryption": 	"<REDACTED>",
 	"access_key_encryption":"",
 	"email_sender": 				"<REDACTED>",
 	"email_host": 					"smtp.fastmail.com",
 	"email_port": 					"587",
 	"email_secure": 				true,
 	"email_username": 			"<REDACTED>",
 	"email_password": 			"<REDACTED>",
 	"web_host": 						"",
 	"ldap_binddn": 					"",
 	"ldap_bindpassword": 		"",
 	"ldap_server": 					"",
 	"ldap_searchdn": 				"",
 	"ldap_searchfilter": 		"",
 	"ldap_mappings": {
 		"dn": 	"",
 		"mail": "",
 		"uid": 	"",
 		"cn": 	""
 	},
 	"telegram_chat": 				"",
 	"telegram_token": 			"",
 	"concurrency_mode": 		"",
 	"max_parallel_tasks": 	0,
 	"email_alert": 					true,
 	"telegram_alert": 			false,
 	"slack_alert": 					false,
 	"ldap_enable": 					false,
 	"ldap_needtls": 				false,
 	"use_remote_runner": 		false,
	"git_client":           "go_git",
	
	"runner_registration_token": "<REDACTED>"
}

Additional information

I did try to run semaphore migrate to see if this was due to a change with the database, but that did not help or change the behavior in anyway.

@1MoreTechGuy
Copy link
Author

Here is some information that I grabbed from the web browser developer tools:

Console:

chunk-vendors.c901dcd6.js:1          DELETE http://semaphore:3000/api/project/1/templates/16 409 (Conflict)
(anonymous) @ chunk-vendors.c901dcd6.js:1
e.exports @ chunk-vendors.c901dcd6.js:1
e.exports @ chunk-vendors.c901dcd6.js:1
d.request @ chunk-vendors.c901dcd6.js:1
(anonymous) @ chunk-vendors.c901dcd6.js:1
remove @ app.6d4f0673.js:1
yes @ app.6d4f0673.js:1
rt @ chunk-vendors.c901dcd6.js:295
n @ chunk-vendors.c901dcd6.js:295
rt @ chunk-vendors.c901dcd6.js:295
An.e.$emit @ chunk-vendors.c901dcd6.js:295
yes @ app.6d4f0673.js:1
click @ app.6d4f0673.js:1
rt @ chunk-vendors.c901dcd6.js:295
n @ chunk-vendors.c901dcd6.js:295
rt @ chunk-vendors.c901dcd6.js:295
An.e.$emit @ chunk-vendors.c901dcd6.js:295
click @ chunk-vendors.c901dcd6.js:280
rt @ chunk-vendors.c901dcd6.js:295
n @ chunk-vendors.c901dcd6.js:295
s._wrapper @ chunk-vendors.c901dcd6.js:295

Payload?

{"id":16,"project_id":1,"inventory_id":9,"repository_id":2,"environment_id":3,"name":"Terraform Test Test","playbook":"","arguments":"[]","allow_override_args_in_task":false,"description":null,"vaults":[],"type":"","start_version":null,"build_template_id":null,"view_id":null,"last_task":null,"autorun":false,"git_branch":null,"survey_vars":null,"suppress_success_alerts":false,"app":"terraform","tasks":0,"task_params":null}

@fiftin fiftin added the bug label Jan 24, 2025
@fiftin fiftin self-assigned this Jan 24, 2025
@fiftin fiftin added terraform and removed bug labels Jan 24, 2025
@fiftin fiftin added this to Bugfixing Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants