dotnetcore / AgileConfig

基于.NET Core开发的轻量级分布式配置中心 / .NET Core lightweight configuration server
MIT License
1.51k stars 302 forks source link

Can not start docker when passwod contains special char #41

Closed zhujiancc closed 3 years ago

zhujiancc commented 3 years ago

System Centos7 Docker Cmd

docker run -d \
-e adminConsole=true \
-e db:provider=sqlserver \
-e db:conn="Data Source=****;Initial Catalog=****;User ID=****;Password=!@#$%^789" \
-p 8235:5000 \
-v /etc/localtime:/etc/localtime  \
kklldog/agile_config:latest

Error

【主库】恢复检查时间:08/11/2021 10:51:47
Unhandled exception. System.TypeInitializationException: The type initializer for 'AgileConfig.Server.Data.Freesql.FreeSQL' threw an exception.
 ---> System.Exception: 【主库】状态不可用,等待后台检查程序恢复方可使用。A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)
 ---> System.Exception: 【主库】状态不可用,等待后台检查程序恢复方可使用。A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)
   at FreeSql.Internal.ObjectPool.ObjectPool`1.getFree(Boolean checkAvailable)
   at FreeSql.Internal.ObjectPool.ObjectPool`1.Get(Nullable`1 timeout)
   at FreeSql.Internal.CommonProvider.AdoProvider.ExecuteScalar(DbConnection connection, DbTransaction transaction, CommandType cmdType, String cmdText, DbParameter[] cmdParms)
   --- End of inner exception stack trace ---
   at FreeSql.Internal.CommonProvider.AdoProvider.LoggerException(IObjectPool`1 pool, PrepareCommandResult pc, Exception ex, DateTime dt, StringBuilder logtxt, Boolean isThrowException)
   at FreeSql.Internal.CommonProvider.AdoProvider.ExecuteScalar(DbConnection connection, DbTransaction transaction, CommandType cmdType, String cmdText, DbParameter[] cmdParms)
   at FreeSql.Internal.CommonProvider.AdoProvider.ExecuteScalar(String cmdText, Object parms)
   at AgileConfig.Server.Data.Freesql.EnsureTables.ExistTable(IFreeSql instance) in /src/AgileConfig.Server.Data.Freesql/EnsureTables.cs:line 44
   at AgileConfig.Server.Data.Freesql.EnsureTables.Ensure(IFreeSql instance) in /src/AgileConfig.Server.Data.Freesql/EnsureTables.cs:line 55
   at AgileConfig.Server.Data.Freesql.FreeSQL..cctor() in /src/AgileConfig.Server.Data.Freesql/FreeSQL.cs:line 18
   --- End of inner exception stack trace ---
   at AgileConfig.Server.Data.Freesql.FreeSQL.get_Instance() in /src/AgileConfig.Server.Data.Freesql/FreeSQL.cs:line 20
   at AgileConfig.Server.Service.RemoteServerNodeProxy.GetGerverNodeService() in /src/AgileConfig.Server.Service/RemoteServerNodeProxy.cs:line 38
   at AgileConfig.Server.Service.RemoteServerNodeProxy.TestEchoAsync() in /src/AgileConfig.Server.Service/RemoteServerNodeProxy.cs:line 242
   at AgileConfig.Server.Apisite.Program.Main(String[] args) in /src/AgileConfig.Server.Apisite/Program.cs:line 36

Even I use double or single quotes to handle password , it also doesn't work. Please have a check.

zhujiancc commented 3 years ago

I change a normal password , it also does not work . but when I use mysql , it is ok.
Is it a bug for sqlserver or something wrong for me

zhujiancc commented 3 years ago

Sorry , it is caused by our database.