roapi icon indicating copy to clipboard operation
roapi copied to clipboard

basic example fails on osx

Open geoHeil opened this issue 3 years ago • 4 comments
trafficstars

when toying around with the basic example from the main README document I observe HTTP URI resolution problems:

roapi-http --version
roapi-http 0.5.3
roapi-http --table "uk_cities=https://raw.githubusercontent.com/roapi/roapi/main/test_data/uk_cities_with_headers.csv"
Error: failed to lookup address information: nodename nor servname provided, or not known


# strangely - this fails with the same error when running locally:
wget https://raw.githubusercontent.com/roapi/roapi/main/test_data/uk_cities_with_headers.csv
roapi-http --table "uk_cities=uk_cities_with_headers.csv"
Error: failed to lookup address information: nodename nor servname provided, or not known

when running natively on a Catalina OsX.

However, when executed inside your docker container - it works just fine.

geoHeil avatar Feb 05 '22 09:02 geoHeil

looks like it might have something to do with your local dns? Are you able to load https://raw.githubusercontent.com/roapi/roapi/main/test_data/uk_cities_with_headers.csv in your browser? What do you get from running nslookup raw.githubusercontent.com?

houqp avatar Feb 06 '22 05:02 houqp

Yes that works fine (loading https://raw.githubusercontent.com/roapi/roapi/main/test_data/uk_cities_with_headers.csv in the browser - and also via wget (as outlined above) even when manually downloading like:

wget https://raw.githubusercontent.com/roapi/roapi/main/test_data/uk_cities_with_headers.csv

and then later:

roapi-http --table "uk_cities=uk_cities_with_headers.csv"
Error: failed to lookup address information: nodename nor servname provided, or not known

I still get the error

here the output for the DNS query:


 nslookup raw.githubusercontent.com
Server:		172.16.39.254
Address:	172.16.39.254#53

Non-authoritative answer:
Name:	raw.githubusercontent.com
Address: 185.199.108.133
Name:	raw.githubusercontent.com
Address: 185.199.110.133
Name:	raw.githubusercontent.com
Address: 185.199.111.133
Name:	raw.githubusercontent.com
Address: 185.199.109.13

geoHeil avatar Feb 06 '22 17:02 geoHeil

Could you give the workaround in https://github.com/instructure/canvas-data-loader/issues/3#issuecomment-352920399 a try to see if we can isolate the issue to local dns resolution?

houqp avatar Feb 07 '22 00:02 houqp

Strangely, adding the following entry to the /etc/hosts file:

 14 172.16.39.254 raw.githubusercontent.com

does not solve the problem (in fact when enabled also prevents wget of downloading the CSV file).

But I also do not fully understand why it should/would help: as written above the problem also occurs when manually executing wget, downloading the CSV so it no longer resides on github but is local. But:

roapi-http --table "uk_cities=uk_cities_with_headers.csv"
Error: failed to lookup address information: nodename nor servname provided, or not known

it would still fail nonetheless.

geoHeil avatar Feb 07 '22 06:02 geoHeil

Hi @geoHeil. Have you tried this more recently? Wondering if this has been resolved for you or if this remains an open issue for you. I'm trying to clean up and prioritize open issues here. Thanks.

whatrocks avatar Nov 08 '22 06:11 whatrocks

CLI always fails on osx (for me) but if you feed roapi the configuration file then it usually works fine. Furthermore, also due to the database issues I would recommend most to use roapi in the docker container

geoHeil avatar Nov 09 '22 10:11 geoHeil

Okay, thanks for feedback. I am inclined to close this issue for now given that you do indeed have a workaround and this cannot be reproduced. We can reopen if this emerges as an issue for more people Sound good to you, @geoHeil ? Thanks again!

whatrocks avatar Nov 09 '22 22:11 whatrocks

ok

geoHeil avatar Nov 10 '22 16:11 geoHeil