Repository: quarkusio/quarkus
Issue: NullPointerException when quarkus.http.access-log.enabled=true

**Describe the bug**
I'm getting too many NullPointerException when setting quarkus.http.access-log.enabled=true here exception logs
```
ERROR [io.qua.ver.htt.run.fil.QuarkusRequestWrapper] (vert.x-eventloop-thread-0) Failed to run io.quarkus.vertx.http.runtime.filters.accesslog.AccessLogHandler$1@23b007d8: java.lang.NullPointerException
        at io.quarkus.vertx.http.runtime.attribute.RemoteHostAttribute.readAttribute(RemoteHostAttribute.java:22)
        at io.quarkus.vertx.http.runtime.attribute.SubstituteEmptyWrapper$SubstituteEmptyAttribute.readAttribute(SubstituteEmptyWrapper.java:29)
        at io.quarkus.vertx.http.runtime.attribute.CompositeExchangeAttribute.readAttribute(CompositeExchangeAttribute.java:23)
        at io.quarkus.vertx.http.runtime.filters.accesslog.AccessLogHandler$1.handle(AccessLogHandler.java:120)
        at io.quarkus.vertx.http.runtime.filters.accesslog.AccessLogHandler$1.handle(AccessLogHandler.java:117)
        at io.quarkus.vertx.http.runtime.filters.QuarkusRequestWrapper.done(QuarkusRequestWrapper.java:70)
        at io.quarkus.vertx.http.runtime.filters.QuarkusRequestWrapper$ResponseWrapper$2.handle(QuarkusRequestWrapper.java:114)
        at io.quarkus.vertx.http.runtime.filters.QuarkusRequestWrapper$ResponseWrapper$2.handle(QuarkusRequestWrapper.java:111)
        at io.vertx.core.http.impl.HttpServerResponseImpl.handleClosed(HttpServerResponseImpl.java:616)
        at io.vertx.core.http.impl.HttpServerResponseImpl.handleException(HttpServerResponseImpl.java:590)
        at io.vertx.core.http.impl.HttpServerRequestImpl.handleException(HttpServerRequestImpl.java:568)
        at io.vertx.core.http.impl.Http1xServerConnection.handleClosed(Http1xServerConnection.java:413)
        at io.vertx.core.net.impl.VertxHandler.lambda$channelInactive$4(VertxHandler.java:162)
        at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:369)
        at io.vertx.core.impl.EventLoopContext.execute(EventLoopContext.java:43)
        at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:232)
        at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:224)
        at io.vertx.core.net.impl.VertxHandler.channelInactive(VertxHandler.java:162)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
        at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:81)
        at io.netty.handler.timeout.IdleStateHandler.channelInactive(IdleStateHandler.java:277)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
        at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:389)
        at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:354)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:241)
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1405)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:262)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:248)
        at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:901)
        at io.netty.channel.AbstractChannel$AbstractUnsafe$8.run(AbstractChannel.java:818)
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:497)
        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)
```

**Expected behavior**
Request Logs print in console

**Actual behavior**
Request logs are showing but also too many exceptions only if i set quarkus.http.access-log.enabled=true


**To Reproduce**
Steps to reproduce the behavior:
1. build quarkus project with gradle
2. set quarkus.http.access-log.enabled=true in application.properties
3. Send multiple requests to server with jmeter or ab or maybe wrk.

**Configuration**
```properties
# Add your application.properties here, if applicable.
quarkus.application.name=appname
quarkus.application.version=1.0.0
quarkus.container-image.group={GITHUB_USERNAME}/{REPO}
quarkus.container-image.registry=docker.pkg.github.com
quarkus.jib.base-registry-username={GITHUB_USERNAME}
quarkus.jib.base-registry-password={TOKEN}

quarkus.http.port=8282

quarkus.shutdown.timeout=40

quarkus.http.access-log.enabled=false

quarkus.vault.tls.skip-verify=true

quarkus.vertx.max-event-loop-execute-time=4s

quarkus.http.read-timeout=120s
quarkus.vertx.eventbus.connect-timeout=120s

quarkus.resteasy.gzip.enabled=true
quarkus.resteasy.gzip.max-input=10M
```

**Screenshots**
(If applicable, add screenshots to help explain your problem.)

**Environment (please complete the following information):**
 - Output of `uname -a` or `ver`: 
Linux myapp-74ffb6cc9f-vj92h 4.19.0-0.bpo.6-amd64 #1 SMP Debian 4.19.67-2+deb10u2~bpo9+1 (2019-11-12) x86_64 Linux

 - Output of `java -version`: 
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

 - GraalVM version (if different from Java): USING JVM
 - Quarkus version or git rev: 1.5.0.Final
 - Build tool (ie. output of `mvnw --version` or `gradlew --version`): Gradle 6.4.1

**Additional context**
(Add any other context about the problem here.)


Changed files:
extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/RemoteHostAttribute.java
extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/LocalIPAttribute.java
extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/RemoteIPAttribute.java
extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/LocalPortAttribute.java

diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/LocalIPAttribute.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/LocalIPAttribute.java
index 15ba84f731f..73ad59eb124 100644
--- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/LocalIPAttribute.java
+++ b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/LocalIPAttribute.java
@@ -20,6 +20,9 @@ private LocalIPAttribute() {
     @Override
     public String readAttribute(final RoutingContext exchange) {
         SocketAddress localAddress = exchange.request().localAddress();
+        if (localAddress == null) {
+            return null;
+        }
         return localAddress.host();
     }
 
diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/LocalPortAttribute.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/LocalPortAttribute.java
index 93e8da3d9db..9645b15d658 100644
--- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/LocalPortAttribute.java
+++ b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/LocalPortAttribute.java
@@ -1,5 +1,6 @@
 package io.quarkus.vertx.http.runtime.attribute;
 
+import io.vertx.core.net.SocketAddress;
 import io.vertx.ext.web.RoutingContext;
 
 /**
@@ -19,7 +20,11 @@ private LocalPortAttribute() {
 
     @Override
     public String readAttribute(final RoutingContext exchange) {
-        return Integer.toString(exchange.request().localAddress().port());
+        final SocketAddress localAddr = exchange.request().localAddress();
+        if (localAddr == null) {
+            return null;
+        }
+        return Integer.toString(localAddr.port());
     }
 
     @Override
diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/RemoteHostAttribute.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/RemoteHostAttribute.java
index cd7be81b219..5164a1b8ed2 100644
--- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/RemoteHostAttribute.java
+++ b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/RemoteHostAttribute.java
@@ -1,5 +1,6 @@
 package io.quarkus.vertx.http.runtime.attribute;
 
+import io.vertx.core.net.SocketAddress;
 import io.vertx.ext.web.RoutingContext;
 
 /**
@@ -19,7 +20,11 @@ private RemoteHostAttribute() {
 
     @Override
     public String readAttribute(final RoutingContext exchange) {
-        return exchange.request().remoteAddress().host();
+        final SocketAddress remoteAddr = exchange.request().remoteAddress();
+        if (remoteAddr == null) {
+            return null;
+        }
+        return remoteAddr.host();
     }
 
     @Override
diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/RemoteIPAttribute.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/RemoteIPAttribute.java
index 90bb77f4334..5d8800a8b61 100644
--- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/RemoteIPAttribute.java
+++ b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/attribute/RemoteIPAttribute.java
@@ -21,6 +21,9 @@ private RemoteIPAttribute() {
     @Override
     public String readAttribute(final RoutingContext exchange) {
         final SocketAddress sourceAddress = exchange.request().remoteAddress();
+        if (sourceAddress == null) {
+            return null;
+        }
         return sourceAddress.host();
     }