tinode / chat

Instant messaging platform. Backend in Go. Clients: Swift iOS, Java Android, JS webapp, scriptable command line; chatbots

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error starting gRPC call. HttpRequestException: No connection could be made because the target machine actively refused it. (127.0.0.1:6061) SocketException: No connection could be made because the target machine actively refused it.

Moghaddm opened this issue · comments

I am working with gRPC client of c# for work with tinode server using :

var httpHandler = new HttpClientHandler();
    httpHandler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;

using var channel = GrpcChannel.ForAddress("http://127.0.0.1:6061/", new GrpcChannelOptions { HttpHandler = httpHandler });

var client = new Lims.Chat.TinodeClient.Console.Plugin.PluginClient(channel);

client.Message(new Lims.Chat.TinodeClient.Console.MessageEvent()
{
    Msg = new Lims.Chat.TinodeClient.Console.ServerData() { },
    Action = Lims.Chat.TinodeClient.Console.Crud.Update
});

but when the action is done these exceptions has been occurred :

: 'Status(StatusCode="Unavailable", Detail="Error starting gRPC call. HttpRequestException: No connection could be made because the target machine actively refused it. (127.0.0.1:6061) SocketException: No connection could be made because the target machine actively refused it.", DebugException="System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it. (127.0.0.1:6061)")'

commented

Apparently, the server is listening for gRPC connection on a different port, not 6061. Or, to be precise, there is no listener on port 6061.

Please direct further questions to the forum.

i changed port into 6060 but still not working and i got new exception!

Grpc.Core.RpcException: 'Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: The HTTP/2 server sent invalid data on the connection. HTTP/2 error code 'PROTOCOL_ERROR' (0x1). (HttpProtocolError) HttpProtocolException: The HTTP/2 server sent invalid data on the connection. HTTP/2 error code 'PROTOCOL_ERROR' (0x1). (HttpProtocolError)", DebugException="System.Net.Http.HttpRequestException: The HTTP/2 server sent invalid data on the connection. HTTP/2 error code 'PROTOCOL_ERROR' (0x1). (HttpProtocolError)")'

image

commented

Please direct further questions to the forum.