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

[Kodi 18] Some python2 error in the log, possibly about the repo #1090

Open
pitsi opened this issue Dec 13, 2024 · 18 comments
Open

[Kodi 18] Some python2 error in the log, possibly about the repo #1090

pitsi opened this issue Dec 13, 2024 · 18 comments

Comments

@pitsi
Copy link

pitsi commented Dec 13, 2024

Expected Behavior

Hmmm... There should not be such an error in the log.

Current Behavior

The error below is shown in the log. However, elementum seems to work fine.

Possible Solution

No idea.

Steps to Reproduce (for bugs)

  1. Install elementum on a kodi 18 installation.
  2. Restart kodi for elementum to load.
  3. Notice the following in the log.

Context

The log

2024-12-13 09:32:53.970 T:140480434853632   ERROR: Traceback (most recent call last):
2024-12-13 09:32:53.970 T:140480434853632   ERROR:   File "/usr/lib/python2.7/SocketServer.py", line 599, in process_request_thread
2024-12-13 09:32:53.970 T:140480434853632   ERROR:   File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
2024-12-13 09:32:53.970 T:140480434853632   ERROR:   File "/usr/lib/python2.7/SocketServer.py", line 655, in __init__
2024-12-13 09:32:53.972 T:140480434853632   ERROR:   File "/usr/lib/python2.7/BaseHTTPServer.py", line 342, in handle
2024-12-13 09:32:53.972 T:140480520120064  NOTICE: [plugin.video.elementum] INFO  main         ▶ func8            Updating Kodi add-on repositories...
2024-12-13 09:32:53.972 T:140480434853632   ERROR:   File "/usr/lib/python2.7/BaseHTTPServer.py", line 310, in handle_one_request
2024-12-13 09:32:53.972 T:140480434853632   ERROR:   File "/usr/lib/python2.7/socket.py", line 480, in readline
2024-12-13 09:32:53.972 T:140480434853632   ERROR: error: [Errno 104] Connection reset by peer

If it helps, since libreelec 9 is eol since a few years ago and has no support, I manually update it's certificates in order to keep some addons running properly. However, the error comes up even with the stock certificates.

Your Environment

  • Version used: 0.1.106
  • Environment name and version: kodi 18.9 on libreelec 9.2.6 x64
  • Operating System and version: Libreelec 6.2.6 x64
  • Link to Kodi debug log: (log is above)
@antonsoroko
Copy link

@pitsi not sure that this is elementum issue, it might be just a coincidence that you see elementum Golang notice message during generic Python error messages. There should be at least elementum python error messages.
Anyway, full log is needed, since this "part of log" is not useful at all.

@pitsi
Copy link
Author

pitsi commented Dec 14, 2024

Please allow a few days to clean up my installation from other addons and I will post the full log. Thank you :)

@pitsi
Copy link
Author

pitsi commented Dec 18, 2024

There you go. The error is on lines 623 to 629
kodi.log

@antonsoroko
Copy link

@pitsi looks like you forgot to enable debug both in kodi and elementum :-(
there was a guide in template - http://elementum.surge.sh/contribute/log/

(disable debug after creating log to save some performance and disk space)

@pitsi
Copy link
Author

pitsi commented Dec 21, 2024

There you go.
kodi.log

Kodi's debug mode was enabled with --debug flag and I set elementum to debug more via settings > advanced > log > log level > debug.

@antonsoroko
Copy link

antonsoroko commented Dec 21, 2024

this is what i see in log

DEBUG: [repository.elementumorg] "GET /addons.xml HTTP/1.1" 200 -
DEBUG: ----------------------------------------
DEBUG: Exception happened during processing of request from
DEBUG: ('127.0.0.1', 39126)
ERROR: Traceback (most recent call last):
ERROR:   File "/usr/lib/python2.7/SocketServer.py", line 599, in process_request_thread
ERROR:   File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
ERROR:   File "/usr/lib/python2.7/SocketServer.py", line 655, in __init__
ERROR:   File "/usr/lib/python2.7/BaseHTTPServer.py", line 342, in handle
NOTICE: [plugin.video.elementum] INFO  main         ▶ func8            �[0mUpdating Kodi add-on repositories...
ERROR:   File "/usr/lib/python2.7/BaseHTTPServer.py", line 310, in handle_one_request
ERROR:   File "/usr/lib/python2.7/socket.py", line 480, in readline
ERROR: error: [Errno 104] Connection reset by peer
DEBUG: ----------------------------------------

@antonsoroko
Copy link

@pitsi can you please open in your browser this address http://IP_OF_Libreelec:65223/addons.xml
or from libreelec terminal: curl http://127.0.0.1:65223/addons.xml
and then check

  1. that it gives you correct XML file (upload its content here)
  2. if in kodi.log you see the same error as before

@pitsi
Copy link
Author

pitsi commented Dec 21, 2024

When I run it either locally or remotely, it gives me this, which seems to be the structure of the elementum repo.
addons.txt

Now if you excuse me for today, I have to go rest :)

@pitsi
Copy link
Author

pitsi commented Dec 22, 2024

I missunderstood the second part of the question, sorry.
When runninng curl on that xml file (from my system) all I get is this
2024-12-22 07:30:15.371 T:140460060309248 DEBUG: [repository.elementumorg] "GET /addons.xml HTTP/1.1" 200 -

The problem is that I get no newer message in the log despite how many times I run curl, either locally or remotely, so teh above may be... just another elementum message in the log.

@antonsoroko
Copy link

@pitsi does this error somehow affects work of elementumorg repository? e.g. can you open the repository and install addons from it? (you can safely uninstall and reinstall "elementum context helper", for example)

@pitsi
Copy link
Author

pitsi commented Dec 22, 2024

Truth be told, I have not noticed it, because I do get the updates like usual. But I just tried what you suggested and it works as it should.

Disabling elementum executable from autostarting with kodi makes the error go away, obviously.

@antonsoroko
Copy link

@pitsi

Disabling elementum executable from autostarting with kodi makes the error go away, obviously.

On start elementum run "update all repos" internal kodi's command. Maybe there is some "race condition".

Can you please set "start delay" in elementum settings to 5 seconds? And see if you still see the error.

@pitsi
Copy link
Author

pitsi commented Dec 22, 2024

I gave it the full 180 seconds of delay, it did do it as you can see here

2024-12-22 20:10:28.097 T:140237233702656  NOTICE: [plugin.video.elementum] elementumd: sleeping 180 seconds before startup
2024-12-22 20:13:28.223 T:140237233702656  NOTICE: [plugin.video.elementum] elementumd: started process

but in the end nothing changed

2024-12-22 20:13:29.386 T:140237048375040   ERROR: Traceback (most recent call last):
2024-12-22 20:13:29.386 T:140237048375040   ERROR:   File "/usr/lib/python2.7/SocketServer.py", line 599, in process_request_thread
2024-12-22 20:13:29.386 T:140237048375040   ERROR:   File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
2024-12-22 20:13:29.386 T:140237048375040   ERROR:   File "/usr/lib/python2.7/SocketServer.py", line 655, in __init__
2024-12-22 20:13:29.386 T:140237048375040   ERROR:   File "/usr/lib/python2.7/BaseHTTPServer.py", line 342, in handle
2024-12-22 20:13:29.386 T:140237048375040   ERROR:   File "/usr/lib/python2.7/BaseHTTPServer.py", line 310, in handle_one_request
2024-12-22 20:13:29.388 T:140237048375040   ERROR:   File "/usr/lib/python2.7/socket.py", line 480, in readline
2024-12-22 20:13:29.388 T:140237048375040   ERROR: error: [Errno 104] Connection reset by peer

Because I did not mention it earlier, I sometimes hear kodi's error sound on shutdown, but it does not stay open for long so as to show an error message and let me know why it happened. Could that be related to elementum?

@antonsoroko
Copy link

@pitsi

but it does not stay open for long so as to show an error message and let me know why it happened.

You can take a look into kodi.log.old file , it will have log from previous Kodi run.

@antonsoroko
Copy link

antonsoroko commented Dec 22, 2024

but in the end nothing changed

I do not know why this is happening on your system. It might be because of kodi 18 or old certificates or something else. Maybe @elgatito can say more.

Elementum repository is dynamic add-on that gets data from GitHub API , maybe those requests to GitHub API are failing for some reason. But hard to tell without a easy way to reproduce the issue locally.

As I understands the repo works for you, so it is not a blocker bug , but more like "inconvenient" bug.

@pitsi
Copy link
Author

pitsi commented Dec 23, 2024

I know about kodi.old.log (as well as about the "dynamic nature" of the elementum repository). The problem is that either it happens and I forget to check it the next time I boot, or I have to restart kodi while keeping le running. In both cases. the file gets replaced by a new one, which is useless.

As for the certificates, I know that the system will not get any further updates, so I update the certificates by hand, the way that is described here.
https://wiki.libreelec.tv/configuration/ssl-tls-certificates

Right now, my cecert.pem file is the one from November 26th, i.e. the latest one.

# cat .config/cacert.pem | head -5
##
## Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Tue Nov 26 13:58:25 2024 GMT
##

But all that may be wrong, because I have no way to know if the system did parse that file or is still using its original one from 2020

# cat /etc/ssl/cacert.pem.system | head -5
##
## Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Sun May 31 07:36:09 2020 GMT
##

@pitsi
Copy link
Author

pitsi commented Dec 23, 2024

About this last bit. I totally missed the part of the instructions which says that the new file is appended to the old one. The new file is indeed appended and the resulted one contains both the old and the new one.

# cat /etc/ssl/cacert.pem | grep "Certificate data"
## Certificate data from Mozilla as of: Sun May 31 07:36:09 2020 GMT
## Certificate data from Mozilla as of: Tue Nov 26 13:58:25 2024 GMT

@antonsoroko
Copy link

antonsoroko commented Dec 23, 2024

i meant that the only way to see what is really happening is to add some debug code to https://github.com/ElementumOrg/repository.elementumorg/tree/master
i tried to read that code but i do not really see where to add debug to make it useful.

maybe @i96751414 can say something about this, since https://github.com/ElementumOrg/repository.elementumorg is just a fork of https://github.com/i96751414/repository.github

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants