Socket.gaierror: [Errno 8] while launching pyspark on MacOS


#1

Hi ,

I get below error while executing pyspark on Mac OS.Could you please let me know what might be missing. I googled and most of the blogs says the localhost on /etc/hosts was messing up , but i have the correct value on my host file. Please help

17/12/19 04:36:15 INFO BlockManagerMasterEndpoint: Registering block manager localhost:59613 with 511.1 MB RAM, BlockManagerId(driver, localhost, 59613)
17/12/19 04:36:15 INFO BlockManagerMaster: Registered BlockManager
17/12/19 04:36:16 INFO SparkUI: Stopped Spark web UI at http://10.0.0.25:4040
17/12/19 04:36:16 INFO MapOutputTrackerMasterEndpoint: MapOutputTrackerMasterEndpoint stopped!
17/12/19 04:36:16 INFO MemoryStore: MemoryStore cleared
17/12/19 04:36:16 INFO BlockManager: BlockManager stopped
17/12/19 04:36:16 INFO BlockManagerMaster: BlockManagerMaster stopped
17/12/19 04:36:16 INFO OutputCommitCoordinator$OutputCommitCoordinatorEndpoint: OutputCommitCoordinator stopped!
17/12/19 04:36:16 INFO SparkContext: Successfully stopped SparkContext
Traceback (most recent call last):
_ File “/Users/madhureaddy/spark/python/pyspark/shell.py”, line 43, in _
_ sc = SparkContext(pyFiles=add_files)_
_ File “/Users/madhureaddy/spark/python/pyspark/context.py”, line 115, in init_
_ conf, jsc, profiler_cls)_
_ File “/Users/madhureaddy/spark/python/pyspark/context.py”, line 176, in do_init
_ self.accumulatorServer = accumulators.start_update_server()
_ File “/Users/madhureaddy/spark/python/pyspark/accumulators.py”, line 259, in start_update_server
_ server = AccumulatorServer((“localhost”, 0), UpdateRequestHandler)
_ File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py”, line 420, in init

17/12/19 04:36:16 INFO RemoteActorRefProvider$RemotingTerminator: Shutting down remote daemon.
17/12/19 04:36:16 INFO RemoteActorRefProvider$RemotingTerminator: Remote daemon shut down; proceeding with flushing remote transports.
17/12/19 04:36:16 INFO RemoteActorRefProvider$RemotingTerminator: Remoting shut down.
_ self.server_bind()_
_ File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py”, line 434, in server_bind_
_ self.socket.bind(self.server_address)_
_ File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py”, line 228, in meth_
_ return getattr(self.sock,name)(*args)
socket.gaierror: [Errno 8] nodename nor servname provided, or not known