tntech-ngin / ndn-hydra

ndn-hydra: A federated data repository with five attributes: resiliency, scalability, usability, efficiency, and security.
https://hydra-repo.io/
Apache License 2.0
2 stars 1 forks source link

[Fetch] Timeout while fetching file #23

Closed GportDev closed 5 months ago

GportDev commented 5 months ago

CLIENT

Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.8/site-packages/ndn/app.py", line 237, in _wait_for_data
    name, meta_info, content, sig, raw_packet = await aio.wait_for(future, timeout=lifetime/1000.0)
  File "/usr/lib/python3.8/asyncio/tasks.py", line 501, in wait_for
    raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/.local/bin/ndn-hydra-client", line 11, in <module>
    load_entry_point('ndn-hydra', 'console_scripts', 'ndn-hydra-client')()
  File "/home/ubuntu/gabriel/ndn-hydra/ndn_hydra/client/main.py", line 166, in main
    app.run_forever(after_start=run_hydra_client(app, args))
  File "/home/ubuntu/.local/lib/python3.8/site-packages/ndn/app.py", line 325, in run_forever
    aio.run(self.main_loop(after_start))
  File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/ndn/app.py", line 294, in main_loop
    await task
  File "/home/ubuntu/.local/lib/python3.8/site-packages/ndn/app.py", line 269, in starting_task
    await after_start
  File "/home/ubuntu/gabriel/ndn-hydra/ndn_hydra/client/main.py", line 149, in run_hydra_client
    await client.fetch(filename, args.path, True)
  File "/home/ubuntu/gabriel/ndn-hydra/ndn_hydra/client/main.py", line 125, in fetch
    return await self.cfetch.fetch_file(file_name, local_filename, overwrite)
  File "/home/ubuntu/gabriel/ndn-hydra/ndn_hydra/client/functions/fetch.py", line 57, in fetch_file
    data_name, meta_info, content, data_bytes = await self.app.express_interest(
  File "/home/ubuntu/.local/lib/python3.8/site-packages/ndn/app.py", line 241, in _wait_for_data
    raise InterestTimeout()
ndn.types.InterestTimeout

NODE 2

future: <Task finished name='Task-783' coro=<NDNApp._receive() done, defined at /home/ubuntu/.local/lib/python3.8/site-packages/ndn/app.py:70> exception=AttributeError("'ReadHandle' object has no attribute 'config'")>
Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.8/site-packages/ndn/app.py", line 105, in _receive
    await self._on_interest(name, param, app_param, sig, raw_packet=data)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/ndn/app.py", line 514, in _on_interest
    node.callback(name, param, app_param, **kwargs)
  File "/home/ubuntu/gabriel/ndn-hydra/ndn_hydra/repo/handles/read_handle.py", line 92, in _on_interest
    self._reset_file_expiration(file_name)
  File "/home/ubuntu/gabriel/ndn-hydra/ndn_hydra/repo/handles/read_handle.py", line 140, in _reset_file_expiration
    if self.config['file_expiration'] == 0: # no need to reset if file_expiration in config is set to 0
AttributeError: 'ReadHandle' object has no attribute 'config'
sankalpatimilsina12 commented 5 months ago

Addressed in the #28 PR.