You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "lshmouse (via GitHub)" <gi...@apache.org> on 2023/03/28 09:40:20 UTC
[GitHub] [incubator-devlake] lshmouse opened a new issue, #4800: [Bug][Config] Failed to parse database url with '#'
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: commits-unsubscribe@devlake.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-devlake] mindlesscloud commented on issue #4800: [Bug][Config] Failed to parse database url with '#'
Posted by "mindlesscloud (via GitHub)" <gi...@apache.org>.
mindlesscloud commented on issue #4800:
URL: https://github.com/apache/incubator-devlake/issues/4800#issuecomment-1486762536
Thank you for reporting this bug. We will investigate it and try to reproduce the issue . Once we have more information, we will update the issue and work on a fix.
--
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: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-devlake] klesh commented on issue #4800: [Bug][Config] Failed to parse database url with '#'
Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on issue #4800:
URL: https://github.com/apache/incubator-devlake/issues/4800#issuecomment-1488131205
Please encode the components (user/pass etc) before putting them into the URL, or they could be misinterpreted according to https://www.ietf.org/rfc/rfc1738.txt
There is nothing we can do if the given URL is malformed.
Close it for now, feel free to re-open it if you have different opinions.
--
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: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-devlake] klesh closed issue #4800: [Bug][Config] Failed to parse database url with '#'
Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh closed issue #4800: [Bug][Config] Failed to parse database url with '#'
URL: https://github.com/apache/incubator-devlake/issues/4800
--
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: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-devlake] mindlesscloud commented on issue #4800: [Bug][Config] Failed to parse database url with '#'
Posted by "mindlesscloud (via GitHub)" <gi...@apache.org>.
mindlesscloud commented on issue #4800:
URL: https://github.com/apache/incubator-devlake/issues/4800#issuecomment-1486860358
When it comes to user and password, you should use URL encoding. Substitute `#` with `%23`.
--
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: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org