lshmouse opened a new issue, #4800:
URL: https://github.com/apache/incubator-devlake/issues/4800

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   The actual db url is : 
mysql://devlake_dbw:devlake#2023@xxxxx/devlake?charset=utf8mb4&parseTime=True 
for a external mysql database
   The lake failed to start with following error.
   ```
   panic: parse "mysql://devlake_dbw:devlake": invalid port ":devlake" after 
host
   Wraps: (2) parse "mysql://devlake_dbw:devlake"
   Wraps: (3) invalid port ":devlake" after host
   Error types: (1) *hintdetail.withDetail (2) *url.Error (3) 
*errors.errorString
   goroutine 1 [running]:
   github.com/apache/incubator-devlake/core/runner.CreateAppBasicRes()
    /app/core/runner/basic_res.go:50 +0x231
   github.com/apache/incubator-devlake/server/services.InitResources()
    /app/server/services/init.go:54 +0x45
   github.com/apache/incubator-devlake/server/services.Init()
    /app/server/services/init.go:80 +0x2b
   github.com/apache/incubator-devlake/server/api.CreateApiService()
    /app/server/api/api.go:57 +0x2e
   main.main()
    /app/server/main.go:39 +0x7e
   ```
   
   The reason is that url.Parse failed to parse url with #
   ```
        u, err := url.Parse(dbUrl)
        if err != nil {
                return nil, errors.Convert(err)
        }
   ```
   
   ### What do you expect to happen
   
   The lake start success with db url with '#' char
   
   ### How to reproduce
   
   Set username or password with '#'
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   main
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to