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

BadStatusLine issue with greenlet ??? #40

Open
darrynza opened this issue Apr 16, 2015 · 6 comments
Open

BadStatusLine issue with greenlet ??? #40

darrynza opened this issue Apr 16, 2015 · 6 comments

Comments

@darrynza
Copy link

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 340, in run
result = self._run(_self.args, *_self.kwargs)
File "iloot.py", line 301, in download_chunks
container.host_info.uri, "", headers)
File "iloot.py", line 95, in probobuf_request
response = conn.getresponse()
File "/usr/lib/python2.7/httplib.py", line 1045, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 409, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 373, in _read_status
raise BadStatusLine(line)
BadStatusLine: ''
<Greenlet at 0xb56467acL: <bound method MobileBackupClient.download_chunks of <main.MobileBackupClient object at 0xb6c59aac>>([<chunkserver_pb2.FileChecksumStorageHostChunkList)> failed with BadStatusLine

Traceback (most recent call last):
File "iloot.py", line 627, in
download_backup(args.apple_id, args.password, args.output, args.item_types, args.snapshot, args.combined, args.itunes_style, args.domain, args.threads)
File "iloot.py", line 588, in download_backup
client.download(UDID, types)
File "iloot.py", line 465, in download
self.authorize_get(authTokens, snapshot)
File "iloot.py", line 256, in authorize_get
for res in pool.imap_unordered(self.download_chunks, containers):
File "/usr/local/lib/python2.7/dist-packages/gevent/pool.py", line 220, in next
raise value.exc
httplib.BadStatusLine: ''

Thanks :)

@hackappcom
Copy link
Owner

Hi, seems to be iCloud server rejects so many threads, try to play with DEFAULT THREADS global variable.

@darrynza
Copy link
Author

Hi,
So I'm down to 5 threads at the moment , testing it but it dies at random places. i got 330MB of a 1GB backup on 50 threads, then 160MB/1GB on 10/20 threads.. you sure this is the reason?

this error is what I am getting now, seems more verbose than the previous one and seems to point to SSL issues?

File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 340, in run
result = self._run(_self.args, *_self.kwargs)
File "./iloot.py", line 302, in download_chunks
container.host_info.uri, "", headers)
File "./iloot.py", line 95, in probobuf_request
request = conn.request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 973, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1007, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 969, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 829, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 791, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 1176, in connect
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
File "/usr/local/lib/python2.7/dist-packages/gevent/_ssl2.py", line 399, in wrap_socket
ciphers=ciphers)
File "/usr/local/lib/python2.7/dist-packages/gevent/_ssl2.py", line 93, in init
self.do_handshake()
File "/usr/local/lib/python2.7/dist-packages/gevent/_ssl2.py", line 310, in do_handshake
return self._sslobj.do_handshake()
SSLError: [Errno 8] _ssl.c:510: EOF occurred in violation of protocol
<Greenlet at 0xb4348b6cL: <bound method MobileBackupClient.download_chunks of <main.MobileBackupClient object at 0xb6c1cc4c>>([<chunkserver_pb2.FileChecksumStorageHostChunkList)> failed with SSLError

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 340, in run
result = self._run(_self.args, *_self.kwargs)
File "./iloot.py", line 302, in download_chunks
container.host_info.uri, "", headers)
File "./iloot.py", line 96, in probobuf_request
response = conn.getresponse()
File "/usr/lib/python2.7/httplib.py", line 1045, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 409, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 373, in _read_status
raise BadStatusLine(line)
BadStatusLine: ''
<Greenlet at 0xb434b20cL: <bound method MobileBackupClient.download_chunks of <main.MobileBackupClient object at 0xb6c1cc4c>>([<chunkserver_pb2.FileChecksumStorageHostChunkList)> failed with BadStatusLine

Traceback (most recent call last):
File "./iloot.py", line 628, in
download_backup(args.apple_id, args.password, args.output, args.item_types, args.snapshot, args.combined, args.itunes_style, args.domain, args.threads)
File "./iloot.py", line 589, in download_backup
client.download(UDID, types)
File "./iloot.py", line 466, in download
self.authorize_get(authTokens, snapshot)
File "./iloot.py", line 257, in authorize_get
for res in pool.imap_unordered(self.download_chunks, containers):
File "/usr/local/lib/python2.7/dist-packages/gevent/pool.py", line 220, in next
raise value.exc
ssl.SSLError: [Errno 8] _ssl.c:510: EOF occurred in violation of protocol

@hackappcom
Copy link
Owner

Damn, I've seen this few times too.
Empty reply (EOF) could be antibot protection, or just icloud bugs. All I can recommend now is to launch iloot once again. I have plans to write retry-on-exception code, but right now I can't say when.

@darrynza
Copy link
Author

Cool ,

thanks alot for the awesome app and the work you put into. It is much
appreciated :)... And keep up the good work, I think we can close this
thread.

keep well and all the best
On 17 Apr 2015 12:08, "HackApp GIT" notifications@github.com wrote:

Damn, I've seen this few times too.
Empty reply (EOF) could be antibot protection, or just icloud bugs. All I
can recommend now is to launch iloot once again. I have plans to write
retry-on-exception code, but right now I can't say when.


Reply to this email directly or view it on GitHub
#40 (comment).

@DaSnafoo
Copy link

Were you ever able to find a solution for this? I'm having the same exact issue.

deresov added a commit to deresov/iloot that referenced this issue Jun 6, 2015
…es are resolved:

hackappcom#47 - "EOF in violation of protocol";
hackappcom#40 - "Bad status line";
@lancer2002
Copy link

I met this problem too.

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

4 participants