IBM / aspera-cli

IBM Aspera CLI
Apache License 2.0
73 stars 17 forks source link

API version v2 not supported, reverting to v1 during the Upload and download from ascli #145

Open xavierv79 opened 1 month ago

xavierv79 commented 1 month ago

Hi Team,

We are finding "API version v2 not supported, reverting to v1" message during the Upload and download from ascli also getting ruby SSL error during the Upload.

Please help to fix it.

Download

ascli shares files download --to-folder=. Folder/File --transfer=httpgw --transfer-info=@json:'{"url":"https://example.com/aspera/http-gwy"}'
W, [2024-07-08T16:15:15.901805 #21488]  WARN -- : API version v2 not supported, reverting to v1
Time: 00:00:35 ===================================== 100% 2 Mbps Time: 00:00:35

Upload message:-

ascli share files upload --to-folder=folder test.txt --transfer=httpgw --transfer-info=@json:'{"url":"https://example.com/aspera/http-gwy"}'
W, [2024-07-08T16:22:20.268662 #6128]  WARN -- : API version v2 not supported, reverting to v1
Time: 00:00:02 ===================================== 100% 0 Mbps Time: 00:00:02
#<Thread:0x000002830c17cff0 D:/PDS/Ruby/Ruby33-x64/lib/ruby/gems/3.3.0/gems/aspera-cli-4.17.0/lib/aspera/agent/httpgw.rb:193 run> terminated with exception (report_on_exception is true):
D:/PDS/Ruby/Ruby33-x64/lib/ruby/3.3.0/openssl/buffering.rb:80:in `sysread': SSL_read: unexpected eof while reading (OpenSSL::SSL::SSLError)
        from D:/PDS/Ruby/Ruby33-x64/lib/ruby/3.3.0/openssl/buffering.rb:80:in `fill_rbuff'
        from D:/PDS/Ruby/Ruby33-x64/lib/ruby/3.3.0/openssl/buffering.rb:329:in `eof?'
        from D:/PDS/Ruby/Ruby33-x64/lib/ruby/3.3.0/net/protocol.rb:138:in `eof?'
        from D:/PDS/Ruby/Ruby33-x64/lib/ruby/gems/3.3.0/gems/aspera-cli-4.17.0/lib/aspera/agent/httpgw.rb:121:in `process_read_thread'
        from D:/PDS/Ruby/Ruby33-x64/lib/ruby/gems/3.3.0/gems/aspera-cli-4.17.0/lib/aspera/agent/httpgw.rb:193:in `block in upload'
ERROR: SSL: SSL_read: unexpected eof while reading
laurent-martin commented 1 month ago

Note that ascli version 4.18 was released yesterday. So, if possible update with: gem update aspera-cli

Also, note that your HTTPGW is version 2.2.1 and latest version is 2.3.0

See aspera-cli latest version manual:

https://github.com/IBM/aspera-cli?tab=readme-ov-file#agent-http-gateway

By default ascli expects that gateway supports v2 of the protocol, and if not is reverts to v1 but displays a warning.

To force v1 and remove the warning, one can add transfer_info parameter : api_version to v1.

Best in your case is to upgrade the HTTPGW to 2.3.0. Also, use latest ascli 4.18.0.

xavierv79 commented 1 month ago

Hi Laurent,

We have Upgraded our aspera-cli to 4.18.0 and still we are getting this issue.

root@l2111940b150001 azadmin]# ascli shares files upload --to-folder=aspera-test-02.txt --transfer=httpgw --transfer-info=@json:'{"url":"https://exapmple.com/aspera/http-gwy"}'
W, [2024-07-12T05:04:07.557905 #473020]  WARN -- : API version v2 not supported, reverting to v1
 Time: 00:00:01 ================================================================================================================================================== 100% 0 Mbps Time: 00:00:01
#<Thread:0x00007f59943cdb48 /usr/local/share/gems/gems/aspera-cli-4.18.0/lib/aspera/api/httpgw.rb:184 run> terminated with exception (report_on_exception is true):
/usr/share/ruby/openssl/buffering.rb:80:in `sysread': SSL_read: unexpected eof while reading (OpenSSL::SSL::SSLError)
        from /usr/share/ruby/openssl/buffering.rb:80:in `fill_rbuff'
        from /usr/share/ruby/openssl/buffering.rb:323:in `eof?'
        from /usr/share/ruby/net/protocol.rb:136:in `eof?'
        from /usr/local/share/gems/gems/aspera-cli-4.18.0/lib/aspera/api/httpgw.rb:112:in `process_read_thread'
        from /usr/local/share/gems/gems/aspera-cli-4.18.0/lib/aspera/api/httpgw.rb:184:in `block in upload'
ERROR: SSL: SSL_read: unexpected eof while reading
[root@l2111940b150001 azadmin]# ascli -version
4.18.0
laurent-martin commented 1 month ago

You can compare the results by using this gateway:

https://eudemo.asperademo.com/aspera/http-gwy

The main issue is not ascli, it is more the gateway version.

xavierv79 commented 1 month ago

Hi Laurent,

We have Upgraded ascli version and gateway version. Now API version related issue resolved, but still we are getting the Open SSL related error is coming as below.

ascli shares files upload --to-folder=test aspera-test-06.txt --transfer=httpgw --transfer-info=@json:'{"url":"https://example.com/aspera/http-gwy"}' Time: 00:00:01 --=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=---=- 0% 0 Mbps ETA: ??:??:??

<Thread:0x00007fadc23ed8a8 /usr/local/share/gems/gems/aspera-cli-4.18.0/lib/aspera/api/httpgw.rb:184 run> terminated with exception (report_on_exception is true):

/usr/share/ruby/openssl/buffering.rb:80:in sysread': SSL_read: unexpected eof while reading (OpenSSL::SSL::SSLError) from /usr/share/ruby/openssl/buffering.rb:80:infill_rbuff' from /usr/share/ruby/openssl/buffering.rb:323:in eof?' from /usr/share/ruby/net/protocol.rb:136:ineof?' from /usr/local/share/gems/gems/aspera-cli-4.18.0/lib/aspera/api/httpgw.rb:112:in process_read_thread' from /usr/local/share/gems/gems/aspera-cli-4.18.0/lib/aspera/api/httpgw.rb:184:inblock in upload' ERROR: SSL: SSL_read: unexpected eof while reading

laurent-martin commented 3 days ago

@xavierv79 did you upgrade the httpgw to latest version 2.3.0 ?

You can test like this:

$ ascli httpgw --url=https://eudemo.asperademo.com/aspera/http-gwy info                                                ‹ruby-3.3.0›
╭───────────────────┬──────────────────────────────╮
│ key               │ value                        │
╞═══════════════════╪══════════════════════════════╡
│ download_endpoint │ /aspera/http-gwy/v1/download │
│ endpoints         │ /aspera/http-gwy/v1/info     │
│                   │ /aspera/http-gwy/v1/upload   │
│                   │ /aspera/http-gwy/v2/upload   │
│                   │ /aspera/http-gwy/v1/download │
│ name              │ IBM Aspera HTTP Gateway      │
│ upload_endpoint   │ /aspera/http-gwy/v1/upload   │
│ version           │ 2.3.0                        │
╰───────────────────┴──────────────────────────────╯