Getting Py4JNetworkError when trying to run pyspark

Hi All,
I am getting below error when trying to access pyspark. Looks like some issue with java gateway. Anyone has any idea about how to fix it?
py4j.protocol.Py4JNetworkError: An error occurred while trying to connect to the Java server


I am also facing the same issue. I tried pyspark --conf "spark.ui.port=10101" and its working fine.
Use this and start practicing pyspark.

1 Like

Thanks Amit. It worked.