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.

Getting 503 Service Unavailable despite working consumer (deploy on Openshift).

See original GitHub issue

I set up Hono on Openshift (precisely on Minishift) using your tutorial on this site: Eclipse Hono deployment on Openshift.

And with deployment I’ve got no problems. But then I’ve tried create a Consumer and send some telemetry data.

To create consumer I have run Maven using line:

mvn spring-boot:run -Drun.arguments=--hono.client.host=192.168.99.100,--hono.client.port=30672,--hono.client.username=consumer@HONO,--hono.client.password=verysecret

(where 192.168.99.100 is local address of Minishift).

Then, I’ve registered device, and tried to send some telemetry (using curl). Every time I’ve tried to do that, I’ve got a message:

503 Service Unavailable
Hono-Reg-Assertion: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI0NzE0IiwidGVuIjoiREVGQVVMVF9URU5BTlQiLCJleHAiOjE1MDQwNDE5MTd9.NJn38zeSh7laZ5T5TRm0ZMHpAx-EVzgPPCThJpPO9cs
Retry-After: 2
Content-Type: text/plain
Content-Length: 47

resource limit exceeded, please try again later

I know that I should receive this answer at first time, but I’m receiving it every time – despite that consumer is working. I have tried sending message using mosquito too and it hadn’t throw any errors (in terminal). But there were no message in consumer at all.

I have also checked logs in Openshift pods, to see what’s happening there. Here is log, when I’m trying to send something to REST Adapter:

12:14:00.577 [vert.x-eventloop-thread-0] DEBUG o.e.hono.client.impl.HonoClientImpl - reusing existing message sender [target: telemetry/DEFAULT_TENANT, credit: 0]
12:14:00.577 [vert.x-eventloop-thread-0] DEBUG o.e.hono.client.impl.HonoClientImpl - reusing existing registration client for [DEFAULT_TENANT]
12:14:00.583 [vert.x-eventloop-thread-0] DEBUG o.e.h.c.i.AbstractRequestResponseClient - received response [correlation ID: reg-client-1, status: 200]
12:14:00.583 [vert.x-eventloop-thread-0] DEBUG o.e.h.a.h.AbstractVertxBasedHttpProtocolAdapter - Service unavailable: resource limit exceeded, please try again later

And here is log, when I’m trying to send something to MQTT Adapter:

12:10:03.685 [vert.x-eventloop-thread-0] INFO  o.e.h.a.m.VertxBasedMqttProtocolAdapter - connection request from client 4714
12:10:03.686 [vert.x-eventloop-thread-0] DEBUG o.e.hono.client.impl.HonoClientImpl - creating new registration client for [DEFAULT_TENANT]
12:10:03.686 [vert.x-eventloop-thread-0] DEBUG o.e.hono.client.impl.HonoClientImpl - creating new message sender for telemetry/DEFAULT_TENANT
12:10:03.693 [vert.x-eventloop-thread-0] DEBUG o.e.h.a.m.VertxBasedMqttProtocolAdapter - connection closed with client [4714]
12:10:03.706 [vert.x-eventloop-thread-0] DEBUG o.e.h.c.i.AbstractRequestResponseClient - request response client created
12:10:03.706 [vert.x-eventloop-thread-0] DEBUG o.e.hono.client.impl.HonoClientImpl - successfully created registration client for [DEFAULT_TENANT]
12:10:03.706 [vert.x-eventloop-thread-0] DEBUG o.e.hono.client.impl.AbstractSender - sender open [Target{address='telemetry/DEFAULT_TENANT', durable=NONE, expiryPolicy=SESSION_END, timeout=0, dynamic=false, dynamicNodeProperties=null, capabilities=null}]
12:10:03.706 [vert.x-eventloop-thread-0] DEBUG o.e.hono.client.impl.HonoClientImpl - successfully created new message sender for telemetry/DEFAULT_TENANT
12:10:03.725 [vert.x-eventloop-thread-0] DEBUG o.e.h.c.i.AbstractRequestResponseClient - received response [correlation ID: reg-client-0, status: 200]
12:10:03.726 [vert.x-eventloop-thread-0] DEBUG o.e.h.a.m.VertxBasedMqttProtocolAdapter - cannot process message [client ID: 4714, topic: telemetry/DEFAULT_TENANT/4714, QoS: AT_MOST_ONCE]: no credit available for sending message
12:10:03.726 [vert.x-eventloop-thread-0] DEBUG o.e.h.a.m.VertxBasedMqttProtocolAdapter - client has already closed connection

In each of these last lines are errors. And the question is – how can I solve that problem? I would be very thankful for any answer.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pellmanncommented, Aug 29, 2017

You need to use 30671. Does this work? You can see the configuration of the dispatch router here: https://github.com/eclipse/hono/blob/master/dispatchrouter/qpid/qdrouterd-with-broker.json

0reactions
pellmanncommented, Aug 29, 2017

Ah okay - then we will use this ticket for the change in the documentation. Thanx!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting 503 Service Unavailable when accessing route and ...
When the allow-from-openshift-ingress and deny-by-default network policy is enforced, · When hitting the route url, 503 error received.
Read more >
Getting 503 Service Unavailable despite working consumer ...
I set up Hono on Openshift (precisely on Minishift) using your tutorial on this site: Eclipse Hono deployment on Openshift.
Read more >
How to Fix Kubernetes 'Service 503' (Service Unavailable) Error
The 503 Service Unavailable error is an HTTP status code that indicates the server is temporarily unavailable and cannot serve the client request....
Read more >
How do I debug an Open Shift 503 Service Unavailable error
The 503 message in openshift is absolutely terrible. It could give a message back of: health check failed, or app didn't respond or...
Read more >
Troubleshoot Cloud Run issues
HTTP 500 / HTTP 503: Container instances are exceeding memory limits ... The following error occurs during serving: In Cloud Logging: While handling...
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