Spark: It is trying to connect 127.0.0.1:5567?

Created on 15 Jul 2019  路  5Comments  路  Source: dotnet/spark

Problem encountered on https://dotnet.microsoft.com/learn/data/spark-tutorial/code
Operating System: windows

Provide details about the problem you are experiencing. Include your operating system version, exact error message, code sample, and anything else that is relevant.

System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (10061): No connection could be made because the target machine actively refused it. 127.0.0.1:5567
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at Microsoft.Spark.Network.DefaultSocketWrapper.Connect(IPAddress remoteaddr, Int32 port, String secret)
   at Microsoft.Spark.Interop.Ipc.JvmBridge.GetConnection()
   at Microsoft.Spark.Interop.Ipc.JvmBridge.CallJavaMethod(Boolean isStatic, Object classNameOrJvmObjectReference, String methodName, Object[] args)
   at Microsoft.Spark.Interop.Ipc.JvmBridge.CallStaticJavaMethod(String className, String methodName, Object[] args)
   at Microsoft.Spark.Sql.Builder..ctor()
   at Microsoft.Spark.Sql.SparkSession.Builder()

Most helpful comment

All 5 comments

5567 port is used for debugging. Can you provide more details such as spark-submit command, etc.?

I ran into the same issue, it fine when I run this command

spark-submit --class org.apache.spark.deploy.DotnetRunner --master local bin\Debug\netcoreapp2.2\microsoft-spark-2.4.x-0.3.0.jar dotnet bin\Debug\netcoreapp2.2\MySparkApp.dll

but throw exception when I tried to debug.

System.Net.Internals.SocketExceptionFactory.ExtendedSocketException
  HResult=0x80004005
  Message=No connection could be made because the target machine actively refused it 127.0.0.1:5567
  Source=System.Net.Sockets
  StackTrace:
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   at Microsoft.Spark.Network.DefaultSocketWrapper.Connect(IPAddress remoteaddr, Int32 port, String secret)
   at Microsoft.Spark.Interop.Ipc.JvmBridge.GetConnection()
   at Microsoft.Spark.Interop.Ipc.JvmBridge.CallJavaMethod(Boolean isStatic, Object classNameOrJvmObjectReference, String methodName, Object[] args)
   at Microsoft.Spark.Interop.Ipc.JvmBridge.CallStaticJavaMethod(String className, String methodName, Object[] args)
   at Microsoft.Spark.Sql.Builder..ctor()
   at Microsoft.Spark.Sql.SparkSession.Builder()
   at mySparkApp.Program.Main(String[] args) in E:\Develop\mySparkApp\Program.cs:line 11

Great! thanks @imback82

@trongnguyenbinh: I'm closing this issue. Please feel free to create another issue if you get blocked.

Was this page helpful?
0 / 5 - 0 ratings