Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #28961
Closed
Open
Created Dec 30, 2018 by starlight@starlight

exception in descriptor/remote.py downloading large server descriptors via orport

download_descriptor.py works ok when descriptors are short:

bash-4.1$ python3 download_descriptor.py --orport 45.59.127.53:443 -f A0ECF41498288C3BFA33005B7C92BC791B06AB77
Downloading server descriptor from 45.59.127.53:443...

router erosi 45.59.127.53 443 0 80
identity-ed25519
-----BEGIN ED25519 CERT-----
AQQABo/EAV5E1oAtsNKuEr2iE+FhLa5WSYx+pK1VVAUrFANbbu6yAQAgBABnngvA
.
.
.

not so when they are long:

bash-4.1$ python3 download_descriptor.py --orport 199.249.230.82:443 -f A0DB820FEC87C0405F7BF05DEE5E4ADED2BB9904
Downloading server descriptor from 199.249.230.82:443...

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py", line 560, in _download_descriptors
    self.content, self.reply_headers = _download_from_orport(endpoint, self.compression, self.resource)
  File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py", line 969, in _download_from_orport
    response = b''.join([cell.data for cell in circ.send(RelayCommand.DATA, request, stream_id = 1)])
  File "/usr/local/lib/python3.7/site-packages/stem/client/__init__.py", line 262, in send
    raise stem.ProtocolError('Circuit response should be a series of RELAY cells, but received an unexpected size for a response: %i' % len(reply))
stem.ProtocolError: Circuit response should be a series of RELAY cells, but received an unexpected size for a response: 4048

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py", line 560, in _download_descriptors
    self.content, self.reply_headers = _download_from_orport(endpoint, self.compression, self.resource)
  File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py", line 969, in _download_from_orport
    response = b''.join([cell.data for cell in circ.send(RelayCommand.DATA, request, stream_id = 1)])
  File "/usr/local/lib/python3.7/site-packages/stem/client/__init__.py", line 262, in send
    raise stem.ProtocolError('Circuit response should be a series of RELAY cells, but received an unexpected size for a response: %i' % len(reply))
stem.ProtocolError: Circuit response should be a series of RELAY cells, but received an unexpected size for a response: 4048

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "download_descriptor.py", line 133, in <module>
    main()
  File "download_descriptor.py", line 115, in main
    endpoints = [args.download_from],
  File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py", line 484, in run
    return list(self._run(suppress))
  File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py", line 495, in _run
    raise self.error
  File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py", line 560, in _download_descriptors
    self.content, self.reply_headers = _download_from_orport(endpoint, self.compression, self.resource)
  File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py", line 969, in _download_from_orport
    response = b''.join([cell.data for cell in circ.send(RelayCommand.DATA, request, stream_id = 1)])
  File "/usr/local/lib/python3.7/site-packages/stem/client/__init__.py", line 262, in send
    raise stem.ProtocolError('Circuit response should be a series of RELAY cells, but received an unexpected size for a response: %i' % len(reply))
stem.ProtocolError: Circuit response should be a series of RELAY cells, but received an unexpected size for a response: 4048
]}}

unencrypted no problem:

{{{
bash-4.1$ python3 download_descriptor.py --dirport 199.249.230.82:80 -f A0DB820FEC87C0405F7BF05DEE5E4ADED2BB9904                        
Downloading server descriptor from 199.249.230.82:80...                                                                                          

router QuintexAirVPN29 199.249.230.82 443 0 80
identity-ed25519                              
-----BEGIN ED25519 CERT-----                  
AQQABo5iATaZrxEunmfnvKy6Y+5N5M7B7+8ofuFMdtlmcBDX+/QFAQAgBAAmRN42
.
.
.

versions:

libffi-3.2.1 Python-3.7.1 python-cryptography-2.4.2 openssl-1.0.2 stem-20181216-git0EB8FDA3

https://stem.torproject.org/tutorials/examples/download_descriptor.html as of date ticket opened

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking