pyload ssl problem : Exception in thread Thread-5

<<

trix00

Posts: 8

Joined: Tue Apr 16, 2013 2:13 pm

Post Thu May 16, 2013 3:40 pm

pyload ssl problem : Exception in thread Thread-5

Hi,
I've installed pyload on a WD mybook Live NAS and it works very good .

Anyway i have 2 problems which i would like to fix them:

1 - SSL doesn't work with the webinterface (and as i said before, the webinterface works well without the ssl)
2 - the remote connection doesn't work as well

I've stared pyload in debug mode and the problem seems the same for both problems :
"Error: [('PEM routines', 'PEM_read_bio', 'no start line'), ('SSL routines', 'SSL_CTX_use_PrivateKey_file', 'PEM lib')]"

i put below a part of pyload debug :

MyBookLive34:/opt/share/pyload# ./pyLoadCore.py --debug
16.05.2013 15:35:15 INFO Avvio pyLoad 0.4.9
16.05.2013 15:35:15 INFO Uso la cartella home: /opt/share/pyload_config
16.05.2013 15:35:15 DEBUG Remote activated: True
16.05.2013 15:35:17 DEBUG created index of plugins
16.05.2013 15:35:17 DEBUG Redirected import module.plugins.hooks.ImageTyperz -> userplugins.hooks.ImageTyperz
16.05.2013 15:35:17 DEBUG Redirected import module.plugins.hooks.LinkdecrypterCom -> userplugins.hooks.LinkdecrypterCom
16.05.2013 15:35:17 DEBUG Redirected import module.plugins.hooks.BypassCaptcha -> userplugins.hooks.BypassCaptcha
16.05.2013 15:35:17 DEBUG Redirected import module.plugins.hooks.ExternalScripts -> userplugins.hooks.ExternalScripts
16.05.2013 15:35:17 DEBUG Redirected import module.plugins.hooks.RestartFailed -> userplugins.hooks.RestartFailed
16.05.2013 15:35:17 DEBUG Redirected import module.plugins.hooks.XFileSharingPro -> userplugins.hooks.XFileSharingPro
16.05.2013 15:35:17 DEBUG Redirected import module.plugins.hooks.Checksum -> userplugins.hooks.Checksum
16.05.2013 15:35:17 DEBUG Redirected import module.plugins.hooks.ExtractArchive -> userplugins.hooks.ExtractArchive
16.05.2013 15:35:17 DEBUG Redirected import module.plugins.internal.UnRar -> userplugins.internal.UnRar
16.05.2013 15:35:17 INFO ExtractArchive: Attivato UnRar
16.05.2013 15:35:17 DEBUG Redirected import module.plugins.hooks.UnSkipOnFail -> userplugins.hooks.UnSkipOnFail
16.05.2013 15:35:17 DEBUG Redirected import module.plugins.hooks.CaptchaTrader -> userplugins.hooks.CaptchaTrader
16.05.2013 15:35:17 DEBUG Redirected import module.plugins.hooks.UpdateManager -> userplugins.hooks.UpdateManager
16.05.2013 15:35:17 INFO Plugins attivati: BypassCaptcha, CaptchaTrader, Checksum, ClickAndLoad, ExternalScripts, ExtractArchive, ImageTyperz, LinkdecrypterCom, RestartFailed, UnSkipOnFail, UpdateManager, XFileSharingPro
16.05.2013 15:35:17 INFO Plugins disattivati: AlldebridCom, Captcha9kw, CaptchaBrotherhood, DeathByCaptcha, DebridItaliaCom, DeleteFinished, DownloadScheduler, EasybytezCom, Ev0InFetcher, ExpertDecoders, HotFolder, IRCInterface, MergeFiles, MultiDebridCom, MultiHome, MultishareCz, Premium4Me, PremiumizeMe, RealdebridCom, RehostTo, ReloadCc, XMPPInterface, ZeveraCom
16.05.2013 15:35:17 INFO Tempo di download: True
16.05.2013 15:35:17 INFO ThriftBackend SSL in uso
16.05.2013 15:35:17 INFO Avvio ThriftBackend: 0.0.0.0:7227
16.05.2013 15:35:17 INFO Spazio libero: 1.33 TiB
16.05.2013 15:35:17 INFO Attivo gli Account...
16.05.2013 15:35:17 ERROR Errore backend remoto: [('PEM routines', 'PEM_read_bio', 'no start line'), ('SSL routines', 'SSL_CTX_use_PrivateKey_file', 'PEM lib')]
Traceback (most recent call last):
File "/opt/share/pyload/module/remote/RemoteManager.py", line 33, in run
self.serve()
File "/opt/share/pyload/module/remote/ThriftBackend.py", line 56, in serve
self.server.serve()
File "/opt/share/pyload/module/lib/thrift/server/TServer.py", line 101, in serve
self.serverTransport.listen()
File "/opt/share/pyload/module/remote/thriftbackend/Socket.py", line 108, in listen
ctx.use_privatekey_file(self.key)
Error: [('PEM routines', 'PEM_read_bio', 'no start line'), ('SSL routines', 'SSL_CTX_use_PrivateKey_file', 'PEM lib')]
16.05.2013 15:35:17 DEBUG Redirected import module.plugins.accounts.DdlstorageCom -> userplugins.accounts.DdlstorageCom
16.05.2013 15:35:17 DEBUG Redirected import module.plugins.internal.XFSPAccount -> userplugins.internal.XFSPAccount
16.05.2013 15:35:17 DEBUG Redirected import module.plugins.internal.SimpleHoster -> userplugins.internal.SimpleHoster
16.05.2013 15:35:17 INFO Starting threaded SSL webserver: 0.0.0.0:8000
Exception in thread Thread-6:
Traceback (most recent call last):
File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
self.run()
File "/opt/share/pyload/module/web/ServerThread.py", line 71, in run
self.start_threaded()
File "/opt/share/pyload/module/web/ServerThread.py", line 93, in start_threaded
webinterface.run_threaded(host=self.host, port=self.port, cert=self.cert, key=self.key)
File "/opt/share/pyload/module/web/webinterface.py", line 147, in run_threaded
run(app=web, host=host, port=port, server=CherryPyWSGI, quiet=True)
File "/opt/share/pyload/module/lib/bottle.py", line 2383, in run
server.run(app)
File "/opt/share/pyload/module/web/utils.py", line 137, in run
server.start()
File "/opt/share/pyload/module/lib/wsgiserver/__init__.py", line 1588, in start
self.bind(af, socktype, proto)
File "/opt/share/pyload/module/lib/wsgiserver/__init__.py", line 1628, in bind
ctx.use_privatekey_file(self.ssl_private_key)
Error: [('PEM routines', 'PEM_read_bio', 'no start line'), ('SSL routines', 'SSL_CTX_use_PrivateKey_file', 'PEM lib')]

16.05.2013 15:35:18 DEBUG DdlstorageCom: Get Account Info for trix00
16.05.2013 15:35:19 DEBUG DdlstorageCom: 12 June 2013
16.05.2013 15:35:19 DEBUG DdlstorageCom: Account Info: {'premium': True, 'validuntil': 1370988000.0, 'trafficleft': -1}
16.05.2013 15:35:19 DEBUG Redirected import module.plugins.accounts.EasybytezCom -> userplugins.accounts.EasybytezCom
16.05.2013 15:35:19 DEBUG EasybytezCom: Get Account Info for trix00
16.05.2013 15:35:20 DEBUG EasybytezCom: 14 June 2013
16.05.2013 15:35:20 DEBUG EasybytezCom: Account Info: {'premium': True, 'validuntil': 1371160800.0, 'trafficleft': -1}
16.05.2013 15:35:20 INFO Activating Plugins...


Anyone has any idea for fixing it?

Thx in advance !
Giuseppe
<<

kbo

Member

Posts: 34

Joined: Sun Feb 10, 2013 10:32 pm

Post Thu May 16, 2013 6:49 pm

Re: pyload ssl problem : Exception in thread Thread-5

I guess, your SSL certificate and/or key are either not in PEM format or not readable for any other reason. Maybe openssl says something:

  Code:
openssl x509 -noout -in <your cert> -text # check if cert file is damaged
su -c "cat <your cert> <your key>" -u <your pyLoad user> # check if cert is readable
file <your key> <your cert> # check for wrong file type, should print "PEM RSA private key" and "PEM certificate"
<<

trix00

Posts: 8

Joined: Tue Apr 16, 2013 2:13 pm

Post Fri May 17, 2013 4:10 pm

Re: pyload ssl problem : Exception in thread Thread-5

Hi kbo , and thx for your answer

The first test shoudl be ok

# openssl x509 -noout -in ssl.crt -textCertificate:
Data:
Version: 3 (0x2)
Serial Number:
86:8f:38:f5:de:26:52:69
Signature Algorithm: sha1WithRSAEncryption
Issuer: C=IT, ST=Some-State, O=Internet Widgits Pty Ltd, CN=beps
Validity
Not Before: May 16 12:02:58 2013 GMT
Not After : Mar 16 05:34:42 1977 GMT
Subject: C=IT, ST=Some-State, O=Internet Widgits Pty Ltd, CN=beps
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public Key: (1024 bit)
Modulus (1024 bit):
00:a3:0f:2f:71:ca:fc:da:91:1a:c9:9a:37:ce:d8:
70:71:fb:f5:af:dc:03:19:24:a3:fa:41:52:a4:7d:
a7:34:99:02:07:19:72:ed:92:41:ad:7e:b0:74:a0:
8c:67:0c:d4:d2:8a:d8:26:64:5a:e7:cc:74:66:30:
1d:f5:1c:e7:64:1a:36:c6:a9:44:86:4f:4c:bc:f7:
af:2a:4f:04:a2:eb:82:f7:f6:3b:d8:0e:b7:f9:bb:
c5:9e:b7:bb:7c:3c:8a:dc:21:0d:d7:c3:bb:9e:cf:
a5:5c:90:74:4a:b9:d3:79:86:6e:53:9c:e3:a0:44:
58:ff:e6:04:30:99:5a:47:fb
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
F5:60:D9:0E:E5:57:1F:A7:AA:D0:3C:6C:74:1B:FE:C7:1A:35:6B:31
X509v3 Authority Key Identifier:
keyid:F5:60:D9:0E:E5:57:1F:A7:AA:D0:3C:6C:74:1B:FE:C7:1A:35:6B:31
DirName:/C=IT/ST=Some-State/O=Internet Widgits Pty Ltd/CN=beps
serial:86:8F:38:F5:DE:26:52:69

X509v3 Basic Constraints:
CA:TRUE
Signature Algorithm: sha1WithRSAEncryption
9f:11:19:e8:b4:23:f9:06:39:52:96:45:88:5d:96:17:bf:b4:
2e:b8:8a:3c:38:b5:34:cb:5e:43:67:61:8d:08:db:17:57:dd:
55:43:32:a8:49:66:7a:a7:81:d2:9f:15:6b:ce:9c:91:0f:fb:
40:35:c9:7f:53:7a:a8:68:af:23:03:37:1c:d6:b5:00:81:aa:
ed:7d:d0:fc:46:64:18:a4:b9:eb:4d:83:f3:dd:8b:b8:55:c6:
2f:bd:9d:14:b7:bb:93:23:64:e3:48:2c:1b:d3:68:cb:3b:ca:
d7:a4:8c:c0:d2:04:08:f4:8c:59:49:6b:ea:ea:7a:03:08:2c:
22:b5


In the second one , su doesn't accept the option -u , so i can do just "su -c "cat ssl.crt ssl.key""

# su -c "cat ssl.crt ssl.key"
-----BEGIN CERTIFICATE-----
MIIC3jCCAkegAwIBAgIJAIaPOPXeJlJpMA0GCSqGSIb3DQEBBQUAMFQxCzAJBgNV
BAYTAklUMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX
aWRnaXRzIFB0eSBMdGQxDTALBgNVBAMTBGJlcHMwHhcNMTMwNTE2MTIwMjU4WhcN
NzcwMzE2MDUzNDQyWjBUMQswCQYDVQQGEwJJVDETMBEGA1UECBMKU29tZS1TdGF0
ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkg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i6lbnugV0WnMLmBOpYMoDY3cHt4BN9Yk3EDvckCQQDO/oMUSQdqsQhg
oq3wYyLuX90ysLhiTiroDbTCJOUe266XZp0B2AVSmpPiI2zwR8DU/dtya2Aff+eD
y7vma049AkEAyanfPp2a/CX3GjSMTgn9S1Pt0JovGriTMiGs195Q/gtFRNuZBZeN
DLFWqSgRW19AeNPZscSwXODoM2NG1c/KlwJAFCkHvT8LoOGTLk5J4KLXMR5XHevG
WZTBaw6Cr3IGesXssERHQHm4sv3pL1pB7vkeF+CNsgwxNYAwnU6Hg36qBQJBALOD
vxG7NHLOzPeL3XW+mLbMgH9YMSRFN+rBZV5ILarnl4LjRIVg0hOBbZZo74J5+SdV
1ozTfPdA0hKkhjLgpQMCQDgDO6npOX9u+MTH9OkJBtcpabk5+45XThgjHG0K3IP9
wmE8a0x3CpVAFBRoKxfjc5O9vE05iKrUp01+/prcdVc=
-----END RSA PRIVATE KEY-----


In the third one i think i have some problems bcs :

# file ssl.key ssl.crt
ssl.key: ASCII text
ssl.crt: ASCII text


Have you any suggestion ?

Thx in advance
Giuseppe
<<

trix00

Posts: 8

Joined: Tue Apr 16, 2013 2:13 pm

Post Fri May 17, 2013 4:14 pm

Re: pyload ssl problem : Exception in thread Thread-5

and then....my ssl files permissions are :

# ls -lart ssl*
-rw-r--r-- 1 root root 887 May 16 14:02 ssl.key
-rw-r--r-- 1 root root 660 May 16 14:02 ssl.csr
-rw-r--r-- 1 root root 1054 May 16 14:02 ssl.crt


Byez
<<

kbo

Member

Posts: 34

Joined: Sun Feb 10, 2013 10:32 pm

Post Fri May 17, 2013 7:13 pm

Re: pyload ssl problem : Exception in thread Thread-5

Fortunately, your certificate is a self-signed (free) one. I hoped you would not post the complete output of the command as it contains the full secret key for your certificate. After getting pyLoad to work with SSL, I would suggest you to generate a new certificate/key pair.

I was able to verify that your certificate and key are both encoded correctly and complete. So I think the problem might be in pyLoad's settings.
Have you tried specifying the absolute path to both files in pyLoads settings?
Do you run pyLoad with a non-root user? and if you do, does that use have execution privileges on every directory in the cert and key file's path?

Return to General

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for blacklist.org. Modified by pyLoad - Team © 2008-2011