cloudfoundry / cloudfoundry/stratos

MySql database fails to run.

Open
#5,116 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
267
Forks
137
Avg merge
5h 14m
Merged PRs (30d)
77

Description

MySql database fails to run.

FATA[Mon May 19 18:05:15 UTC 2025] ERROR 20240818042100_RetryEndpointCACert.go: failed to run Go migration function func(*sql.Tx) error: Error 1054 (42S22): Unknown column '$1' in 'where clause'

18:05:16.094 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | Starting Stratos ... 18:05:16.094 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] ======================================== 18:05:16.094 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] === Stratos Jetstream Backend Server === 18:05:16.094 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] ======================================== 18:05:16.094 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] 18:05:16.094 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] Initialization started. 18:05:16.094 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] Configuration loaded. 18:05:16.094 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] Stratos Version: 4.8.1 18:05:16.094 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] HTTP client initialized. 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] Encryption key set. 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] Found 1 database service instances 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] Using first database service instance: stratos-db 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] Attempting to apply Cloud Foundry database service config from VCAP_SERVICES credentials 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] Applied Cloud Foundry database service config (provider: mysql) 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] Using Cloud Foundry DB service 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] Setting SSL Mode for mysql: false 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] stratos:*********@tcp(sql-db.service.cf.internal:3306)/stratos?parseTime=true&tls=false 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] Database appears to now be available. 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] Database connection pool created. 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] Skipping DB migration => not index 0 (0) 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | WARN[Mon May 19 18:05:15 UTC 2025] When running in production, ensure you set SESSION_STORE_SECRET to a secure value 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] ======================== 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] = Stratos DB Migration = 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] ======================== 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] Database provider: &{} 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | INFO[Mon May 19 18:05:15 UTC 2025] Current 20210201110000 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | FATA[Mon May 19 18:05:15 UTC 2025] ERROR 20240818042100_RetryEndpointCACert.go: failed to run Go migration function func(*sql.Tx) error: Error 1054 (42S22): Unknown column '$1' in 'where clause' 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | Exit status 1 18:05:16.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | Exit status 143 18:05:22.094 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | Cell 0abf0531-9e2b-4b4e-b9c4-3461857d5821 stopping instance 0f9b072d-b648-4486-4f44-3f14 18:05:22.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | Cell 0abf0531-9e2b-4b4e-b9c4-3461857d5821 destroying container for instance 0f9b072d-b648-4486-4f44-3f14 18:05:22.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | Process has crashed with type: "web" 18:05:22.594 [parallel-1] INFO o.l.c.c.c.ApplicationController - stratos | App instance exited with guid 69f292d0-a59b-4020-b87e-3a314a137d44 payload: {"instance"=>"0f9b072d-b648-4486-4f44-3f14", "index"=>0, "cell_id"=>"0abf0531-9e2b-4b4e-b9c4-3461857d5821", "reason"=>"CRASHED", "exit_description"=>"APP/PROC/WEB: Exited with status 1", "crash_count"=>1, "crash_timestamp"=>1747677921384643071, "version"=>"23464164-59f4-466f-929c-00c2e4adb5db"}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with 20240818042100_RetryEndpointCACert.go and reproduce the migration failure against MySQL using the reported startup path. Trace the migration's SQL execution and verify the migration completes without the Error 1054 '$1' failure, allowing Stratos to start successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, mysql
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.