DobyTang / LazyLibrarian

This project isn't finished yet. Goal is to create a SickBeard, CouchPotato, Headphones-like application for ebooks. Headphones is used as a base, so there are still a lot of references to it.
732 stars 70 forks source link

LazyLibrarian in restart loop cant connect to github? #1439

Closed 1liminal1 closed 6 years ago

1liminal1 commented 6 years ago

Hi guys, not sure what this issue is, can anyone advise?

Thanks

Unable to retrieve new version from https://github.com/dobytang/lazylibrarian/tarball/master, can't update: [Errno 1] _ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

1liminal1 commented 6 years ago

Getting different errors now

C:\ProgramData\LazyLibrarian-master>Daemonize not supported under Windows, starting normally
Lazylibrarian is starting up...
25-May-2018 13:34:55 - INFO :: MAIN : __init__.py:initialize:602 : Log level set to [1]- Log Directory is [C:\ProgramData\LazyLibrarian-master\Logs] - Config level is [1]
25-May-2018 13:34:59 - INFO :: MAIN : __init__.py:initialize:608 : Screen Log set to INFO
25-May-2018 13:35:02 - INFO :: MAIN : __init__.py:config_read:891 : Config file loaded
25-May-2018 13:35:05 - INFO :: MAIN : __init__.py:initialize:652 : Database is version 0, integrity check: ok
C:\ProgramData\LazyLibrarian-master\lib\requests\packages\urllib3\util\ssl_.py:334: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  SNIMissingWarning
C:\ProgramData\LazyLibrarian-master\lib\requests\packages\urllib3\util\ssl_.py:132: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
C:\ProgramData\LazyLibrarian-master\lib\requests\packages\urllib3\util\ssl_.py:132: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
25-May-2018 13:35:23 - WARNING :: MAIN : versioncheck.py:logmsg:44 : Could not get the latest commit from github
25-May-2018 13:35:27 - INFO :: MAIN : versioncheck.py:logmsg:40 : Unable to get latest version from GitHub
25-May-2018 13:35:29 - INFO :: MAIN : versioncheck.py:logmsg:40 : Lazylibrarian is up to date
25-May-2018 13:35:31 - INFO :: MAIN : LazyLibrarian.py:main:204 : Starting LazyLibrarian on port: 5299, webroot ""
25-May-2018 13:35:34 - INFO :: MAIN : webStart.py:initialize:56 : Starting LazyLibrarian web server on http://0.0.0.0:5299/
25-May-2018 13:35:40 - ERROR :: DB_UPGRADE : database.py:action:79 : Database Integrity error: column UserName is not unique
25-May-2018 13:35:40 - INFO :: MAIN : __init__.py:logmsg:1456 : LazyLibrarian is updating...
ERROR:lazylibrarian:DB_UPGRADE : database.py:action:79 : Database Integrity error: column UserName is not unique
INFO:lazylibrarian:MAIN : __init__.py:logmsg:1456 : LazyLibrarian is updating...
25-May-2018 13:35:49 - ERROR :: DB_UPGRADE : database.py:action:80 : Failed query: [INSERT into users (UserID, UserName, Name, Password, Perms) VALUES (?, ?, ?, ?, ?)]
25-May-2018 13:35:52 - INFO :: MAIN : versioncheck.py:logmsg:40 : Downloading update from: https://github.com/dobytang/lazylibrarian/tarball/master
ERROR:lazylibrarian:DB_UPGRADE : database.py:action:80 : Failed query: [INSERT into users (UserID, UserName, Name, Password, Perms) VALUES (?, ?, ?, ?, ?)]
INFO:lazylibrarian:MAIN : versioncheck.py:logmsg:40 : Downloading update from: https://github.com/dobytang/lazylibrarian/tarball/master
25-May-2018 13:36:03 - ERROR :: DB_UPGRADE : database.py:action:81 : Failed args: [('lS8LtZN16o', 'admin', 'admin', '21232f297a57a5a743894a0e4a801fc3', 65535)]
ERROR:lazylibrarian:DB_UPGRADE : database.py:action:81 : Failed args: [('lS8LtZN16o', 'admin', 'admin', '21232f297a57a5a743894a0e4a801fc3', 65535)]
25-May-2018 13:36:07 - ERROR :: DB_UPGRADE : dbupgrade.py:dbupgrade:375 : Unhandled exception in database upgrade: Traceback (most recent call last):
  File "C:\ProgramData\LazyLibrarian-master\lazylibrarian\dbupgrade.py", line 170, in dbupgrade
    myDB.action(cmd, (pwd_generator(), 'admin', 'admin', md5_utf8('admin'), 65535))
  File "C:\ProgramData\LazyLibrarian-master\lazylibrarian\database.py", line 48, in action
    sqlResult = self.connection.execute(query, args)
IntegrityError: column UserName is not unique
1liminal1 commented 6 years ago
C:\ProgramData\LazyLibrarian-master\lib\requests\packages\urllib3\util\ssl_.py:132: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
25-May-2018 13:38:06 - ERROR :: MAIN : versioncheck.py:logmsg:38 : Unable to retrieve new version from https://github.com/dobytang/lazylibrarian/tarball/master, can't update: [Errno 1] _ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
ERROR:lazylibrarian:MAIN : versioncheck.py:logmsg:38 : Unable to retrieve new version from https://github.com/dobytang/lazylibrarian/tarball/master, can't update: [Errno 1] _ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
25-May-2018 13:38:06 - INFO :: MAIN : __init__.py:logmsg:1456 : LazyLibrarian is restarting ...
INFO:lazylibrarian:MAIN : __init__.py:logmsg:1456 : LazyLibrarian is restarting ...
25-May-2018 13:38:06 - INFO :: MAIN : __init__.py:logmsg:1456 : LazyLibrarian is exiting
INFO:lazylibrarian:MAIN : __init__.py:logmsg:1456 : LazyLibrarian is exiting
philborman commented 6 years ago

Is this a new install or an upgrade? If it's a new install I would try deleting the lazylibrarian.db file and retrying.

1liminal1 commented 6 years ago

Hi thanks for that,

Apparently I dont have that file in this directory? I am running this as as in an admin prompt.

Its not even getting to that stage maybe?

philborman commented 6 years ago

Looks like the database has been created, and has an admin user, but the database version has not been set so the first attempt to create the database failed to complete. Your log above shows Log Directory is [C:\ProgramData\LazyLibrarian-master\Logs] so the database should be C:\ProgramData\LazyLibrarian-master\lazylibrarian.db If you delete that file you should be able to start lazylibrarian and create a new database.

I will add some code to check for this situation in the next version.

1liminal1 commented 6 years ago

Hey there, sorry, been a very busy week.

Finally got a chance to look @ this today. Deleted the Db file and still the same issue.

C:\LazyLibrarian\LazyLibrarian-master\lib\requests\packages\urllib3\util\ssl_.py:132: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
09-Jun-2018 13:37:44 - WARNING :: MAIN : versioncheck.py:logmsg:44 : Could not get the latest commit from github
09-Jun-2018 13:37:44 - INFO :: MAIN : versioncheck.py:logmsg:40 : Unable to get latest version from GitHub
09-Jun-2018 13:37:44 - INFO :: MAIN : versioncheck.py:logmsg:40 : Lazylibrarian is up to date
09-Jun-2018 13:37:44 - INFO :: MAIN : LazyLibrarian.py:main:213 : Starting LazyLibrarian on port: 5299, webroot ""
09-Jun-2018 13:37:44 - INFO :: MAIN : webStart.py:initialize:56 : Starting LazyLibrarian web server on http://0.0.0.0:5299/
09-Jun-2018 13:37:46 - INFO :: MAIN : __init__.py:logmsg:1459 : LazyLibrarian is updating...
INFO:lazylibrarian:MAIN : __init__.py:logmsg:1459 : LazyLibrarian is updating...
09-Jun-2018 13:37:46 - INFO :: MAIN : versioncheck.py:logmsg:40 : Downloading update from: https://github.com/dobytang/lazylibrarian/tarball/master
INFO:lazylibrarian:MAIN : versioncheck.py:logmsg:40 : Downloading update from: https://github.com/dobytang/lazylibrarian/tarball/master
C:\LazyLibrarian\LazyLibrarian-master\lib\requests\packages\urllib3\util\ssl_.py:132: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
09-Jun-2018 13:37:46 - ERROR :: MAIN : versioncheck.py:logmsg:38 : Unable to retrieve new version from https://github.com/dobytang/lazylibrarian/tarball/master, can't update: [Errno 1] _ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
ERROR:lazylibrarian:MAIN : versioncheck.py:logmsg:38 : Unable to retrieve new version from https://github.com/dobytang/lazylibrarian/tarball/master, can't update: [Errno 1] _ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
09-Jun-2018 13:37:46 - INFO :: MAIN : __init__.py:logmsg:1459 : LazyLibrarian is restarting ...
INFO:lazylibrarian:MAIN : __init__.py:logmsg:1459 : LazyLibrarian is restarting ...
09-Jun-2018 13:37:46 - INFO :: MAIN : __init__.py:logmsg:1459 : LazyLibrarian is exiting
INFO:lazylibrarian:MAIN : __init__.py:logmsg:1459 : LazyLibrarian is exiting
1liminal1 commented 6 years ago

It works for a second, I get a page, asked me to update, try to update, shows page unavailable.

Just in a loop like that. This is the logs

routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
09-Jun-2018 13:51:34 - INFO    :: MAIN : __init__.py:logmsg:1459 : LazyLibrarian is restarting ...
09-Jun-2018 13:51:34 - INFO    :: MAIN : __init__.py:logmsg:1459 : LazyLibrarian is exiting
09-Jun-2018 13:51:42 - INFO    :: MAIN : __init__.py:initialize:603 : Log level set to [1]- Log Directory is [C:\LazyLibrarian\LazyLibrarian-master\Logs] - Config level is [1]
09-Jun-2018 13:51:42 - INFO    :: MAIN : __init__.py:initialize:609 : Screen Log set to INFO
09-Jun-2018 13:51:42 - INFO    :: MAIN : __init__.py:config_read:892 : Config file loaded
09-Jun-2018 13:51:42 - INFO    :: MAIN : __init__.py:initialize:653 : Database is version 32, integrity check: ok
09-Jun-2018 13:51:44 - WARNING :: MAIN : versioncheck.py:logmsg:44 : Could not get the latest commit from github
09-Jun-2018 13:51:44 - INFO    :: MAIN : versioncheck.py:logmsg:40 : Unable to get latest version from GitHub
09-Jun-2018 13:51:44 - INFO    :: MAIN : versioncheck.py:logmsg:40 : Lazylibrarian is up to date
09-Jun-2018 13:51:44 - INFO    :: MAIN : LazyLibrarian.py:main:213 : Starting LazyLibrarian on port: 5299, webroot ""
09-Jun-2018 13:51:44 - INFO    :: MAIN : webStart.py:initialize:56 : Starting LazyLibrarian web server on http://0.0.0.0:5299/
09-Jun-2018 13:51:46 - INFO    :: MAIN : __init__.py:logmsg:1459 : LazyLibrarian is updating...
09-Jun-2018 13:51:46 - INFO    :: MAIN : versioncheck.py:logmsg:40 : Downloading update from: https://github.com/dobytang/lazylibrarian/tarball/master
09-Jun-2018 13:51:46 - ERROR   :: MAIN : versioncheck.py:logmsg:38 : Unable to retrieve new version from https://github.com/dobytang/lazylibrarian/tarball/master, can't update: [Errno 1] _ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
09-Jun-2018 13:51:46 - INFO    :: MAIN : __init__.py:logmsg:1459 : LazyLibrarian is restarting ...
09-Jun-2018 13:51:46 - INFO    :: MAIN : __init__.py:logmsg:1459 : LazyLibrarian is exiting
1liminal1 commented 6 years ago

This is the DB logs after deleting the DB

Sat Jun 09 13:44:08 2018 v0: Creating new database, version 32
Sat Jun 09 13:44:20 2018 v0: Creating new database, version 32
Sat Jun 09 13:44:34 2018 v0: Creating new database, version 32
Sat Jun 09 13:44:47 2018 v0: Creating new database, version 32
Sat Jun 09 13:44:50 2018: Cleaning Database
Sat Jun 09 13:44:50 2018: Database updated to version 32
philborman commented 6 years ago

Ok, looks like the database integrity error is fixed 25-May-2018 13:35:40 - ERROR :: DB_UPGRADE : database.py:action:79 : Database Integrity error: column UserName is not unique but the communication with github is still an issue. That's often an intermittent comms problem, but in your case you are getting

C:\LazyLibrarian\LazyLibrarian-master\lib\requests\packages\urllib3\util\ssl_.py:132: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning

which looks like your version of python is outdated or incomplete. Unfortunately we need working ssl for github, also goodreads and some indexers too. What version of python are you using, what version of lazylibrarian, and original install method ? Looks like it might have been git ?

1liminal1 commented 6 years ago

Thanks for the quick response :)

I'm using 2.7? Ill try installing 3.6 and get back to you.

philborman commented 6 years ago

2.7 should be ok, seems like something missing in your python installation. See the lazylibrarian wiki page about ssl as the same things might be missing in 3.6

1liminal1 commented 6 years ago

Im running this on windows server 2016 and im just running it from an admin CMD as LazyLibrarian.py

Ill have a look

1liminal1 commented 6 years ago

Whatever was missing, 3.6 seems to have fixed it and it's now running!

Thanks so much for all your help, I really appreciate it!