Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Exception: Unable to find py4j, your SPARK_HOME may not be configured correctly intermittently #4316

Closed
pxLi opened this issue Dec 7, 2021 · 5 comments · Fixed by #6462
Labels
bug Something isn't working build Related to CI / CD or cleanly building test Only impacts tests

Comments

@pxLi
Copy link
Collaborator

pxLi commented Dec 7, 2021

Describe the bug

Intermittently seeing

[2021-12-07T06:58:00.874Z]     from spark_init_internal import get_spark_i_know_what_i_am_doing
[2021-12-07T06:58:00.874Z] ../../src/main/python/spark_init_internal.py:21: in <module>
[2021-12-07T06:58:00.874Z]     findspark.init()
[2021-12-07T06:58:00.874Z] /usr/local/lib/python3.8/dist-packages/findspark.py:145: in init
[2021-12-07T06:58:00.874Z]     raise Exception(
[2021-12-07T06:58:00.874Z] E   Exception: Unable to find py4j, your SPARK_HOME may not be configured correctly

in pre_merge and nightly CI

Hard to reproduce, looks like PYTHONPAYH somehow got changed during pytest
Open an issue to track

@pxLi pxLi added bug Something isn't working test Only impacts tests build Related to CI / CD or cleanly building labels Dec 7, 2021
@pxLi
Copy link
Collaborator Author

pxLi commented Dec 13, 2021

will keep monitoring this after #4349

@pxLi
Copy link
Collaborator Author

pxLi commented Jan 4, 2022

closed. this did not appear again after #4349

@pxLi pxLi closed this as completed Jan 4, 2022
@pxLi pxLi reopened this Aug 23, 2022
@pxLi
Copy link
Collaborator Author

pxLi commented Aug 23, 2022

seeing this again in one build of #6355
As this still seems ephemeral, I will spend some time try dig out the root cause

@pxLi
Copy link
Collaborator Author

pxLi commented Aug 23, 2022

did some investigation, the path is correct and all the required files are there.

Seems the issue was due to some NFS glitches, I will try figure out a way to remediate this later

@gerashegalov
Copy link
Collaborator

gerashegalov commented Aug 23, 2022

I noticed in #6358 that we don't properly call findspark.init when pyspark is manually added to PYTHONPATH. Maybe it is a fix for py4j as well.

UPDATE: Unlikely, since PYTHONPATH was added as part of a fix to this issue to begin with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build Related to CI / CD or cleanly building test Only impacts tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants