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

Oracle Linux 8 ARM64 - Fatal Python error: init_fs_encoding #1178

Open
Matty-uk opened this issue Jun 26, 2024 · 6 comments · Fixed by #1198
Open

Oracle Linux 8 ARM64 - Fatal Python error: init_fs_encoding #1178

Matty-uk opened this issue Jun 26, 2024 · 6 comments · Fixed by #1198
Labels
3.X.X Bug close pending dependencies Pull requests that update a dependency file

Comments

@Matty-uk
Copy link

Hi

I've just done a source build to update from ncpa 3.0.0 to 3.1.0. Everything appeared to go well both with the build from source and the install/upgrade. However, when I do a systemctl status I get the following:

systemctl status ncpa
● ncpa.service - NCPA
Loaded: loaded (/usr/lib/systemd/system/ncpa.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2018-06-22 12:12:05 BST; 6 years 0 months ago
Docs: https://www.nagios.org/ncpa
Process: 660 ExecStart=/usr/local/ncpa/ncpa -n (code=exited, status=1/FAILURE)
Main PID: 660 (code=exited, status=1/FAILURE)

Jun 22 12:12:05 nagiospd02l-hu ncpa[660]: sys.path = [
Jun 22 12:12:05 nagiospd02l-hu ncpa[660]: '/usr/local/ncpa/lib',
Jun 22 12:12:05 nagiospd02l-hu ncpa[660]: ]
Jun 22 12:12:05 nagiospd02l-hu ncpa[660]: Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Jun 22 12:12:05 nagiospd02l-hu ncpa[660]: Python runtime state: core initialized
Jun 22 12:12:05 nagiospd02l-hu ncpa[660]: ModuleNotFoundError: No module named 'encodings'
Jun 22 12:12:05 nagiospd02l-hu ncpa[660]: Current thread 0x0000fffc72f74630 (most recent call first):
Jun 22 12:12:05 nagiospd02l-hu ncpa[660]:
Jun 22 12:12:05 nagiospd02l-hu systemd[1]: ncpa.service: Main process exited, code=exited, status=1/FAILURE
Jun 22 12:12:05 nagiospd02l-hu systemd[1]: ncpa.service: Failed with result 'exit-code'.

Rolling back to version 3.0.0 that I build a while back works fine.

Built on a clean/fresh install of Oracle Linux 8.10 with all patches applied.

Any suggestion on how to get this working appreciated.

@gittethis
Copy link
Contributor

gittethis commented Jun 26, 2024 via email

@sawolf sawolf added Bug dependencies Pull requests that update a dependency file 3.X.X labels Jun 27, 2024
@Matty-uk
Copy link
Author

I'll see if I can track down what's missing and provide the details.

@ne-bbahn
Copy link
Contributor

ne-bbahn commented Aug 5, 2024

After a bit of research, it seems that this problem usually occurs when the PYTHONHOME or PYTHONPATH variables are set wrongly. I had this issue on one CentOS 9 machine, but when I tried building the same branch on another Cent9 machine, it worked without issue. This definitely seems to be a build issue.

@ne-bbahn
Copy link
Contributor

ne-bbahn commented Aug 7, 2024

Upon further testing, this doesn't seem to be the cause here, though. I will continue to investigate why this might be happening.
image

@ne-bbahn
Copy link
Contributor

ne-bbahn commented Aug 9, 2024

I checked the above metrics against my good build and it seems that sys.path in the working version includes /usr/local/ncpa/lib/library.zip in addition to /usr/local/ncpa/lib, but all the other metrics above are identical.

@ne-bbahn
Copy link
Contributor

ne-bbahn commented Aug 15, 2024

Looks like this has happened before with cx_freeze marcelotduarte/cx_Freeze#835

It seems that the issue arises from cx_Freeze 7, so there is likely some process that needs to be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.X.X Bug close pending dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants