krakend / krakend-amqp

AMQP compatible backend for the KrakenD framework
https://www.krakend.io
Apache License 2.0
10 stars 16 forks source link

Unsupported Protocol Scheme #6

Closed emilianozublena closed 3 years ago

emilianozublena commented 3 years ago

Hi everyone! first of all, awesome products you've been building. So we're thinking on using KrakenD as our API Gateway, and since we have a message-driven API built on top of RabbitMQ for our internal communication between services, we've been looking into using this plugin to allow external parties to call a rest endpoint and Kraken to transport to AMQP and so on.. Everything looks good, we've installed Kraken as a standalone daemon and the plugin works fine, but as soon as we put together a Docker image (we have everything containerized) we started hitting this error with the exact same configurations for everything:

gateway_1     | [GIN] 2021/01/13 - 13:55:38 | 500 |     170.544µs |    192.168.32.1 | GET      /testpub2
gateway_1     | Error #01: Get amqp://minpoc:***@messagebus:5672/: unsupported protocol scheme "amqp"

Running kraken with --debug throws a more descriptive error. Still unsure what's causing it though

[GIN] 2021/01/13 - 14:06:17 | 500 |      66.303µs |    192.168.32.1 | GET      /testpub2
Error #01: Exception (504) Reason: "channel/connection is not open"

I haven't been able to find anything anywhere about this, any ideas??

Thanks a lot!

emilianozublena commented 3 years ago

Hi @kpacha me again, did any of you had any time to take a look at the issue mentioned above here?

Thanks again!

kpacha commented 3 years ago

check your startup logs. I think you'll find an error regarding your amqp connection (it's the most common scenario). Depending on the reason, it could be a line like this:

▶ ERROR AMQP: getting the channel for amqp://XXX:YYY@rabbit:5672/queue-name: dial tcp: lookup rabbit: Temporary failure in name resolution
emilianozublena commented 3 years ago

Will check tmw and get back to you, thanks a lot!

emilianozublena commented 3 years ago

We nailed it, basically our docker was initializing krakend before rabbitmq was up, thus throwing those errors... Thanks for pinpointing in the right direction @kpacha