Avoid Spark driver IP binding failure due to VPN setting#866
Avoid Spark driver IP binding failure due to VPN setting#866flyrain merged 3 commits intoapache:mainfrom
Conversation
regtests/run_spark_sql.sh
Outdated
There was a problem hiding this comment.
Looks like this change is optional. It passed without the change for me locally.
|
The test failed due to it use the test profile in application.properties. There are two ways to fix this
|
|
When possible, we should use the same |
There was a problem hiding this comment.
My idea was to do exactly the opposite: make all tests (automated + regression) use the default authenticator. Cf #804.
There was a problem hiding this comment.
That makes sense to me.
f14cc67 to
79930c7
Compare
|
Repurpose this PR as #804 will resolve the credential issue. |
regtests/run_spark_sql.sh
Outdated
There was a problem hiding this comment.
This change may not be needed anymore since I removed the default values for these environment variables in #804.
There was a problem hiding this comment.
Tested again based on #804. This change is still needed for my local run. I think this is due a recent change of my local VPN setting. However I couldn't touch VPN settings by myself. Given this script is mainly used for local test, I think this change should be good.
Here is the error message without this change:
Exception in thread "main" java.io.IOException: Failed to send RPC /jars/software.amazon.awssdk_http-client-spi-2.23.19.jar to mac.lan/192.168.86.27:55366: io.netty.channel.StacklessClosedChannelException
at org.apache.spark.network.client.TransportClient$2.handleFailure(TransportClient.java:164)
at org.apache.spark.network.client.TransportClient$StdChannelListener.operationComplete(TransportClient.java:372)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:590)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:557)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:492)
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:636)
at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:629)
at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:118)
at io.netty.channel.AbstractChannel$AbstractUnsafe.safeSetFailure(AbstractChannel.java:999)
at io.netty.channel.AbstractChannel$AbstractUnsafe.write(AbstractChannel.java:860)
at io.netty.channel.DefaultChannelPipeline$HeadContext.write(DefaultChannelPipeline.java:1367)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:877)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:113)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:881)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856)
at io.netty.handler.timeout.IdleStateHandler.write(IdleStateHandler.java:302)
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:879)
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:940)
at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1247)
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:566)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
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:1583)
Caused by: io.netty.channel.StacklessClosedChannelException
at io.netty.channel.AbstractChannel$AbstractUnsafe.write(Object, ChannelPromise)(Unknown Source)
63cb810 to
7ff9a37
Compare
regtests/run.sh
Outdated
| export SPARK_HOME=$(realpath ~/${SPARK_DISTRIBUTION}) | ||
| fi | ||
| export PYTHONPATH="${SPARK_HOME}/python/:${SPARK_HOME}/python/lib/py4j-0.10.9.7-src.zip:$PYTHONPATH" | ||
| export SPARK_LOCAL_HOSTNAME=localhost #avoid VPN messing up driver local IP address binding |
regtests/run_spark_sql.sh
Outdated
|
|
||
| export SPARK_VERSION=spark-3.5.3 | ||
| export SPARK_DISTRIBUTION=${SPARK_VERSION}-bin-hadoop3 | ||
| export SPARK_LOCAL_HOSTNAME=localhost #avoid VPN messing up driver local IP address binding |
|
I also have a VPN on but wasn't having issues. I checked that this change does not introduce any regressions on my end, so LGTM. |
|
Thanks @eric-maynard and @adutra for the review |
Fixed Spark local run issue like this: