1

First thing I do after unpacking the SnowSQL Linux client is try to upgrade it. This has worked very well through at least v1.1.84. Today I downloaded v1.2.2, installed it, and got an error:

$ ~/bin/snowsql -Uv
No snowsql is available for download: url=https://sfc-repo.snowflakecomputing.com/snowsql, version=1.2

The error comes from this download. Has something changed? I get the same error even when I just try to use it with no options at all, or trying to connect by passing my account code and username.

theory
  • 9,178
  • 10
  • 59
  • 129
  • Just to confirm, are you following the steps here? https://docs.snowflake.net/manuals/user-guide/snowsql-install-config.html#downloading-the-snowsql-installer And can you share the results of this command? curl -v https://sfc-repo.snowflakecomputing.com/index.html – Suzy Lockwood Jan 14 '20 at 00:26
  • You can see what I'm doing in [this Dockerfile](https://github.com/sqitchers/docker-sqitch/blob/0820d6943e9efb58f7d2fe65bd967deb8b7cdd19/snowflake/Dockerfile). Line 8 downloads the file, line 34 unpacks the binary, and 35 runs the update. – theory Jan 14 '20 at 01:51
  • …Except that line 8 when I was testing was actually `ADD https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/linux_x86_64/snowsql-1.2.2-linux_x86_64.bash snowsql.bash`, which downloads fine. – theory Jan 14 '20 at 02:03
  • Oh, [here's the output you requested](https://gist.github.com/theory/4dbed52a2a22a62b605aa748eb744798). Cloudfront issue? – theory Jan 14 '20 at 17:39
  • [Updated Dockerfile](https://github.com/sqitchers/docker-sqitch/blob/9084218/snowflake/Dockerfile), still downloading 1.1 at line 9, and 1.2 commented out on line 10, but with proper use of the installer now at line 36. Line 37 is the problem. – theory Jan 14 '20 at 21:46
  • Thank you for the info. And my apologies, I gave you the wrong command. This will give better results (returns 200 for me): **curl -v -k https://sfc-repo.snowflakecomputing.com** Or potentially this command if you need to connect through a proxy: **curl -x proxy.com:port https://sfc-repo.snowflakecomputing.com -v** My guess is that you are unable to access the new repo. That is the main change with the 1.2.X versions. https://docs.snowflake.net/manuals/release-notes/2019-11.html#snowsql-1-2-0-now-distributed-via-the-snowflake-client-repository – Suzy Lockwood Jan 14 '20 at 23:21
  • [Updated gist](https://gist.github.com/theory/e88af76549d9f79d7cd6e93f695eeb20). This example was run on a public WiFi, not from inside my corporate network. The release notes in your link provide no information about the limitations of the client repo. Does it require some sort of authentication? Does it require that connections be proxied? What are the limitations, how do they work, and what's required? IOW, why am I "unable to access the new repo"? – theory Jan 15 '20 at 15:58
  • The [Snowflake Client Repository page](https://docs.snowflake.net/manuals/user-guide/snowflake-client-repository.html) provides no information about access limitations, either. – theory Jan 15 '20 at 16:32
  • It doesn't have any access limitations that I am aware of. Can you test with downloading from the Snowflake UI just to see if you can install the latest version from there? – Suzy Lockwood Jan 15 '20 at 18:09
  • The problem is not downloading the `.bash` file. That works fine. The problem is when I run `snowsql` and it does its autoupdate thing. – theory Jan 15 '20 at 22:43
  • Today it works. Was something fixed on your end, @SuzyLockwood? – theory Jan 17 '20 at 16:30
  • Strike that. It works if I run it on the same host (or container) I download it on, but not if I download it on one host and run it on another. Is it locking the upgrade to the host that downloads it somehow? See also support case 00092538. – theory Jan 17 '20 at 16:43
  • That's an interesting tidbit about it not upgrading on another host. I wonder if that's expected. A Support case is a great route to go with this and I see it is being worked on by one of our Support engineers. It'll be good to post the solution here once we figure it out. – Suzy Lockwood Jan 17 '20 at 23:38
  • Reply from support is "From this release 1.2.0 onwards, the repository to download SNOWSQL has been changed. The SNOWDQL [sic] tries to auto-download the new version and times-outs for now." So I'm just gonna stick to 1.1.86 on the old repo until they get their bugs sorted out. – theory Jan 21 '20 at 16:57

2 Answers2

0
  1. The curl above was missing https and hence gave the wrong impression of 403 forbidden.
  2. Some times due to a caching issue with the downloads it will not autoupgrade. There are two main components, one being bootstrap and the other one being the main snowsql component. The one you see the issue with is the main component (it is auto-downloaded when you run snowsql).
  3. You can force new version download using snowsql -v 1.2.2 as an exmaple.
  4. You can delete/move the .snowsql directory (~/.snowsql or ~/bin/.snowsql) to ensure a new main component version is downloaded by the new bootstrap.
  5. You may also try using the newer versions for which the rpm is available at
    https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/linux_x86_64/index.html
JB512
  • 73
  • 4
  • 2. Will the caching issue be fixed soon? – theory Feb 18 '20 at 21:26
  • It appears to be working better, now; I pushed [d9cc22d](https://github.com/sqitchers/docker-sqitch/commit/d9cc22d) to upgrade to 1.2.4 and it built properly, including installing the version download (via `./snowsql -Uv`). – theory Feb 18 '20 at 21:47
0

I noticed Snowflake has some weird firewall configs and similar errors can either happen consistently or intermittently. The only option I'm aware of that can help if it happens consistently is to use --noup flag with your commands. This will not check for snowsql updates of course, but you can always manually download a newer version via your browser(with VPN is needed).

yuranos
  • 8,799
  • 9
  • 56
  • 65