Unhandled Exception: Service started: http://localhost:64881
System.Net.Http.HttpRequestException: Connection refused ---> System.Net.Sockets.SocketException: Connection refused
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
at System.Threading.Tasks.ValueTask`1.get_Result()
at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Threading.Tasks.ValueTask`1.get_Result()
at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask`1 creationTask)
at System.Threading.Tasks.ValueTask`1.get_Result()
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
at Gurux.DLMS.AMI.Startup.AddSchedule() in C:\vsts-agent-win7-x64-2.124.0\_work\39\s\Gurux.DLMS.AMI\Startup.cs:line 331
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
Aborted
New version is released. It's using .Net Core 3.1. .Net Core 2.1 was not working very well with some distros, like yours.
For some reason, "localhost" as target address still fails.
You need to change the client address as described above.
Now, after upgrading to the new version I get this warning:
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect.
Listening port:1000
Notifing port:4059
RestAddress: http://192.168.0.21:64881
Database type: SQLite
Connecting: Data Source=:memory:
Creating tables.
Service started: http://192.168.0.21:64881
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect.
+
+
+
Hi Fischer,
Hi Fischer,
I just tested this with Debian and we are getting the same error.
We'll check this. A new version is released during next week where this is fixed.
BR,
Mikko
Hi,
Hi,
For ad-hoc. Open appsettings.json.
Change this:
"Client": {
"Address": "http://localhost:64881"
},
to:
"Address": "http://YOU_IP_ADDRESS:64881"
I don't know why "localhost" doesn't work in linux, but I'll try to solve this.
BR,
Mikko
I tried. The same response,
I tried. The same response, just ip changed.
hostname -i
127.0.1.1 192.168.0.21
sudo dotnet Gurux.DLMS.AMI.dll
Listening port:1000
RestAddress: http://192.168.0.21:64881
Database type: SQLite
Connecting: Data Source=:memory:
Creating tables.
Unhandled Exception: Service started: http://192.168.0.21:64881
System.Net.Http.HttpRequestException: Connection refused ---> System.Net.Sockets.SocketException: Connection refused
.....
Hi,
Hi,
Do you have a firewall? I'll ask to install Ubuntu 18.04 and we'll try with that.
Can you also run this and post result here.
dotnet --version
BR,
Mikko
BR,
Mikko
$ dotnet --version
I know 2.2 is required, but I did "sudo apt install dotnet-sdk-2.2" and expected it would help...
$ dotnet --version
3.1.101
$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 3.1.101
Commit: b377529961
Runtime Environment:
OS Name: ubuntu
OS Version: 18.04
OS Platform: Linux
RID: ubuntu.18.04-x64
Base Path: /usr/share/dotnet/sdk/3.1.101/
Host (useful for support):
Version: 3.1.1
Commit: a1388f194c
.NET Core SDKs installed:
2.2.402 [/usr/share/dotnet/sdk]
3.1.101 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.2.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Hi,
Hi,
The new version is released next week where is support for .NET 3.1.
I believe that it fixes your problems.
BR,
Mikko
I changed the version adding
I changed the version adding global.json to "Gurux.DLMS.AMI directory".
Now the version is:
$ dotnet --version
2.2.402
but the response is still the same:
$ sudo dotnet Gurux.DLMS.AMI.dll
Listening port:1000
RestAddress: http://192.168.0.21:64881
Database type: SQLite
Connecting: Data Source=:memory:
Creating tables.
Unhandled Exception: Service started: http://192.168.0.21:64881
System.Net.Http.HttpRequestException: Connection refused ---> System.Net.Sockets.SocketException: Connection refused
...
Hi,
Hi,
New version is released. It's using .Net Core 3.1. .Net Core 2.1 was not working very well with some distros, like yours.
For some reason, "localhost" as target address still fails.
You need to change the client address as described above.
BR,
Mikko
Now, after upgrading to the
Now, after upgrading to the new version I get this warning:
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect.
Is it necessary to correct something?
(The web server http://192.168.0.21:64881/api/info is running.)
sudo dotnet Gurux.DLMS.AMI.dll
Listening port:1000
Notifing port:4059
RestAddress: http://192.168.0.21:64881
Database type: SQLite
Connecting: Data Source=:memory:
Creating tables.
Service started: http://192.168.0.21:64881
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect.
+
+
+
Hi,
Hi,
We have released a new version where we have improved data structures so .Net Core 3.1 for Linux can handle it.
BR,
Mikko