ArchiveTeam / wpull

Wget-compatible web downloader and crawler.
GNU General Public License v3.0
557 stars 77 forks source link

Failed action Passive mode #296

Closed Arkiver2 closed 6 years ago

Arkiver2 commented 8 years ago

It looks like wpull gives an error if the FTP server can't do passive mode.

Log:

Starting CheckIP for Item 
Checking IP address.
Finished CheckIP for Item 
Starting GetItemFromTracker for Item 
Received item 'iaurl:archiveteam_ftp_items_2015121201:eab.t28.net_180' from tracker
Starting PrepareDirectories for Item iaurl:archiveteam_ftp_items_2015121201:eab.t28.net_180
Finished PrepareDirectories for Item iaurl:archiveteam_ftp_items_2015121201:eab.t28.net_180
Starting WgetDownload for Item iaurl:archiveteam_ftp_items_2015121201:eab.t28.net_180
INFO Using Python hook script ftp.py.
INFO Fetching \u2018ftp://eab.t28.net/mirror/grandis.nu/Commodore_Amiga/Collection/BBS/Games%20Collection%201.rar\u2019.
ERROR Fetching \u2018ftp://eab.t28.net/mirror/grandis.nu/Commodore_Amiga/Collection/BBS/Games%20Collection%201.rar\u2019 encountered an error: ('Failed action Passive mode: 500 "\'PASV \': command not understood."', 500)
INFO Fetching \u2018ftp://eab.t28.net/mirror/grandis.nu/Commodore_Amiga/Collection/BBS/Games%20Collection%201.rar\u2019.
ERROR Fetching \u2018ftp://eab.t28.net/mirror/grandis.nu/Commodore_Amiga/Collection/BBS/Games%20Collection%201.rar\u2019 encountered an error: ('Failed action Passive mode: 500 "\'PASV \': command not understood."', 500)
INFO Fetching \u2018ftp://eab.t28.net/mirror/grandis.nu/Commodore_Amiga/Collection/BBS/Games%20Collection%201.rar\u2019.
ERROR Fetching \u2018ftp://eab.t28.net/mirror/grandis.nu/Commodore_Amiga/Collection/BBS/Games%20Collection%201.rar\u2019 encountered an error: ('Failed action Passive mode: 500 "\'PASV \': command not understood."', 500)
INFO Fetching \u2018ftp://eab.t28.net/mirror/grandis.nu/Commodore_Amiga/Collection/BBS/Games%20Collection%201.rar\u2019.
ERROR Fetching \u2018ftp://eab.t28.net/mirror/grandis.nu/Commodore_Amiga/Collection/BBS/Games%20Collection%201.rar\u2019 encountered an error: ('Failed action Passive mode: 500 "\'PASV \': command not understood."', 500)
INFO Fetching \u2018ftp://eab.t28.net/mirror/grandis.nu/Commodore_Amiga/Collection/BBS/Games%20Collection%201.rar\u2019.
ERROR Fetching \u2018ftp://eab.t28.net/mirror/grandis.nu/Commodore_Amiga/Collection/BBS/Games%20Collection%201.rar\u2019 encountered an error: ('Failed action Passive mode: 500 "\'PASV \': command not understood."', 500)
INFO Fetching \u2018ftp://eab.t28.net/mirror/grandis.nu/Commodore_Amiga/Collection/BBS/Games%20Collection%201.rar\u2019.
ERROR Fetching \u2018ftp://eab.t28.net/mirror/grandis.nu/Commodore_Amiga/Collection/BBS/Games%20Collection%201.rar\u2019 encountered an error: ('Failed action Passive mode: 500 "\'PASV \': command not understood."', 500)
ERROR Fatal exception.
Traceback (most recent call last):
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/processor/ftp.py", line 289, in _fetch
  File "/home/box/.local/lib/python3.4/site-packages/trollius/tasks.py", line 251, in _step
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/ftp/client.py", line 130, in fetch
  File "/home/box/.local/lib/python3.4/site-packages/trollius/tasks.py", line 251, in _step
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/ftp/client.py", line 338, in _open_data_stream
  File "/home/box/.local/lib/python3.4/site-packages/trollius/tasks.py", line 251, in _step
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/ftp/command.py", line 126, in setup_data_stream
  File "/home/box/.local/lib/python3.4/site-packages/trollius/tasks.py", line 253, in _step
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/ftp/command.py", line 95, in passive_mode
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/ftp/command.py", line 47, in raise_if_not_match
wpull.ftp.util.FTPServerError: ('Failed action Passive mode: 500 "\'PASV \': command not understood."', 500)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/app.py", line 128, in run
  File "/home/box/.local/lib/python3.4/site-packages/trollius/tasks.py", line 251, in _step
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/engine.py", line 278, in __call__
  File "/home/box/.local/lib/python3.4/site-packages/trollius/tasks.py", line 253, in _step
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/engine.py", line 67, in _run_workers
  File "/home/box/.local/lib/python3.4/site-packages/trollius/futures.py", line 287, in result
  File "/home/box/.local/lib/python3.4/site-packages/trollius/tasks.py", line 251, in _step
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/engine.py", line 146, in _run_worker
  File "/home/box/.local/lib/python3.4/site-packages/trollius/tasks.py", line 251, in _step
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/engine.py", line 327, in _process_item
  File "/home/box/.local/lib/python3.4/site-packages/trollius/tasks.py", line 251, in _step
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/engine.py", line 384, in _process_url_item
  File "/home/box/.local/lib/python3.4/site-packages/trollius/tasks.py", line 251, in _step
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/processor/delegate.py", line 29, in process
  File "/home/box/.local/lib/python3.4/site-packages/trollius/tasks.py", line 251, in _step
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/processor/ftp.py", line 133, in process
  File "/home/box/.local/lib/python3.4/site-packages/trollius/tasks.py", line 251, in _step
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/processor/ftp.py", line 188, in process
  File "/home/box/.local/lib/python3.4/site-packages/trollius/tasks.py", line 251, in _step
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/processor/ftp.py", line 322, in _fetch
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/processor/rule.py", line 313, in handle_error
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/processor/rule.py", line 364, in consult_error_hook
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/hook.py", line 56, in call_hook
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/hook.py", line 598, in _handle_error
  File "/home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/hook.py", line 160, in dispatch_handle_error
  File "ftp.py", line 63, in handle_error
    raise Exception('Something went wrong... ABORTING...')
Exception: Something went wrong... ABORTING...
CRITICAL Sorry, Wpull unexpectedly crashed.
CRITICAL Please report this problem to the authors at Wpull's issue tracker so it may be fixed. If you know how to program, maybe help us fix it? Thank you for helping us help you help us all.
INFO FINISHED.
INFO Duration: 0:00:27. Speed: -- B/s.
INFO Downloaded: 0 files, 0.0 B.
INFO Exiting with status 1.
Task was destroyed but it is pending!
task: <Task pending coro=<clean() running at /home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/connection.py:362> wait_for=<Task finished coro=<clean() done, defined at /home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/connection.py:119> result=None> cb=[Task._wakeup()]>
Task was destroyed but it is pending!
task: <Task pending coro=<release() running at /home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/connection.py:304> wait_for=<Task pending coro=<clean() done, defined at /home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/connection.py:349> wait_for=<Task finished coro=<clean() done, defined at /home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/connection.py:119> result=None> cb=[Task._wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<_run_producer_wrapper() running at /home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/engine.py:95> wait_for=<Task pending coro=<_run_producer() running at /home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/engine.py:121> wait_for=<Task pending coro=<join() running at /home/box/.local/lib/python3.4/site-packages/trollius/queues.py:289> wait_for=<Task pending coro=<wait() running at /home/box/.local/lib/python3.4/site-packages/trollius/locks.py:226> wait_for=<Future pending cb=[Task._wakeup()]> cb=[Task._wakeup()]> cb=[Task._wakeup()]> cb=[Task._wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<_run_producer() running at /home/box/wpull/freezer/pyinstaller/wpull_env/lib/python3.4/site-packages/wpull/engine.py:121> wait_for=<Task pending coro=<join() running at /home/box/.local/lib/python3.4/site-packages/trollius/queues.py:289> wait_for=<Task pending coro=<wait() running at /home/box/.local/lib/python3.4/site-packages/trollius/locks.py:226> wait_for=<Future pending cb=[Task._wakeup()]> cb=[Task._wakeup()]> cb=[Task._wakeup()]> cb=[Task._wakeup()]>
Task was destroyed but it is pending!
task: <Task pending coro=<join() running at /home/box/.local/lib/python3.4/site-packages/trollius/queues.py:289> wait_for=<Task pending coro=<wait() running at /home/box/.local/lib/python3.4/site-packages/trollius/locks.py:226> wait_for=<Future pending cb=[Task._wakeup()]> cb=[Task._wakeup()]> cb=[Task._wakeup()]>
Task was destroyed but it is pending!
task: <Task pending coro=<wait() running at /home/box/.local/lib/python3.4/site-packages/trollius/locks.py:226> wait_for=<Future pending cb=[Task._wakeup()]> cb=[Task._wakeup()]>
Process WgetDownload returned exit code 1 for Item iaurl:archiveteam_ftp_items_2015121201:eab.t28.net_180
Retrying WgetDownload for Item iaurl:archiveteam_ftp_items_2015121201:eab.t28.net_180 after 30 seconds...
chfoo commented 8 years ago

Yes that is expected behavior for now until active mode is supported. See Issue #243.