Hi
Is there any tutorial on how to compile and use the Gurux DLMS AMI?
I've downloaded the files from Github, and I've compile using dotnet with the following command:
dotnet build Gurux.DLMS.AMI.sln
the build was successful and I can find the Gurux.DLMS.AMI.dll inside the bin->debug->netcoreapp3.1
Then I try to run dotnet Gurux.DLMS.AMI.dll and got the following error:
Unhandled exception. fail: Gurux.DLMS.AMI.Reader.ReaderService[0]
Failed to connect to the DB server.
fail: Gurux.DLMS.AMI.Reader.ReaderService[0]
Failed to connect to the DB server.
Question:
1. Where can I edit details of the database?
2. How can I run Gurux.DLMS.AMI.UI ? Do I need to compile again?
3. Can I read serial connection on Gurux.DLMS.AMI?
4. From Gurux AMI youtube, I can see that your GuruxDirector has a data concentrator tab menu. My GuruxDirector don't have this tab. How can I get the tab?
Thanks in advance.
Regards,
Fariq
Hi Fariq, Make sure that you…
Hi Fariq,
Make sure that you have downloaded the Gurux.DLMS.AMI4 from here:
https://github.com/Gurux/Gurux.DLMS.AMI4
Check this:
https://www.gurux.fi/gurux.dlms.ami4
You can also use docker if you are interested.
BR,
Mikko
I've downloaded the AMI 4…
I've downloaded the AMI 4 Image using docker. Try to run it after I editted the appsetting.json (edit the database setting), and got the following error:
2023-04-28 12:13:57 Unhandled exception. MySql.Data.MySqlClient.MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.
2023-04-28 12:13:57 ---> System.ArgumentException: The host name or IP address is invalid.
2023-04-28 12:13:57 at MySql.Data.Common.StreamCreator.GetTcpStreamAsync(MySqlConnectionStringBuilder settings, CancellationToken cancellationToken, Boolean execAsync)
2023-04-28 12:13:57 at MySql.Data.Common.StreamCreator.GetStreamAsync(MySqlConnectionStringBuilder settings, CancellationToken cancellationToken, Boolean execAsync)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.NativeDriver.OpenAsync(Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.NativeDriver.OpenAsync(Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.Driver.OpenAsync(Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.Driver.CreateAsync(MySqlConnectionStringBuilder settings, Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.Driver.CreateAsync(MySqlConnectionStringBuilder settings, Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnectionAsync(Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.MySqlPool.GetPooledConnectionAsync(Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.MySqlPool.TryToGetDriverAsync(Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.MySqlPool.GetConnectionAsync(Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.MySqlConnection.OpenAsync(Boolean execAsync, CancellationToken cancellationToken)
2023-04-28 12:13:57 at MySql.Data.MySqlClient.MySqlConnection.Open()
2023-04-28 12:13:57 at Gurux.Service.Orm.GXDbConnection..ctor(DbConnection[] connections, String tablePrefix)
2023-04-28 12:13:57 at Gurux.DLMS.AMI.Server.ServerSettings.ConnectToDb(WebApplicationBuilder builder, ILogger`1 logger) in /src/Gurux.DLMS.AMI/Server/ServerSettings.cs:line 640
2023-04-28 12:13:57 at Program.<Main>$(String[] args) in /src/Gurux.DLMS.AMI/Server/Program.cs:line 95
2023-04-28 12:13:57 at Program.<Main>(String[] args)
I've editted the following setting:
"Type": "MySql"
"Settings": "Server=localhost;Database=dlms;UID=root@localhost;Password="
please help.
Hi, You don't have MySQL…
Hi,
You don't have MySQL running in your PC or there is a firewall that blocks the connection.
BR,
Mikko
I have xampp running at the…
I have xampp running at the moment.
I also have check the firewall, it allows docker to run through.
Hi, You can't connect fo…
Hi,
You can't connect fo MySQL with root user from the different PC. Only local connections are allowed for the root user with MySQL.
You need to create a new user and access rights for the database for it.
BR,
Mikko
Hi Mikko, I'm trying to…
Hi Mikko,
I'm trying to connect from the same pc (mysql & docker are in the same pc), but still getting the error.
I've ditched the xampp. Now I'm using the official MySQL Workbench.
Can I post the picture?
Dear Mikko, I'm still stuck…
Dear Mikko,
I'm still stuck at database.
It still give me error server was not found.
Hi Fariq, Because you are…
Hi Fariq,
Because you are using docker it's not in the same PC and for that reason you can't use root as a password. You need to create a new user.
BR,
Mikko
Hi Fariq, You can run this…
Hi Fariq,
You can run this on your workbench to create a new user with absolute privileges.
create user 'myuser'@'%' identified by 'password';
grant all privileges on *.* to 'myuser'@'%' with grant option;
flush privileges;
When this is created, then run your docker image with the user and password you created.