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: level=fatal msg="Error 1091 (42000) #2727

Open
gebele opened this issue Jan 31, 2025 · 5 comments
Open

Problem: level=fatal msg="Error 1091 (42000) #2727

gebele opened this issue Jan 31, 2025 · 5 comments
Assignees
Labels

Comments

@gebele
Copy link

gebele commented Jan 31, 2025

Issue

ansiblesemaphore  | Executing migration v2.12.3 (at 2025-01-31 14:37:29.624649402 +0000 UTC m=+0.028113051)...
ansiblesemaphore  | time="2025-01-31T14:37:29Z" level=warning msg="\n ERR! Query: alter table `task__output` drop `task`\n\n"
ansiblesemaphore  | time="2025-01-31T14:37:29Z" level=fatal msg="Error 1091 (42000): Can't DROP 'task'; check that column/key exists"

Based on docker-compose from the manual and using the latest tag the compose stack doesn't work anymore ?
Probably related to the latest image releases ? The mentioned table in mysql database doesn't have a table columne. Adding one by hand also doesn't resolve the isse. mysql:8.0.36

After setting the image tag to v2.11.3 the stack thankfully came back. But no login credentials working anymore.

Thanks

Impact

Docker

Installation method

Docker

Database

MySQL

Browser

No response

Semaphore Version

latest docker image

Ansible Version

Logs & errors

No response

Manual installation - system information

No response

Configuration

No response

Additional information

No response

@gebele
Copy link
Author

gebele commented Feb 3, 2025

Same issue with the newest image v2.12.4-ansible2.16.5 pushed 3h ago.

ansiblesemaphore exited with code 0
ansiblesemaphore  | Executing migration v2.12.3 (at 2025-02-03 09:41:09.203078472 +0000 UTC m=+0.026192810)...
ansiblesemaphore  | time="2025-02-03T09:41:09Z" level=warning msg="\n ERR! Query: alter table `task__output` drop `task`\n\n"
ansiblesemaphore  | time="2025-02-03T09:41:09Z" level=fatal msg="Error 1091 (42000): Can't DROP 'task'; check that column/key exists"
ansiblesemaphore exited with code 0
ansiblesemaphore exited with code 1

@fiftin fiftin self-assigned this Feb 3, 2025
@fiftin fiftin added the critical label Feb 4, 2025
@fiftin
Copy link
Collaborator

fiftin commented Feb 4, 2025

Hi @gebele

Can you check table task__output in the database? Is there column task? What version of MySQL do you use?

What version of Semaphore did you use before upgrade?

Problem can be not it this query, but in the next one. Can you add column task varchar(100) to table task__output and start Semaphore again? What error do you see now?

@DevAlphaKilo
Copy link
Contributor

DevAlphaKilo commented Feb 12, 2025

Hi @fiftin, I'm also having the same issue. Same error listed above, same authentication error described after downgrading.

What version of Semaphore did you use before upgrade?

Currently running via Docker. I'm migrating from v2.11.2.

Here are the results of me attempting to login after different version changes.

v2.10.43 also provides a 401 unauthorized, logs indicated LDAP authentication was successful.

v2.11.2 (starting) redirects back to the login screen, logs indicated LDAP authentication was successful.

v2.11.3 redirects back to the login screen, logs indicated LDAP authentication was successful.

v2.12.3 redirects back to the login screen, logs indicated LDAP authentication was successful.

v2.12.8 redirects back to the login screen, logs indicated LDAP authentication was successful.

I'm now not able to login under my local_admin account or my LDAP account. Weird part is that LDAP authentication appears to be working according to the logs.

time="2025-02-12T15:10:09Z" level=info msg="User ~redacted~ with email ~redacted~ authorized via LDAP correctly"

What version of MySQL do you use?

Server version: 8.0.41 MySQL Community Server - GPL

Can you check table task__output in the database? Is there column task?

Yes, there is no task column in the task__output table. Output below.

mysql> SELECT * FROM task__output LIMIT 1;
+--------+---------+---------------------+--------------------------+
| id     | task_id | time                | output                   |
+--------+---------+---------------------+--------------------------+
| 282479 |    1118 | 2023-01-10 21:36:20 | Task 1118 added to queue |
+--------+---------+---------------------+--------------------------+
1 row in set (0.00 sec)

Can you add column task varchar(100) to table task__output and start Semaphore again?

Yes, I used this code to modify the table as suggested with no successful results.

ALTER TABLE task__output
ADD COLUMN `task` VARCHAR(100) NOT NULL AFTER `id`;

Output after altering the table:

mysql> ALTER TABLE task__output
    -> ADD COLUMN `task` VARCHAR(100) NOT NULL AFTER `id`;
Query OK, 0 rows affected (0.55 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> SELECT * FROM task__output LIMIT 1;
+--------+------+---------+---------------------+--------------------------+
| id     | task | task_id | time                | output                   |
+--------+------+---------+---------------------+--------------------------+
| 282479 |      |    1118 | 2023-01-10 21:36:20 | Task 1118 added to queue |
+--------+------+---------+---------------------+--------------------------+
1 row in set (0.00 sec)

What error do you see now?

Result after inserting the column into the table and restarting.

Seemingly the same issue.

No additional python dependencies to install
Starting semaphore server
Loading config
Validating config
Executing migration v2.12.3 (at 2025-02-12 14:59:03.934651729 +0000 UTC m=+0.196454756)...
[mysql] 2025/02/12 14:59:19 connection.go:49: unexpected EOF
time="2025-02-12T14:59:19Z" level=warning msg="invalid connection"
time="2025-02-12T14:59:19Z" level=warning msg="\n ERR! Query: alter table `task__output` drop `task`\n\n"
time="2025-02-12T14:59:19Z" level=fatal msg="invalid connection"

Different table/column issue.

Executing migration v2.12.3 (at 2025-02-12 16:12:50.481390782 +0000 UTC m=+0.169708800)...
[mysql] 2025/02/12 16:13:20 connection.go:49: unexpected EOF
time="2025-02-12T16:13:20Z" level=warning msg="invalid connection"
time="2025-02-12T16:13:20Z" level=warning msg="\n ERR! Query: alter table `task__output` change `id` `id` bigint auto_increment not null\n\n"
time="2025-02-12T16:13:20Z" level=fatal msg="invalid connection"

Not sure what to make of the different errors really.

Looking forward to your feedback.

@gebele
Copy link
Author

gebele commented Feb 17, 2025

@fiftin I was unavailable for a few days, but luckily @DevAlphaKilo has already answered. Any news on this ?

@fiftin
Copy link
Collaborator

fiftin commented Feb 23, 2025

Hi, sorry I missed your answers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants