geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jinmei Liao (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (GEODE-1469) gfsh multi-step commands fail using http
Date Thu, 02 Jun 2016 22:43:59 GMT

     [ https://issues.apache.org/jira/browse/GEODE-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jinmei Liao resolved GEODE-1469.
--------------------------------
    Resolution: Fixed

> gfsh multi-step commands fail using http
> ----------------------------------------
>
>                 Key: GEODE-1469
>                 URL: https://issues.apache.org/jira/browse/GEODE-1469
>             Project: Geode
>          Issue Type: Bug
>          Components: gfsh
>            Reporter: Jinmei Liao
>            Assignee: Jinmei Liao
>
> An example is querying.
> Connect using http:
> {noformat}
> gfsh>connect --use-http --url=http://localhost:7070/gemfire/v1
> Successfully connected to: GemFire Manager HTTP service @ http://localhost:7070/gemfire/v1
> {noformat}
> Execute query:
> {noformat}
> gfsh>query --query="SELECT id, cusip FROM /data"
> Result     : true
> startCount : 0
> endCount   : 20
> Rows       : 1000
> id  | cusip
> --- | -----
> 877 | YGE
> ...
> 790 | GGB
> Press n to move to next page, q to quit and p to previous page : n
> {noformat}
> Selecting 'n' logs this message:
> {noformat}
> Exception occurred. Map has no value for '"startCount"'
> {noformat}
> With fine logging enabled, the gfsh log shows:
> {noformat}
> [warning 2016/05/20 17:01:03.694 PDT Gfsh Launcher tid=0xc] (msgTID=12 msgSN=68) Exception
occurred. Map has no value for '"startCount"'
> java.lang.IllegalArgumentException: Map has no value for '"startCount"'
> 	at org.springframework.web.util.UriComponents$MapTemplateVariables.getValue(UriComponents.java:252)
> 	at org.springframework.web.util.UriComponents.expandUriComponent(UriComponents.java:210)
> 	at org.springframework.web.util.HierarchicalUriComponents.expandInternal(HierarchicalUriComponents.java:314)
> 	at org.springframework.web.util.HierarchicalUriComponents.expandInternal(HierarchicalUriComponents.java:46)
> 	at org.springframework.web.util.UriComponents.expand(UriComponents.java:152)
> 	at com.gemstone.gemfire.management.internal.web.http.ClientHttpRequest.getURL(ClientHttpRequest.java:273)
> 	at com.gemstone.gemfire.management.internal.web.shell.AbstractHttpOperationInvoker.send(AbstractHttpOperationInvoker.java:537)
> 	at com.gemstone.gemfire.management.internal.web.shell.RestHttpOperationInvoker.processCommand(RestHttpOperationInvoker.java:350)
> 	at com.gemstone.gemfire.management.internal.web.shell.RestHttpOperationInvoker.processCommand(RestHttpOperationInvoker.java:53)
> 	at com.gemstone.gemfire.management.internal.cli.multistep.CLIMultiStepHelper.executeStep(CLIMultiStepHelper.java:118)
> 	at com.gemstone.gemfire.management.internal.cli.multistep.CLIMultiStepHelper.execCLISteps(CLIMultiStepHelper.java:66)
> 	at com.gemstone.gemfire.management.internal.cli.shell.GfshExecutionStrategy.execute(GfshExecutionStrategy.java:82)
> 	at org.springframework.shell.core.AbstractShell.executeCommand(AbstractShell.java:223)
> 	at com.gemstone.gemfire.management.internal.cli.shell.Gfsh.executeCommand(Gfsh.java:414)
> 	at com.gemstone.gemfire.management.internal.cli.shell.Gfsh.promptLoop(Gfsh.java:863)
> 	at org.springframework.shell.core.JLineShell.run(JLineShell.java:158)
> 	at java.lang.Thread.run(Thread.java:745)
> {noformat}
> Debugging in {{ClientHttpRequest}} shows the {{queryParams}} include a {{vf.gf.env.stepArgs}}
entry containing {{startCount}}, but there is not an entry for {{startCount}} itself:
> {noformat}
> [severe 2016/05/20 17:01:03.694 PDT Gfsh Launcher tid=0xc] (msgTID=12 msgSN=66) XXX ClientHttpRequest
getURL queryParams: {interactive=[true], step-name=[SELECT_PAGE_MOVE], query=["SELECT id,
cusip FROM /data"], vf.gf.env.APP_COLLECTION_LIMIT=[20], vf.gf.env.APP_FETCH_SIZE=[1000],
vf.gf.env.APP_LAST_EXIT_STATUS=[0], vf.gf.env.APP_LOGGING_ENABLED=[true], vf.gf.env.APP_LOG_FILE=[/Users/boglesby/Dev/Tests/client-server/basic/8x/pdx/gfsh/gfsh-%u_%g.log],
vf.gf.env.APP_NAME=[gfsh], vf.gf.env.APP_PWD=[/Users/boglesby/Dev/Tests/client-server/basic/8x/pdx],
vf.gf.env.APP_QUERY_RESULTS_DISPLAY_MODE=[table], vf.gf.env.APP_QUIET_EXECUTION=[false], vf.gf.env.APP_RESULT_VIEWER=[basic],
vf.gf.env.stepArgs=[{"startCount":20,"endCount":40}]}
> {noformat}
> A different but similar exception occurs in the 'q' case. If 'q' is selected, then the
next query execution (or actually any command) produces this message:
> {noformat}
> Press n to move to next page, q to quit and p to previous page : q
> NEXT_STEP_NAME : END
> gfsh>query --query="SELECT id, cusip FROM /data"
> Exception occurred. Map has no value for '"Result"'
> {noformat}
> In this case, {{ClientHttpRequest queryParams}} show:
> {noformat}
> [severe 2016/05/20 17:07:22.268 PDT Gfsh Launcher tid=0xc] (msgTID=12 msgSN=88) XXX ClientHttpRequest
getURL queryParams: {interactive=[true], step-name=[SELECT_EXEC], query=["SELECT id, cusip
FROM /data"], vf.gf.env.APP_COLLECTION_LIMIT=[20], vf.gf.env.APP_FETCH_SIZE=[1000], vf.gf.env.APP_LAST_EXIT_STATUS=[0],
vf.gf.env.APP_LOGGING_ENABLED=[true], vf.gf.env.APP_LOG_FILE=[/Users/boglesby/Dev/Tests/client-server/basic/8x/pdx/gfsh/gfsh-%u_%g.log],
vf.gf.env.APP_NAME=[gfsh], vf.gf.env.APP_PWD=[/Users/boglesby/Dev/Tests/client-server/basic/8x/pdx],
vf.gf.env.APP_QUERY_RESULTS_DISPLAY_MODE=[table], vf.gf.env.APP_QUIET_EXECUTION=[false], vf.gf.env.APP_RESULT_VIEWER=[basic],
vf.gf.env.stepArgs=[{"Result":true,"startCount":0,"endCount":20,"Rows":1000,"__tables__-0":{"content":{"id":["877","974","206","527","334","604","573","360","729","979","481","622","987","343","923","88","92","350","514","330","790"],"cusip":["YGE","WES","MGM","CVS","MCD","HMIN","CMI","ABT","SLB","JCI","GG","MCD","ABT","JCI","GGB","USB","AUY","YGE","CVS","MGM","GGB"]}}}]}
> {noformat}
> Note: This example works fine using JMX.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message