Dealing with offline (no internet) use cases ?

62 views
Skip to first unread message

Cristiano Gavião

unread,
Feb 7, 2021, 12:40:32 AM2/7/21
to vert.x
Hello all,
I'm facing DNS resolution issues when restarting a vert.x based server in environments without or with failure internet connections.
Even without an internet connection, I would need to keep my Linux device serving the internal network.
I would like suggestions on how I could "dynamically" deal with this scenario...
thanks,

Cristiano

```
java.net.UnknownHostException: failed to resolve 'accounts.google.com' after 2 queries
    at io.netty.resolver.dns.DnsResolveContext.finishResolve(DnsResolveContext.java:1005)
    at io.netty.resolver.dns.DnsResolveContext.tryToFinishResolve(DnsResolveContext.java:958)
    at io.netty.resolver.dns.DnsResolveContext.query(DnsResolveContext.java:406)
    at io.netty.resolver.dns.DnsResolveContext.onResponse(DnsResolveContext.java:593)
    at io.netty.resolver.dns.DnsResolveContext.access$400(DnsResolveContext.java:63)
    at io.netty.resolver.dns.DnsResolveContext$2.operationComplete(DnsResolveContext.java:450)
    at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:577)
    at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:570)
    at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:549)
    at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:490)
    at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:615)
    at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:604)
    at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104)
    at io.netty.resolver.dns.DnsQueryContext.trySuccess(DnsQueryContext.java:201)
    at io.netty.resolver.dns.DnsQueryContext.finish(DnsQueryContext.java:193)
    at io.netty.resolver.dns.DnsNameResolver$DnsResponseHandler.channelRead(DnsNameResolver.java:1230)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
    at io.netty.channel.epoll.EpollDatagramChannel.read(EpollDatagramChannel.java:679)
    at io.netty.channel.epoll.EpollDatagramChannel.access$100(EpollDatagramChannel.java:58)
    at io.netty.channel.epoll.EpollDatagramChannel$EpollDatagramChannelUnsafe.epollInReady(EpollDatagramChannel.java:497)
    at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe$1.run(AbstractEpollChannel.java:387)
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:384)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Thread.java:834)
0
```

Julien Viet

unread,
Feb 15, 2021, 5:41:47 AM2/15/21
to vert.x
Hi,

what kind of operation does need to work ? it looks like a DNS query cannot be resolved for an external service, that could not work anyway ?

it is not clear what happens on how the error is reported

Julien

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/e345861f-f3e7-4287-89df-90a9fab05d0fn%40googlegroups.com.

Cristiano

unread,
Feb 18, 2021, 9:10:34 AM2/18/21
to ve...@googlegroups.com, Julien Viet

Hi Julien,

I have some small gateway devices running linux with a vert.x server in places where we have poor electrical conditions.

Every time the energy goes down the device goes down too. But the device will be rebooted properly as soon as the energy comeback, but not always the internet will be reestablished on time and then I'm getting this error related to DNS. But due this DNS error, the Vert.x server is not starting up.

What I'm looking for is a way to bypass this DNS check in such conditions (when no internet is detected).

thanks,

Cristiano

You received this message because you are subscribed to a topic in the Google Groups "vert.x" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vertx/vQ8N4lRtoek/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/CA%2BH-X48n9%2Bmf5SfVYT-8F0D88TYHC7w9u%2BUqh7kefFgfSJU73Q%40mail.gmail.com.

Julien Viet

unread,
Feb 22, 2021, 11:33:48 AM2/22/21
to Cristiano, vert.x
Hi,

my question was rather, what do you use from vertx (which API) and how does the error get reported ?

e.g if you are using vertx HTTP client, then you would get a request error, etc...

Julien

Cristiano

unread,
Feb 22, 2021, 12:56:57 PM2/22/21
to Julien Viet, vert.x

Julien,

I'm using vertx-web and this error was thrown when calling "vertx.createHttpServer(options);"

regards, Cristiano

Julien Viet

unread,
Feb 23, 2021, 3:08:23 AM2/23/21
to Cristiano, vert.x
ok, do you mind providing a reproducer ?
Reply all
Reply to author
Forward
0 new messages