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

suggestion: make the use of ascp's management port optional #174

Open
junkimu opened this issue Feb 11, 2025 · 4 comments
Open

suggestion: make the use of ascp's management port optional #174

junkimu opened this issue Feb 11, 2025 · 4 comments

Comments

@junkimu
Copy link

junkimu commented Feb 11, 2025

We currently have to manually patch out the management port code due to two issues:

  1. Sometimes ascp.exe fails to start due to failures opening or connecting to the port. Log at bottom.
  2. There is a long-standing bug in ascli where the download progress appears to be stuck on 99% or 100% forever. Reproduction rate is variable but some users are able to hit this fairly regularly. We believe this is happening due ascp somehow exiting without ascli being able to detect the port closing. Removing the management port code from ascli eliminates this issue from occurring.
ascp.exe: required management connection to port localhost:54792 failed.
ascp.exe: failed to connect to management socket, exiting.

E, [2025-02-05T10:39:48.114953 #13096] ERROR -- : ascp failed (pid 45812 exit 1)

W, [2025-02-05T10:39:48.115592 #13096]  WARN -- : An error occurred during transfer: assertion failed: timeout waiting mgt port connect (select not readable): C:/usr/bin/ascli/lib/ruby/gems/3.3.0/gems/aspera-cli-4.20.0/lib/aspera/agent/direct.rb:178:in `start_and_monitor_process'

W, [2025-02-05T10:39:48.116014 #13096]  WARN -- : Resuming in 2 seconds (retry left:6)

ascp.exe: required management connection to port localhost:54799 failed.
ascp.exe: failed to connect to management socket, exiting.

E, [2025-02-05T10:39:54.394470 #13096] ERROR -- : ascp failed (pid 23736 exit 1)

W, [2025-02-05T10:39:54.394879 #13096]  WARN -- : An error occurred during transfer: assertion failed: timeout waiting mgt port connect (select not readable): C:/usr/bin/ascli/lib/ruby/gems/3.3.0/gems/aspera-cli-4.20.0/lib/aspera/agent/direct.rb:178:in `start_and_monitor_process'

E, [2025-02-05T10:39:54.395354 #13096] ERROR -- : non-retryable error

ERROR: Transfer: assertion failed: timeout waiting mgt port connect (select not readable): C:/usr/bin/ascli/lib/ruby/gems/3.3.0/gems/aspera-cli-4.20.0/lib/aspera/agent/direct.rb:178:in `start_and_monitor_process'
@laurent-martin
Copy link
Member

An alternative could be to use the transfer daemon instead of direct ascp, with option: --transfer=trsdk

@laurent-martin
Copy link
Member

The normal behaviour is:

  • ascli binds on a random port (port 0 leads to ephemeral port)
  • ascli starts ascp and provides that port number, where ascp shall connect to
  • ascli waits for ascp connection to that port (up to 2 seconds, settable by spawn_timeout_sec)

Here the problem is that ascp complains that nothing is listening on that port ...

The problem is probably that current code calls listen just after starting ascp, but it shall have been called before.

@KarT-Kn
Copy link

KarT-Kn commented Feb 21, 2025

An alternative could be to use the transfer daemon instead of direct ascp, with option: --transfer=trsdk

I'm getting this below error, when tried with the above mentioned option

<internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require': cannot load such file -- grpc (LoadError)
	from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
	from /usr/local/bundle/gems/aspera-cli-4.20.0/lib/transfer_services_pb.rb:4:in `<top (required)>'
	from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
	from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
	from /usr/local/bundle/gems/aspera-cli-4.20.0/lib/aspera/agent/trsdk.rb:10:in `<top (required)>'
	from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
	from <internal:/usr/local/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
	from /usr/local/bundle/gems/aspera-cli-4.20.0/lib/aspera/agent/base.rb:13:in `factory_create'
	from /usr/local/bundle/gems/aspera-cli-4.20.0/lib/aspera/cli/transfer_agent.rb:139:in `agent_instance'
	from /usr/local/bundle/gems/aspera-cli-4.20.0/lib/aspera/cli/transfer_agent.rb:261:in `start'
	from /usr/local/bundle/gems/aspera-cli-4.20.0/lib/aspera/cli/plugins/node.rb:345:in `execute_command_gen3'
	from /usr/local/bundle/gems/aspera-cli-4.20.0/lib/aspera/cli/plugins/node.rb:365:in `execute_simple_common'
	from /usr/local/bundle/gems/aspera-cli-4.20.0/lib/aspera/cli/plugins/node.rb:754:in `execute_action'
	from /usr/local/bundle/gems/aspera-cli-4.20.0/lib/aspera/cli/main.rb:303:in `process_command_line'
	from /usr/local/bundle/gems/aspera-cli-4.20.0/bin/ascli:24:in `<top (required)>'
	from /usr/local/bundle/bin/ascli:25:in `load'
	from /usr/local/bundle/bin/ascli:25:in `<main>'

@laurent-martin
Copy link
Member

right, refer to doc:

https://github.com/IBM/aspera-cli#agent-transfer-sdk

you need to install the grpc gem:

gem install grpc

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

3 participants