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

Allow specifying instanceUri by IP #126

Open
dereklwood opened this issue Nov 19, 2015 · 9 comments
Open

Allow specifying instanceUri by IP #126

dereklwood opened this issue Nov 19, 2015 · 9 comments
Labels

Comments

@dereklwood
Copy link
Contributor

When attempting to run tests and using the IP for -DinstanceUri:

running command line: \n/opt/maven/bin/mvn --batch-mode -Djava.io.tmpdir=/tmp/CDAP-ITCC-JOB1 -Dmaven.repo.local=/var/bamboo/.m2/AGENT-32243718/repository clean test -U -DinstanceUri=23.251.157.88:10000\n

leads to:

build   19-Nov-2015 19:59:56    testSubqueryInWhereClause(co.cask.cdap.apps.explore.ExploreTest)  Time elapsed: 0.013 sec  <<< ERROR!
build   19-Nov-2015 19:59:56    java.lang.IllegalArgumentException: Illegal character in scheme name at index 0: 23.251.157.88:10000
build   19-Nov-2015 19:59:56        at java.net.URI$Parser.fail(URI.java:2829)
build   19-Nov-2015 19:59:56        at java.net.URI$Parser.checkChars(URI.java:3002)
build   19-Nov-2015 19:59:56        at java.net.URI$Parser.checkChar(URI.java:3012)
build   19-Nov-2015 19:59:56        at java.net.URI$Parser.parse(URI.java:3028)
build   19-Nov-2015 19:59:56        at java.net.URI.<init>(URI.java:595)
build   19-Nov-2015 19:59:56        at java.net.URI.create(URI.java:857)
build   19-Nov-2015 19:59:56        at co.cask.cdap.test.IntegrationTestBase.getClientConfig(IntegrationTestBase.java:231)
build   19-Nov-2015 19:59:56        at co.cask.cdap.apps.AudiTestBase.createRestClient(AudiTestBase.java:90)
build   19-Nov-2015 19:59:56        at co.cask.cdap.apps.AudiTestBase.<init>(AudiTestBase.java:79)
build   19-Nov-2015 19:59:56        at co.cask.cdap.apps.explore.ExploreTest.<init>(ExploreTest.java:58)

IP should be allowed as we may not always have DNS

@dereklwood
Copy link
Contributor Author

Similarly, DNS names that happen to look like IPs also cause this error. This will prevent us from running integration tests using GCP's default DNS names:

java.lang.IllegalArgumentException: Illegal character in scheme name at index 0: 234.136.211.130.bc.googleusercontent.com:11015

@dereklwood dereklwood added the bug label Jan 25, 2016
@anwar6953
Copy link
Contributor

I'm not sure if its a workaround or intended, but if you prefix the ip address with http, it should work. Can you give that a try and let me know.

@anwar6953
Copy link
Contributor

Note (slightly relevant): the CLI allows IP addresses without the http prefix:

Alis-MBP-2:cdap alianwar$ ~/Downloads/cdap-sdk-3.3.0/bin/cdap-cli.sh -u <IP>:10000
Successfully connected to CDAP instance at http://<IP>:10000/default
cdap (http://<IP>:10000/namespace:default)> 

@wolf31o2
Copy link
Contributor

wolf31o2 commented May 3, 2016

Meh... this just bit me. Can we fix this? Seems that it should be easy.

@wolf31o2
Copy link
Contributor

wolf31o2 commented May 3, 2016

Using http:// prefix works in ITCC.

@anwar6953
Copy link
Contributor

In 3.5, I'll try to look at how the CLI does it differently, where it doesn't seem to need the http:// prefix for IPs.

@wolf31o2
Copy link
Contributor

wolf31o2 commented May 4, 2016

Can we also "chomp" surrounding whitespace? I had one run fail because I had whitespace at the beginning... an error from a copy and paste, but something fairly common that we should tolerate.

@wolf31o2
Copy link
Contributor

wolf31o2 commented May 4, 2016

I suspect we're doing something "clever" like checking that the first character is a letter, to "ensure" that it's a hostname.

@anwar6953
Copy link
Contributor

I think it's the library we're using, such as URL lib in Java
On May 4, 2016 7:06 AM, "Chris Gianelloni" [email protected] wrote:

I suspect we're doing something "clever" like checking that the first
character is a letter, to "ensure" that it's a hostname.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/caskdata/cdap-integration-tests/issues/126#issuecomment-216875840

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants