** Service 'sparkDriver' failed after 16 retries (on a random free port)! 에러 해결
Can't assign requested address: Service 'sparkDriver' failed after 16 retries (on a random free port)! Consider explicitly setting the appropriate binding address for the service 'sparkDriver' (for example spark.driver.bindAddress for SparkDriver) to the correct binding address.
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:438)
at sun.nio.ch.Net.bind(Net.java:430)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:225)
at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:134)
at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:562)
at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334)
at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:506)
at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:491)
at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973)
O'REILLY Learning Spark 2을 공부하면서 pyspark 예제를 실행을 하는 중에 위와 같은 에러가 발생했다.
본인은 MacOS에서 실습을 진행중이다.
해결방법
** /etc/hosts 파일안에 hostname을 추가하여서 해결 **
(sudo 모드로 수정하지 않으면 위의 파일을 수정할 수 없다.)
$ hostname
jaebui-MacBookPro.local
위 명령어를 실행하여 출력되는 값을 /etc/hosts 파일에 추가해준다.
(본인의 경우 jaebui-MacBookPro.local이 local hostname이다.)
$ sudo vim /etc/hosts
127.0.0.1 jaebui-MacBookPro.local
-----+------+----------+
|State|Color |sum(Count)|
+-----+------+----------+
|CA |Yellow|100956 |
|WA |Green |96486 |
|CA |Brown |95762 |
|TX |Green |95753 |
|TX |Red |95404 |
|CO |Yellow|95038 |
|NM |Red |94699 |
...
정상적으로 프로그램이 실행된다.
👍
댓글