You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by "Graeme Miller (JIRA)" <ji...@apache.org> on 2017/06/07 12:59:18 UTC

[jira] [Commented] (BROOKLYN-469) CLI: Panic when login attempted with malformed URL

    [ https://issues.apache.org/jira/browse/BROOKLYN-469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16040832#comment-16040832 ] 

Graeme Miller commented on BROOKLYN-469:
----------------------------------------

[~sjcorbett] I just tested this and got the following result:
Graemes-MBP:cli graememiller$ ./target/bin/darwin.amd64/br login http://localhost:sdnfksdjnfkjsndfkjsd
Get http://localhost:sdnfksdjnfkjsndfkjsd/v1/server/version: invalid URL port "sdnfksdjnfkjsndfkjsd"

Are you happy to close this issue?


> CLI: Panic when login attempted with malformed URL
> --------------------------------------------------
>
>                 Key: BROOKLYN-469
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-469
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Sam Corbett
>
> The cli panics when the URL for login isn't a URI:
> {code}
> $ br login http://localhost:sdnfksdjnfkjsndfkjsd
> panic: runtime error: invalid memory address or nil pointer dereference
> [signal 0xb code=0x1 addr=0x10 pc=0x647b1]
> goroutine 1 [running]:
> panic(0x4134c0, 0xc820014120)
> 	/usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:464 +0x3e6
> github.com/apache/brooklyn-client/cli/net.(*Network).SendRequestGetStatusCode(0xc8200105c0, 0xc8200ea000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
> 	/Users/sam/code/brooklyn.io/brooklyn/brooklyn-client/cli/target/src/github.com/apache/brooklyn-client/cli/net/net.go:124 +0x1e1
> github.com/apache/brooklyn-client/cli/api/version.Version(0xc8200105c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
> 	/Users/sam/code/brooklyn.io/brooklyn/brooklyn-client/cli/target/src/github.com/apache/brooklyn-client/cli/api/version/version.go:31 +0xb4
> github.com/apache/brooklyn-client/cli/commands.(*Login).Run(0xc820015300, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
> 	/Users/sam/code/brooklyn.io/brooklyn/brooklyn-client/cli/target/src/github.com/apache/brooklyn-client/cli/commands/login.go:125 +0xfa8
> github.com/apache/brooklyn-client/cli/command_runner.ConcreteRunner.RunCmdByName(0x7bdd60, 0xc820015320, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
> 	/Users/sam/code/brooklyn.io/brooklyn/brooklyn-client/cli/target/src/github.com/apache/brooklyn-client/cli/command_runner/runner.go:49 +0xe7
> github.com/apache/brooklyn-client/cli/command_runner.(*ConcreteRunner).RunCmdByName(0xc820016540, 0x49bb98, 0x5, 0xc82008e8c0, 0x0, 0x0)
> 	<autogenerated>:1 +0xe0
> github.com/apache/brooklyn-client/cli/app.getCommand.func1(0xc82008e8c0)
> 	/Users/sam/code/brooklyn.io/brooklyn/brooklyn-client/cli/target/src/github.com/apache/brooklyn-client/cli/app/app.go:82 +0x57
> github.com/apache/brooklyn-client/cli/vendor/github.com/urfave/cli.Command.Run(0x49bb98, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc8200c0fa0, 0x1e, 0x0, ...)
> 	/Users/sam/code/brooklyn.io/brooklyn/brooklyn-client/cli/target/src/github.com/apache/brooklyn-client/cli/vendor/github.com/urfave/cli/command.go:174 +0x1399
> github.com/apache/brooklyn-client/cli/vendor/github.com/urfave/cli.(*App).Run(0xc82008e3c0, 0xc82000a730, 0x5, 0x5, 0x0, 0x0)
> 	/Users/sam/code/brooklyn.io/brooklyn/brooklyn-client/cli/target/src/github.com/apache/brooklyn-client/cli/vendor/github.com/urfave/cli/app.go:187 +0x112b
> main.main()
> 	/Users/sam/code/brooklyn.io/brooklyn/brooklyn-client/cli/target/src/github.com/apache/brooklyn-client/cli/br/brooklyn.go:62 +0x915
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)