question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improperly formed default mime type causes connection error when connecting to spring-boot rsocket server

See original GitHub issue

Hi everyone,

I have a Spring Boot RSocket server and I am unable to connect to it with your example. I got a rejected Setup : 0000 Error {000}: [00000003] Invalid mime type “binary”: does not contain ‘/’ I tried some options in RSocketOptions but alyaws the same error

Here is my spring server config :

spring:
  rsocket:
    server:
      port: 7000
      transport: tcp

Here is my dotnet program


var client = new RSocketClient(new SocketTransport("tcp://localhost:7000"), new RSocketOptions(){ InitialRequestSize = 3 });
			//var client = new RSocketClient(new WebSocketTransport("ws://localhost:9092/"), new RSocketOptions() { InitialRequestSize = 3 });
			//var client = new RSocketClient(loopback);
			await client.ConnectAsync();

The server is working, I did manage to handle RSocket data with another spring boot client.

Thanks for your help !

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
OlegDokukacommented, Feb 12, 2021

@foyss can you try passing options directly into ConnectAsync

var client = new RSocketClient(new WebSocketTransport("ws://127.0.0.1:7000/quotes"));

await client.ConnectAsync(new RSocketOptions() { 
    InitialRequestSize = 3,
    DataMimeType = "application/x-binary",
    MetadataMimeType = "application/x-binary"
});

that should fix your problem

1reaction
OlegDokukacommented, Sep 7, 2020

Hi @broadside74 !

We have improperly formed mime-type which should be application/octet-stream instead of binary

Thanks for finding that. Feel free to create a PR or otherwise I will do that shortl.

Cheers, Oleh

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while connecting to Spring Boot RSocket server from ...
The problem is inside mime types. In your case server awaits CBOR but you proceed application/json. The code solution: change the way of ......
Read more >
26. WebSocket Support
The WebSocket protocol RFC 6455 defines an important new capability for web applications: full-duplex, two-way communication between client and server.
Read more >
rsocket.pdf
For metadata, the default mime type is composite metadata which allows multiple metadata value and mime type pairs per request. Typically both don't...
Read more >
SQL error messages and exceptions
A connection could not be established because the server name (SRVNAM) has a length of zero or is larger than the maximum allowed...
Read more >
(56) Recv failure: Connection reset by peer curl
Facebook connection reset by peer. krbserver. It may well be a firewall denial, an SSL handshake failure, a proxy problem or even an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found