Giving me error as below
Windows:
docker run --rm -it -e "Database:Type=MySQL" -e "Database:Settings=Server=localhost;Database=testDb;UID=new_user;Password=password" -e "IdentityServer:Key:Type=Development" -p 8000:80 -p 8001:443 -e ASPNETCORE_URLS="https://+;http://+" -e ASPNETCORE_HTTPS_PORT=8001 -e ASPNETCORE_ENVIRONMENT=Development -e ASPNETCORE_Kestrel__Certificates__Default__Password="NewPasswd" -e ASPNETCORE_Kestrel__Certificates__Default__Path=/https/Gurux.DLMS.AMI.Server.pfx -v $env:USERPROFILE.aspnet/https:/https/guruxorg/guruxdlmsamiserver:latest
Unhandled exception. MySql.Data.MySqlClient.MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.
---> System.Net.Sockets.SocketException (111): Connection refused
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Threading.Tasks.ValueTask.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state)
--- End of stack trace from previous location ---
and Mysql is working fine
sh-4.4# mysql -h localhost -u new_user -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 8.0.32 MySQL Community Server - GPL
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Please helpe me to run the container
Hi, Your MySQL server is not…
Hi,
Your MySQL server is not available for the docker. Are you running MySQL on the docker? Have you created testDb database and added access right for the user?
BR,
Mikko
Thanks Mikko i am able to…
Thanks Mikko i am able to now connect to testdb . i am running MySQL outside the docker and when i provide my machin Ip address in the HOST it resolved the issue
Hi, I am deploying this…
Hi,
I am deploying this docker instance to Gurux.DLMS.AMI and I have the following error with Mysql
C:\Users\Andres.Robles>docker run --rm -it -e "Database:Type=MySQL" -e "Database:Settings=Server=172.21.224.1;Database=ami;UID=ami;Password=password" -e "IdentityServer:Key:Type=Development" -p 8000:80 -p 8001:443 -e ASPNETCORE_URLS="https://+;http://+" -e ASPNETCORE_HTTPS_PORT=8001 -e ASPNETCORE_ENVIRONMENT=Development -e ASPNETCORE_Kestrel__Certificates__Default__Password="AMI1234" -e ASPNETCORE_Kestrel__Certificates__Default__Path=/https/Gurux.DLMS.AMI.Server.pfx -v %USERPROFILE%\.aspnet\https:/https/ guruxorg/guruxdlmsamiserver:latest
Creating tables.
Unhandled exception. MySql.Data.MySqlClient.MySqlException (0x80004005): Table 'gxsystemlog' already exists
at MySql.Data.MySqlClient.MySqlStream.ReadPacketAsync(Boolean execAsync)
at MySql.Data.MySqlClient.NativeDriver.GetResultAsync(Int32 affectedRow, Int64 insertedId, Boolean execAsync)
at MySql.Data.MySqlClient.Driver.GetResultAsync(Int32 statementId, Int32 affectedRows, Int64 insertedId, Boolean execAsync)
at MySql.Data.MySqlClient.Driver.NextResultAsync(Int32 statementId, Boolean force, Boolean execAsync)
at MySql.Data.MySqlClient.MySqlDataReader.NextResultAsync(Boolean execAsync, CancellationToken cancellationToken)
at MySql.Data.MySqlClient.MySqlDataReader.NextResultAsync(Boolean execAsync, CancellationToken cancellationToken)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReaderAsync(CommandBehavior behavior, Boolean execAsync, CancellationToken cancellationToken)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReaderAsync(CommandBehavior behavior, Boolean execAsync, CancellationToken cancellationToken)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReaderAsync(CommandBehavior behavior, Boolean execAsync, CancellationToken cancellationToken)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQueryAsync(Boolean execAsync, CancellationToken cancellationToken)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
at Gurux.Service.Orm.GXDbConnection.ExecuteNonQuery(IDbConnection connection, IDbTransaction transaction, String query)
at Gurux.Service.Orm.GXDbConnection.TableCreation(IDbConnection connection, Boolean create, IDbTransaction transaction, GXTableCreateQuery table, List`1 created)
at Gurux.Service.Orm.GXDbConnection.CreateTable(IDbConnection connection, IDbTransaction transaction, Type type, Dictionary`2 tables)
at Gurux.Service.Orm.GXDbConnection.CreateTable(IDbTransaction transaction, Type type, Boolean relations, Boolean overwrite)
at Gurux.DLMS.AMI.Server.ServerSettings.ConnectToDb(WebApplicationBuilder builder, ILogger`1 logger) in /src/Gurux.DLMS.AMI/Server/ServerSettings.cs:line 809
at Program.<Main>$(String[] args) in /src/Gurux.DLMS.AMI/Server/Program.cs:line 95
at Program.<Main>(String[] args)
thanks,
Hi, I have solved the…
Hi,
I have solved the problem related to Mysql, I have created a username to access the Gurux.AMI web interface but it tells me that There was an error trying to log you in: ''
Do I need to do something? or what could it be?
Hi arobles, Please, create a…
Hi arobles,
Please, create a new topic when you have a new question.
Have you registered your user?
BR,
Mikko