piotr-rojek / devopsifyme-sbemulator

MIT License
66 stars 12 forks source link

No connection could be made. #17

Open thedassi opened 1 year ago

thedassi commented 1 year ago

Good day,

I have been trying to run this emulator locally but i keep on getting an error of No connection could be made because the target machine actively refused it. (localhost:443) but my connection string is exactly like the one you provided. i tried both implementations with even specifying the port but no luck. I'm not sure if it's something I'm missing.
Endpoint=sb://localhost:5671;SharedAccessKeyName=all;SharedAccessKey=CLwo3FQ3S39Z4pFOQDefaiUd1dSsli4XOAj3Y9Uh1E=;EnableAmqpLinkRedirect=false Endpoint=sb://localhost/;SharedAccessKeyName=all;SharedAccessKey=CLwo3FQ3S39Z4pFOQDefaiUd1dSsli4XOAj3Y9Uh1E=;EnableAmqpLinkRedirect=false

piotr-rojek commented 1 year ago

hey @thedassi, which sdk/library/framework are you using?

kreciol commented 1 year ago

Hi,

I have the same error. I am using MassTransit in .NET Core 6.

thedassi commented 1 year ago

hey @thedassi, which sdk/library/framework are you using?

Im using MassTransit in .NET Core 7.

piotr-rojek commented 1 year ago

hey, sorry for late answer. So with MassTransit you are better off connecting directly to RabbitMQ with MT, as it does far better job talking to RMQ, than this emulator does translating SB <> RMQ. What is more, currently emulator does not support management API, which is why you are getting error with port 443.

jay68uk commented 1 year ago

@piotr-rojek you've done a great job on this. Wondering what would it take to get the emulator working with MT? The reason I'm asking is that for our local dev envs. and pipeline tests I want to just have AZ SB configured and not have to add in RMQ directly.

I would have a go at getting it working but I don't know enough about this to be useful. The best I got was exposing 443 so I could get a different error :-) RequestFailedException: The SSL connection could not be established, see inner exception

jeff-becker-projekt202 commented 1 year ago

I've found this problem to be caused by the server loading a certificate without a private key. Turns out that .net will let you set up an SslStream listener using a certificate without a private key -- then just refuse all connections through that socket with "connection forcibly closed ..."

MuhammadMustafa-IS commented 1 week ago

I'm using Azure.Messaging.ServiceBus package and it's giving me that error too

Edit: NVM I was using AMPQWebSockets not TCP