{"action":"created","issue":{"url":"https://api.github.com/repos/project-geode/docs/issues/1","labels_url":"https://api.github.com/repos/project-geode/docs/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/project-geode/docs/issues/1/comments","events_url":"https://api.github.com/repos/project-geode/docs/issues/1/events","html_url":"https://github.com/project-geode/docs/issues/1","id":70761232,"number":1,"title":"REST API and Pulse Build Issue","user":{"login":"wwilliams-pivotal","id":5561056,"avatar_url":"https://avatars.githubusercontent.com/u/5561056?v=3","gravatar_id":"","url":"https://api.github.com/users/wwilliams-pivotal","html_url":"https://github.com/wwilliams-pivotal","followers_url":"https://api.github.com/users/wwilliams-pivotal/followers","following_url":"https://api.github.com/users/wwilliams-pivotal/following{/other_user}","gists_url":"https://api.github.com/users/wwilliams-pivotal/gists{/gist_id}","starred_url":"https://api.github.com/users/wwilliams-pivotal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwilliams-pivotal/subscriptions","organizations_url":"https://api.github.com/users/wwilliams-pivotal/orgs","repos_url":"https://api.github.com/users/wwilliams-pivotal/repos","events_url":"https://api.github.com/users/wwilliams-pivotal/events{/privacy}","received_events_url":"https://api.github.com/users/wwilliams-pivotal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Nilkanthpatel04","id":7866426,"avatar_url":"https://avatars.githubusercontent.com/u/7866426?v=3","gravatar_id":"","url":"https://api.github.com/users/Nilkanthpatel04","html_url":"https://github.com/Nilkanthpatel04","followers_url":"https://api.github.com/users/Nilkanthpatel04/followers","following_url":"https://api.github.com/users/Nilkanthpatel04/following{/other_user}","gists_url":"https://api.github.com/users/Nilkanthpatel04/gists{/gist_id}","starred_url":"https://api.github.com/users/Nilkanthpatel04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nilkanthpatel04/subscriptions","organizations_url":"https://api.github.com/users/Nilkanthpatel04/orgs","repos_url":"https://api.github.com/users/Nilkanthpatel04/repos","events_url":"https://api.github.com/users/Nilkanthpatel04/events{/privacy}","received_events_url":"https://api.github.com/users/Nilkanthpatel04/received_events","type":"User","site_admin":false},"milestone":null,"comments":33,"created_at":"2015-04-24T18:25:58Z","updated_at":"2015-05-05T17:20:47Z","closed_at":null,"body":"I'm experiencing an issue with the REST API and Pulse.  Geode can't find the gemfire-web-api war.  Here is how I am starting up the server, the resolved classpath and the results.  Seems like a build issue.\r\n\r\nstart server --name=server1 --locators=gemhost[10334] --J=-Xms512m --J=-Xmx512m --classpath=../../projects/Domain/target/Domain-1.jar:/Programs/apache/geode-1.0.0.0-SNAPSHOT/gemfire-assembly/build/install/geode/tools/Extensions/**gemfire-web-api-1.0.0.0-SNAPSHOT.war** --cache-xml-file=config/cache.xml --properties-file=config/gemfire.properties --J=-Dgemfire.start-dev-rest-api=true --J=-Dgemfire.http-service-bind-address=192.168.1.110 --J=-Dgemfire.http-service-port=7075\r\n\r\nThe CLASSPATH echo shows that the web-api resolved to the correct place.\r\nClass-Path: /Programs/apache/geode-1.0.0.0-SNAPSHOT/gemfire-assembly/build/install/geode/lib/gemfire-core-1.0.0.0-SNAPSHOT.jar:../../projects/Domain/target/Domain-1.jar:**/Programs/apache/geode-1.0.0.0-SNAPSHOT/gemfire-assembly/build/install/geode/tools/Extensions/gemfire-web-api-1.0.0.0-SNAPSHOT.war**:/Programs/apache/geode-1.0.0.0-SNAPSHOT/gemfire-assembly/build/install/geode/lib/gemfire-core-dependencies.jar\r\n\r\n$ curl -i http://192.168.1.110:7075/v1\r\ncurl: (7) Failed to connect to 192.168.1.110 port 7075: **Connection refused**\r\n\r\nThis is in the log for server1:\r\nUnable to find GemFire Developer REST API WAR file; the Developer REST API for GemFire will not be exported and accessible.\"\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/project-geode/docs/issues/comments/99147151","html_url":"https://github.com/project-geode/docs/issues/1#issuecomment-99147151","issue_url":"https://api.github.com/repos/project-geode/docs/issues/1","id":99147151,"user":{"login":"Nilkanthpatel04","id":7866426,"avatar_url":"https://avatars.githubusercontent.com/u/7866426?v=3","gravatar_id":"","url":"https://api.github.com/users/Nilkanthpatel04","html_url":"https://github.com/Nilkanthpatel04","followers_url":"https://api.github.com/users/Nilkanthpatel04/followers","following_url":"https://api.github.com/users/Nilkanthpatel04/following{/other_user}","gists_url":"https://api.github.com/users/Nilkanthpatel04/gists{/gist_id}","starred_url":"https://api.github.com/users/Nilkanthpatel04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nilkanthpatel04/subscriptions","organizations_url":"https://api.github.com/users/Nilkanthpatel04/orgs","repos_url":"https://api.github.com/users/Nilkanthpatel04/repos","events_url":"https://api.github.com/users/Nilkanthpatel04/events{/privacy}","received_events_url":"https://api.github.com/users/Nilkanthpatel04/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T17:20:47Z","updated_at":"2015-05-05T17:20:47Z","body":"Wes-\n\nAre you able to find any issue in logs?\n\nNilkanth.\n\nOn Mon, May 4, 2015 at 12:29 PM, Nilkanth Patel <npatel@pivotal.io> wrote:\n\n> Wes-\n>\n> I verified my setup again and same flow has been verified/reviewed by\n> other developer as well.  As things are working as expected in my setup, it\n> is hard to fix your problem.\n>\n> I have gone through your description and request you to check following,\n>\n> 1.  Does your Domain-1.jar missing any dependent .jar files\n> or conflicts with the existing classes (Manager node related classes), if\n> so, you can find the same in log.\n> 2.  Does your cache.xml and gemfire.properties correct..? Any wrong entry\n> in these file will cause server to fail in start-up.\n>     (This is very rarely possible because this configs are working with\n> TESTCASE-2, working with non-Manager node).\n>\n> Can you please check the logs. or send me the same if required.\n> you can find logs\n> at: incubator-geode/gemfire-assembly/build/install/geode/<LOCATOR_NAME>locator.log\n>\n>  incubator-geode/gemfire-assembly/build/install/geode/<SERVER_NAME>server.log\n>\n> Regards,\n> Nilkanth.\n>\n> On Sun, May 3, 2015 at 10:42 AM, wwilliams-pivotal <\n> notifications@github.com> wrote:\n>\n>> Here is what I am seeing, and have consistently seen for the past week\n>> after many permutations and after carefully triple-checking the code. Our\n>> TestCase #2 aligns but TestCase #1 does not. Differences between my test\n>> results and yours are in *bold. *When the ManagementAgent is fixed, the\n>> RestAgent no longer works:\n>>\n>>\n>> *TESTCASE-1*\n>> *Working with geode Manager node.*\n>> *For Manager node developer REST APIs and ADMIN REST APIs will be\n>> started.*\n>>\n>> *Step-1: start locator*\n>>\n>>\n>> gfsh>start locator --name=locator\n>> --properties-file=config/locator.properties --bind-address=gemhost\n>> --port=10334 --J=-Xms256m --J=-Xmx256m\n>>\n>> --classpath=/Users/wwilliams/Documents/git/geode/gemfire-assembly/build/install/geode/locator-dependencies.jar\n>> --J=-Dgemfire.jmx-manager=false --J=-Dgemfire.jmx-manager-start=false\n>>\n>> Starting a GemFire Locator in\n>> /Users/wwilliams/geode/workshop/chapter7/locator...\n>>\n>> .............................\n>>\n>> Locator in /Users/wwilliams/geode/workshop/chapter7/locator on\n>> gemhost[10334] as locator is currently online.\n>>\n>> Process ID: 54129\n>>\n>> Uptime: 15 seconds\n>>\n>> GemFire Version: 1.0.0.0-SNAPSHOT\n>>\n>> Java Version: 1.7.0_79\n>>\n>> Log File: /Users/wwilliams/geode/workshop/chapter7/locator/locator.log\n>>\n>> JVM Arguments:\n>>\n>> -DgemfirePropertyFile=/Users/wwilliams/geode/workshop/chapter7/config/locator.properties\n>> -Dgemfire.enable-cluster-configuration=true\n>> -Dgemfire.load-cluster-configuration-from-dir=false -Xms256m -Xmx256m\n>> -Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true\n>> -Dsun.rmi.dgc.server.gcInterval=9223372036854775806\n>>\n>> Class-Path:\n>>\n>> /Users/wwilliams/Documents/git/geode/gemfire-assembly/build/install/geode/lib/gemfire-core-1.0.0.0-SNAPSHOT.jar:/Users/wwilliams/Documents/git/geode/gemfire-assembly/build/install/geode/locator-dependencies.jar:/Users/wwilliams/Documents/git/geode/gemfire-assembly/build/install/geode/lib/gemfire-core-dependencies.jar\n>>\n>>\n>>\n>> Please use \"connect --locator=gemhost[10334]\" to connect Gfsh to the\n>> locator.\n>>\n>>\n>>\n>> *Cluster configuration service is up and running.*\n>>\n>>\n>> *Step-2: start Manager node by setting jmx-manager=true and\n>> jmx-manager-start=true.*\n>> This will start developer REST APIs and ADMIN REST APIs.\n>>\n>>\n>> gfsh>\n>>\n>> gfsh>start server --name=server1 --locators=gemhost[10334] --J=-Xms512m\n>> --J=-Xmx512m --classpath=../../projects/Domain/target/Domain-1.jar\n>> --cache-xml-file=config/cache.xml\n>> --properties-file=config/gemfire.properties\n>> --J=-Dgemfire.start-dev-rest-api=true\n>> --J=-Dgemfire.http-service-bind-address=*192.168.1.110*\n>> --J=-Dgemfire.http-service-port=7075 --J=-Dgemfire.jmx-manager=true\n>> --J=-Dgemfire.jmx-manager-start=true\n>>\n>> Starting a GemFire Server in\n>> /Users/wwilliams/geode/workshop/chapter7/server1...\n>>\n>> .....\n>>\n>> Server in /Users/wwilliams/geode/workshop/chapter7/server1 on\n>> gemhost[40404] as server1 is currently online.\n>>\n>> Process ID: 54130\n>>\n>> Uptime: 2 seconds\n>>\n>> GemFire Version: 1.0.0.0-SNAPSHOT\n>>\n>> Java Version: 1.7.0_79\n>>\n>> Log File: /Users/wwilliams/geode/workshop/chapter7/server1/server1.log\n>>\n>> JVM Arguments:\n>>\n>> -DgemfirePropertyFile=/Users/wwilliams/geode/workshop/chapter7/config/gemfire.properties\n>>\n>> -Dgemfire.cache-xml-file=/Users/wwilliams/geode/workshop/chapter7/config/cache.xml\n>> -Dgemfire.locators=gemhost[10334] -Dgemfire.use-cluster-configuration=true\n>> -Xms512m -Xmx512m -Dgemfire.start-dev-rest-api=true\n>> -Dgemfire.http-service-bind-address=192.168.1.110\n>> -Dgemfire.http-service-port=7075 -Dgemfire.jmx-manager=true\n>> -Dgemfire.jmx-manager-start=true -XX:OnOutOfMemoryError=kill -KILL %p\n>> -Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true\n>> -Dsun.rmi.dgc.server.gcInterval=9223372036854775806\n>>\n>> Class-Path:\n>>\n>> /Users/wwilliams/Documents/git/geode/gemfire-assembly/build/install/geode/lib/gemfire-core-1.0.0.0-SNAPSHOT.jar:../../projects/Domain/target/Domain-1.jar:/Users/wwilliams/Documents/git/geode/gemfire-assembly/build/install/geode/lib/gemfire-core-dependencies.jar\n>>\n>> gfsh>\n>>\n>>\n>> *connect --locator=gemhost[10334]Connecting to Locator at [host=gemhost,\n>> port=10334] ..Connecting to Manager at [host=gemhost, port=1099]\n>> ..Successfully connected to: [host=gemhost, port=1099]*\n>> gfsh>\n>>\n>>\n>> wwilliams@Wes:~/geode/workshop/chapter7 $* netstat -an | grep 7075*\n>> wwilliams@Wes:~/geode/workshop/chapter7 $ *netstat -an | grep 7070*\n>> wwilliams@Wes:~/geode/workshop/chapter7 $\n>>\n>> *Step-3: Access developer REST APIs*\n>>\n>> http://192.168.1.110:7075/gemfire-api/docs/index.html\n>> <http://localhost:7075/gemfire-api/docs/index.html>\n>>\n>> *ERR_CONNECTION_REFUSED*\n>>\n>> *Step-4: Access ADMIN REST APIs*\n>>\n>> gfsh>connect --use-http=true --url=http://*192.168.1.110*:7075/gemfire/v1\n>> *org.springframework.web.client.ResourceAccessException: I/O error on GET\n>> request for \"http://192.168.1.110:7075/gemfire/v1/index\n>> <http://192.168.1.110:7075/gemfire/v1/index>\": Connection refused; nested\n>> exception is java.net.ConnectException: Connection refused*\n>> --------------------------------------------------------------\n>>\n>> *TESTCASE-2*\n>> *Working with geode data node. For data node (Non-Manager) only developer\n>> REST APIs will be started*\n>>\n>> *Step-1: start locator*\n>> _________________________ __\n>> / _____/ ______/ ______/ /____/ /\n>> / / __/ /___ /_____ / _____ /\n>> / /__/ / ____/ _____/ / / / /\n>> /______/_/ /______/_/ /_/ v1.0.0.0-SNAPSHOT\n>>\n>> Monitor and Manage GemFire\n>>\n>> gfsh>start locator --name=locator\n>> --properties-file=config/locator.properties --bind-address=gemhost\n>> --port=10334 --J=-Xms256m --J=-Xmx256m\n>>\n>> --classpath=/Users/wwilliams/Documents/git/geode/gemfire-assembly/build/install/geode/locator-dependencies.jar\n>> --J=-Dgemfire.jmx-manager=false --J=-Dgemfire.jmx-manager-start=false\n>>\n>> Starting a GemFire Locator in\n>>\n>> /Users/wwilliams/geode/workshop/chapter7/locator................................\n>> Locator in /Users/wwilliams/geode/workshop/chapter7/locator on\n>> gemhost[10334] as locator is currently online.\n>> Process ID: 54558\n>> Uptime: 15 seconds\n>> GemFire Version: 1.0.0.0-SNAPSHOT\n>> Java Version: 1.7.0_79\n>> Log File: /Users/wwilliams/geode/workshop/chapter7/locator/locator.log\n>> JVM Arguments:\n>>\n>> -DgemfirePropertyFile=/Users/wwilliams/geode/workshop/chapter7/config/locator.properties\n>> -Dgemfire.enable-cluster-configuration=true\n>> -Dgemfire.load-cluster-configuration-from-dir=false -Xms256m -Xmx256m\n>> -Dgemfire.jmx-manager=false -Dgemfire.jmx-manager-start=false\n>> -Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true\n>> -Dsun.rmi.dgc.server.gcInterval=9223372036854775806\n>> Class-Path:\n>>\n>> /Users/wwilliams/Documents/git/geode/gemfire-assembly/build/install/geode/lib/gemfire-core-1.0.0.0-SNAPSHOT.jar:/Users/wwilliams/Documents/git/geode/gemfire-assembly/build/install/geode/locator-dependencies.jar:/Users/wwilliams/Documents/git/geode/gemfire-assembly/build/install/geode/lib/gemfire-core-dependencies.jar\n>>\n>> Please use \"connect --locator=gemhost[10334]\" to connect Gfsh to the\n>> locator.\n>>\n>> *Cluster configuration service is up and running.*\n>>\n>> *Step-2: start server (Non-Manager node. That means it will start\n>> developer\n>>\n>> REST APIs, and not ADMIN REST APIs).*\n>>\n>> gfsh>start server --name=server1 --locators=gemhost[10334] --J=-Xms512m\n>> --J=-Xmx512m --classpath=../../projects/Domain/target/Domain-1.jar\n>> --cache-xml-file=config/cache.xml\n>> --properties-file=config/gemfire.properties\n>> --J=-Dgemfire.start-dev-rest-api=true\n>> --J=-Dgemfire.http-service-bind-address=*192.168.1.110*\n>> --J=-Dgemfire.http-service-port=7075\n>>\n>> Starting a GemFire Server in\n>> /Users/wwilliams/geode/workshop/chapter7/server1...\n>>\n>> ..........\n>>\n>> Server in /Users/wwilliams/geode/workshop/chapter7/server1 on\n>> gemhost[40404] as server1 is currently online.\n>>\n>> Process ID: 54641\n>>\n>> Uptime: 5 seconds\n>>\n>> GemFire Version: 1.0.0.0-SNAPSHOT\n>>\n>> Java Version: 1.7.0_79\n>>\n>> Log File: /Users/wwilliams/geode/workshop/chapter7/server1/server1.log\n>>\n>> JVM Arguments:\n>>\n>> -DgemfirePropertyFile=/Users/wwilliams/geode/workshop/chapter7/config/gemfire.properties\n>>\n>> -Dgemfire.cache-xml-file=/Users/wwilliams/geode/workshop/chapter7/config/cache.xml\n>> -Dgemfire.locators=gemhost[10334] -Dgemfire.use-cluster-configuration=true\n>> -Xms512m -Xmx512m -Dgemfire.start-dev-rest-api=true\n>> -Dgemfire.http-service-bind-address=192.168.1.110\n>> -Dgemfire.http-service-port=7075 -XX:OnOutOfMemoryError=kill -KILL %p\n>> -Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true\n>> -Dsun.rmi.dgc.server.gcInterval=9223372036854775806\n>>\n>> Class-Path:\n>>\n>> /Users/wwilliams/Documents/git/geode/gemfire-assembly/build/install/geode/lib/gemfire-core-1.0.0.0-SNAPSHOT.jar:../../projects/Domain/target/Domain-1.jar:/Users/wwilliams/Documents/git/geode/gemfire-assembly/build/install/geode/lib/gemfire-core-dependencies.jar\n>>\n>> gfsh>*connect --locator=gemhost[10334]*\n>> Connecting to Locator at [host=gemhost, port=10334] ..\n>> *Locator could not find a JMX Manager*\n>>\n>>\n>> wwilliams@Wes:~/geode/workshop/chapter7 $ *netstat -an | grep 7075*\n>> tcp4 0 0 192.168.1.110.7075 *.* LISTEN\n>>\n>> wwilliams@Wes:~/geode/workshop/chapter7 $ *netstat -an | grep 7070*\n>> wwilliams@Wes:~/geode/workshop/chapter7 $\n>>\n>>\n>>\n>> *Step-3: Access developer REST APIs*\n>>\n>> http://192.168.1.110:7075/gemfire-api/docs/index.html\n>> <http://localhost:7075/gemfire-api/docs/index.html>\n>>\n>> Pivotal™ GemFire® Developer REST API\n>>\n>> [This now works]\n>>\n>> wwilliams@Wes:~/geode/workshop/chapter7 $ *curl -i\n>> http://192.168.1.110:7075/gemfire-api/v1\n>> <http://192.168.1.110:7075/gemfire-api/v1>*\n>> HTTP/1.1 200 *OK*\n>>\n>> *Step-4: Try to access ADMIN REST through gfsh. As this is a Manager node\n>> it will not start ADMIN REST APIs.*\n>>\n>> gfsh>connect --use-http=true --url=http://*192.168.1.110*:7075/gemfire/v1\n>> [warn 2015/05/03 00:39:27.728 EDT <Gfsh Launcher> tid=0xa] GET request\n>> for \"\n>> http://192.168.1.110:7075/gemfire/v1/index\" resulted in 404 (Not Found);\n>> invoking error handler\n>>\n>> org.springframework.web.client.HttpClientErrorException: 404 Not Found\n>>\n>>\n>>\n>> *Wes Williams | Pivotal Sr. **Data Engineer*\n>> 781.606.0325\n>> http://pivotal.io/big-data/pivotal-gemfire\n>>\n>> On Sat, May 2, 2015 at 5:16 AM, Nilkanthpatel04 <notifications@github.com\n>> >\n>> wrote:\n>>\n>> > Wes-\n>> >\n>> > It looks to me your code is correct but understanding is wrong. Kindly\n>> go\n>> > through the following description. I have attached patch for the code\n>> > changes for which things are working as expected.\n>> >\n>> > *TESTCASE-1*\n>> > *Working with geode Manager node.*\n>> > *For Manager node developer REST APIs and ADMIN REST APIs will be\n>> started.*\n>> >\n>> >\n>> > npatel@pnq-npatel1\n>> >\n>> :/npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode>\n>> > ./bin/gfsh\n>> > _________________________ __\n>> > / _____/ ______/ ______/ /____/ /\n>> > / / __/ /___ /_____ / _____ /\n>> > / /__/ / ____/ _____/ / / / /\n>> > /______/_/ /______/_/ /_/ v1.0.0.0-SNAPSHOT\n>> >\n>> > Monitor and Manage GemFire\n>> >\n>> > *Step-1: start locator*\n>>\n>> >\n>> > gfsh>start locator --name=locator --bind-address=localhost --port=10334\n>> > --J=-Xms256m --J=-Xmx256m --J=-Dgemfire.jmx-manager=false\n>> > --J=-Dgemfire.jmx-manager-start=false\n>> > Starting a GemFire Locator in\n>> >\n>> >\n>> /npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/locator...\n>> > ..............................\n>> > Locator in\n>> >\n>> >\n>> /npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/locator\n>> > on localhost[10334] as locator is currently online.\n>> > Process ID: 2300\n>> > Uptime: 15 seconds\n>> > GemFire Version: 1.0.0.0-SNAPSHOT\n>> > Java Version: 1.7.0_72\n>> > Log File:\n>> >\n>> >\n>> /npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/locator/locator.log\n>> > JVM Arguments: -Dgemfire.enable-cluster-configuration=true\n>> > -Dgemfire.load-cluster-configuration-from-dir=false -Xms256m -Xmx256m\n>> > -Dgemfire.jmx-manager=false -Dgemfire.jmx-manager-start=false\n>> > -Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true\n>> > -Dsun.rmi.dgc.server.gcInterval=9223372036854775806\n>> > Class-Path:\n>> >\n>> >\n>> /npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/lib/gemfire-core-1.0.0.0-SNAPSHOT.jar:/npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/lib/gemfire-core-dependencies.jar\n>> >\n>> > Please use \"connect --locator=pnq-npatel1[10334]\" to connect Gfsh to the\n>> > locator.\n>> >\n>> > Failed to connect; unknown cause: Connection refused\n>> >\n>> > *Step-2: start Manager node by setting jmx-manager=true and\n>> > jmx-manager-start=true.*\n>>\n>> > This will start developer REST APIs and ADMIN REST APIs.\n>> >\n>> > gfsh>start server --name=server1 --locators=localhost[10334]\n>> --J=-Xms512m\n>> > --J=-Xmx512m --J=-Dgemfire.start-dev-rest-api=true\n>> > --J=-Dgemfire.http-service-bind-address=localhost\n>> > --J=-Dgemfire.http-service-port=7075 --J=-Dgemfire.jmx-manager=true\n>> > --J=-Dgemfire.jmx-manager-start=true\n>> > Starting a GemFire Server in\n>> >\n>> >\n>> /npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/server1...\n>> > .............\n>> > Server in\n>> >\n>> >\n>> /npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/server1\n>> > on pnq-npatel1[40404] as server1 is currently online.\n>> > Process ID: 2424\n>> > Uptime: 6 seconds\n>> > GemFire Version: 1.0.0.0-SNAPSHOT\n>> > Java Version: 1.7.0_72\n>> > Log File:\n>> >\n>> >\n>> /npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/server1/server1.log\n>> > JVM Arguments: -Dgemfire.locators=localhost[10334]\n>> > -Dgemfire.use-cluster-configuration=true -Xms512m -Xmx512m\n>> > -Dgemfire.start-dev-rest-api=true\n>> > -Dgemfire.http-service-bind-address=localhost\n>> > -Dgemfire.http-service-port=7075 -Dgemfire.jmx-manager=true\n>> > -Dgemfire.jmx-manager-start=true -XX:OnOutOfMemoryError=kill -KILL %p\n>> > -Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true\n>> > -Dsun.rmi.dgc.server.gcInterval=9223372036854775806\n>> > Class-Path:\n>> >\n>> >\n>> /npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/lib/gemfire-core-1.0.0.0-SNAPSHOT.jar:/npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/lib/gemfire-core-dependencies.jar\n>> >\n>> > *Step-3: Access developer REST APIs*\n>> >\n>> > http://localhost:7075/gemfire-api/docs/index.html\n>> >\n>> > *Step-4: Access ADMIN REST APIs*\n>> >\n>> > gfsh>connect --use-http=true --url=http://localhost:7075/gemfire/v1\n>> > Successfully connected to: GemFire Manager HTTP service @\n>> > http://localhost:7075/gemfire/v1\n>> >\n>> > gfsh>list members\n>> > Name | Id\n>> > ------- | -----------------------------------------\n>> > server1 | pnq-npatel1(server1:2424)<v1>:25446\n>> > locator | localhost(locator:2300:locator)<v0>:64526\n>> >\n>> > gfsh>\n>> >\n>> > *TESTCASE-2*\n>> > *Working with geode data node. For data node (Non-Manager) only\n>> developer\n>> > REST APIs will be started*\n>> >\n>> > *Step-1: start locator*\n>>\n>> >\n>> > gfsh>start locator --name=locator --bind-address=localhost --port=10334\n>> > --J=-Xms256m --J=-Xmx256m --J=-Dgemfire.jmx-manager=false\n>> > --J=-Dgemfire.jmx-manager-start=false\n>> > Starting a GemFire Locator in\n>> >\n>> >\n>> /npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/locator...\n>> > ..............................\n>> > Locator in\n>> >\n>> >\n>> /npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/locator\n>> > on localhost[10334] as locator is currently online.\n>> > Process ID: 2834\n>> > Uptime: 15 seconds\n>> > GemFire Version: 1.0.0.0-SNAPSHOT\n>> > Java Version: 1.7.0_72\n>> > Log File:\n>> >\n>> >\n>> /npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/locator/locator.log\n>> > JVM Arguments: -Dgemfire.enable-cluster-configuration=true\n>> > -Dgemfire.load-cluster-configuration-from-dir=false -Xms256m -Xmx256m\n>> > -Dgemfire.jmx-manager=false -Dgemfire.jmx-manager-start=false\n>> > -Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true\n>> > -Dsun.rmi.dgc.server.gcInterval=9223372036854775806\n>> > Class-Path:\n>> >\n>> >\n>> /npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/lib/gemfire-core-1.0.0.0-SNAPSHOT.jar:/npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/lib/gemfire-core-dependencies.jar\n>> >\n>> > Please use \"connect --locator=pnq-npatel1[10334]\" to connect Gfsh to the\n>> > locator.\n>> >\n>> > Failed to connect; unknown cause: Connection refused\n>> >\n>> > *Step-2: start server (Non-Manager node. That means it will start\n>> developer\n>> > REST APIs, and not ADMIN REST APIs).*\n>>\n>> >\n>> > gfsh>start server --name=server1 --locators=localhost[10334]\n>> --J=-Xms512m\n>> > --J=-Xmx512m --J=-Dgemfire.start-dev-rest-api=true\n>> > --J=-Dgemfire.http-service-bind-address=localhost\n>> > --J=-Dgemfire.http-service-port=7075\n>> > Starting a GemFire Server in\n>> >\n>> >\n>> /npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/server1...\n>> > ...........\n>> > Server in\n>> >\n>> >\n>> /npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/server1\n>> > on pnq-npatel1[40404] as server1 is currently online.\n>> > Process ID: 2968\n>> > Uptime: 5 seconds\n>> > GemFire Version: 1.0.0.0-SNAPSHOT\n>> > Java Version: 1.7.0_72\n>> > Log File:\n>> >\n>> >\n>> /npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/server1/server1.log\n>> > JVM Arguments: -Dgemfire.locators=localhost[10334]\n>> > -Dgemfire.use-cluster-configuration=true -Xms512m -Xmx512m\n>> > -Dgemfire.start-dev-rest-api=true\n>> > -Dgemfire.http-service-bind-address=localhost\n>> > -Dgemfire.http-service-port=7075 -XX:OnOutOfMemoryError=kill -KILL %p\n>> > -Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true\n>> > -Dsun.rmi.dgc.server.gcInterval=9223372036854775806\n>> > Class-Path:\n>> >\n>> >\n>> /npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/lib/gemfire-core-1.0.0.0-SNAPSHOT.jar:/npatel1/github/geode/incubator-geode/gemfire-assembly/build/install/geode/lib/gemfire-core-dependencies.jar\n>> >\n>> > *Step-3: Access developer REST APIs*\n>> >\n>> > http://localhost:7075/gemfire-api/docs/index.html\n>> >\n>> > *Step-4: Try to access ADMIN REST through gfsh. As this is a Manager\n>> node\n>> > it will not start ADMIN REST APIs.*\n>>\n>> >\n>> > gfsh>connect --use-http=true --url=http://localhost:7075/gemfire/v1\n>> > [warn 2015/05/02 14:24:37.571 IST <Gfsh Launcher> tid=0xa] GET request\n>> for\n>> > \"\n>> > http://localhost:7075/gemfire/v1/index\" resulted in 404 (Not Found);\n>> > invoking error handler\n>> >\n>> > org.springframework.web.client.HttpClientErrorException: 404 Not Found\n>> > at\n>> >\n>> >\n>> org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:88)\n>> > at\n>> >\n>> >\n>> org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:566)\n>> > at\n>> >\n>> >\n>> org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:524)\n>> > at\n>> >\n>> org.springframework.web.client.RestTemplate.execute(RestTemplate.java:482)\n>> > at\n>> >\n>> >\n>> org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:241)\n>> > at\n>> >\n>> >\n>> com.gemstone.gemfire.management.internal.web.http.support.SimpleHttpRequester.get(SimpleHttpRequester.java:84)\n>> > at\n>> >\n>> >\n>> com.gemstone.gemfire.management.internal.cli.commands.ShellCommands.connect(ShellCommands.java:204)\n>> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n>> > at\n>> >\n>> >\n>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n>> > at\n>> >\n>> >\n>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n>> > at java.lang.reflect.Method.invoke(Method.java:606)\n>> > at\n>> >\n>> >\n>> com.gemstone.gemfire.management.internal.cli.util.spring.ReflectionUtils.invokeMethod(ReflectionUtils.java:51)\n>> > at\n>> >\n>> >\n>> com.gemstone.gemfire.management.internal.cli.shell.GfshExecutionStrategy.execute(GfshExecutionStrategy.java:103)\n>> > at\n>> >\n>> >\n>> org.springframework.shell.core.AbstractShell.executeCommand(AbstractShell.java:223)\n>> > at\n>> >\n>> >\n>> com.gemstone.gemfire.management.internal.cli.shell.Gfsh.executeCommand(Gfsh.java:412)\n>> > at\n>> >\n>> >\n>> com.gemstone.gemfire.management.internal.cli.shell.Gfsh.promptLoop(Gfsh.java:850)\n>> > at org.springframework.shell.core.JLineShell.run(JLineShell.java:158)\n>> > at java.lang.Thread.run(Thread.java:745)\n>> > 404 Not Found\n>> >\n>> > * NOTE: Admin REST web-app will not be deployed when you start a geode\n>> data\n>> > node (jmx-manager* = false).*\n>>\n>> >\n>> > Still, if you have any concern go through the attached patch. I have not\n>> > changed anything to AgentUtils.java.\n>> >\n>> > Let me know if you have any concern.\n>> >\n>> > Regards,\n>> > Nilkanth.\n>> >\n>> >\n>> > On Sat, May 2, 2015 at 7:15 AM, wwilliams-pivotal <\n>> > notifications@github.com>\n>> > wrote:\n>> >\n>> > > I've reached the end of the line with this fix. The changes to the\n>> > > RestAgent surely cause the browser REST API to work. However, the gfsh\n>> > > Management REST API fails.\n>> > >\n>> > > Nilkanth encourages:\n>> > > you need to have similar changes (like you made to RestAgent.java) to\n>> > > ManagementAgent.java so that it resolve the correct .war files for\n>> pulse,\n>> > > REST APIs .\n>> > >\n>> > > Here's the conclusion:\n>> > > 1) When the RESTAgent is changed to deliver gemfire-web-api, that\n>> change\n>> > > *fixes* the browser REST API but *breaks* the Management REST API.\n>> > > 2) The Management REST API works fine without the RestAgent change,\n>> which\n>> > > John outlined with his usual superb teaching ability.\n>> > > 3) Correctly changing the ManagementAgent per Nilkanth's guidance\n>> *fixes*\n>> > > the Manage REST API but *breaks* the working browser REST API in\n>> > RestAgent.\n>> > >\n>> > > 4) After a week of testing endless permutations of the\n>> ManagementAgent's\n>> > > returns, I am unable to find a solution where both work.\n>> > >\n>> > > I would love to complete this but I propose partnering with someone in\n>> > the\n>> > > spirit of Agile paired-programming that Pivotal espouses in the Data\n>> Labs\n>> > > approach.\n>> > >\n>> > > Any volunteers?\n>> > >\n>> > >\n>> > > *Wes Williams | Pivotal Sr. **Data Engineer*\n>> > > 781.606.0325\n>> > > http://pivotal.io/big-data/pivotal-gemfire\n>> > >\n>> > > On Thu, Apr 30, 2015 at 6:57 PM, Roman V Shaposhnik <\n>> > > notifications@github.com> wrote:\n>> > >\n>> > > > @wwilliams-pivotal <https://github.com/wwilliams-pivotal> forgot to\n>> > > > include the link https://github.com/apache/incubator-geode\n>> > > >\n>> > > > —\n>> > > > Reply to this email directly or view it on GitHub\n>> > > > <\n>> https://github.com/project-geode/docs/issues/1#issuecomment-97994194\n>> > >.\n>> > >\n>> > > >\n>> > >\n>> > > —\n>> > > Reply to this email directly or view it on GitHub\n>> > > <https://github.com/project-geode/docs/issues/1#issuecomment-98281880\n>> >.\n>> > >\n>> >\n>> > diff --git\n>> >\n>> a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java\n>> >\n>> b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java\n>> > index ebb03e8..1358a52 100755\n>> > ---\n>> >\n>> a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java\n>> > +++\n>> >\n>> b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java\n>> > @@ -7,7 +7,7 @@\n>> > */\n>> > package com.gemstone.gemfire.management.internal;\n>> >\n>> > -import java.io.File;\n>> > +//import java.io.File;\n>> > import java.io.IOException;\n>> > import java.io.Serializable;\n>> > import java.lang.management.ManagementFactory;\n>> > @@ -76,6 +76,8 @@ public class ManagementAgent {\n>> > private final DistributionConfig config;\n>> > private boolean isHttpServiceRunning = false;\n>> > private ManagementInterceptor securityInterceptor;\n>> > + private final String GEMFIRE_VERSION =\n>> > GemFireVersion.getGemFireVersion();\n>> > + private AgentUtil agentUtil = new AgentUtil(GEMFIRE_VERSION);\n>> >\n>> > /**\n>> > * This system property is set to true when the embedded HTTP server is\n>> > started so that the embedded pulse webapp\n>> > @@ -150,7 +152,6 @@ public class ManagementAgent {\n>> > }\n>> >\n>> > private Server httpServer;\n>> > - private final String GEMFIRE_VERSION =\n>> > GemFireVersion.getGemFireVersion();\n>> >\n>> > private void startHttpService(boolean isServer) {\n>> > final SystemManagementService managementService =\n>> > (SystemManagementService) ManagementService.getManagementService(\n>> > @@ -165,10 +166,12 @@ public class ManagementAgent {\n>> > }\n>> >\n>> > // GEMFIRE environment variable\n>> > - final String gemfireHome = System.getenv(\"GEMFIRE\");\n>> > + //final String gemfireHome = System.getenv(\"GEMFIRE\");\n>> >\n>> > // Check for empty variable. if empty, then log message and exit HTTP\n>> > server startup\n>> > - if (StringUtils.isBlank(gemfireHome)) {\n>> > + //if (StringUtils.isBlank(gemfireHome)) {\n>> > + /*\n>> > + if (agentUtil.isGemfireHomeDefined()) {\n>> > final String message = \"GEMFIRE environment variable not set; HTTP\n>> service\n>> > will not start.\";\n>> > setStatusMessage(managerBean, message);\n>> > if (logger.isDebugEnabled()) {\n>> > @@ -176,9 +179,11 @@ public class ManagementAgent {\n>> > }\n>> > return;\n>> > }\n>> > -\n>> > + */\n>> > // Find the Management WAR file\n>> > - final String gemfireWar = getGemFireWarLocation(gemfireHome);\n>> > + //final String gemfireWar = getGemFireWarLocation(gemfireHome);\n>> > + //final String gemfireWar = agentUtil.getGemfireApiWarLocation();\n>> > + final String gemfireWar = agentUtil.getGemFireWebWarLocation();\n>> >\n>> > if (gemfireWar == null) {\n>> > if (logger.isDebugEnabled()) {\n>> > @@ -187,7 +192,8 @@ public class ManagementAgent {\n>> > }\n>> >\n>> > // Find the Pulse WAR file\n>> > - final String pulseWar = getPulseWarLocation(gemfireHome);\n>> > + //final String pulseWar = getPulseWarLocation(gemfireHome);\n>> > + final String pulseWar = agentUtil.getPulseWarLocation();\n>> >\n>> > if (pulseWar == null) {\n>> > final String message = \"Unable to find Pulse web application WAR file;\n>> > Pulse will not start in embeded mode\";\n>> > @@ -198,7 +204,8 @@ public class ManagementAgent {\n>> > }\n>> >\n>> > //Find developer REST WAR file\n>> > - final String gemfireAPIWar = getGemFireAPIWarLocation(gemfireHome);\n>> > + //final String gemfireAPIWar = getGemFireAPIWarLocation(gemfireHome);\n>> > + final String gemfireAPIWar = agentUtil.getGemFireWebApiWarLocation();\n>> > if (gemfireAPIWar == null) {\n>> > final String message = \"Unable to find developer REST web application\n>> WAR\n>> > file; developer REST will not start in embeded mode\";\n>> > setStatusMessage(managerBean, message);\n>> > @@ -208,7 +215,8 @@ public class ManagementAgent {\n>> > }\n>> >\n>> > try {\n>> > - if (isWebApplicationAvailable(gemfireWar, pulseWar, gemfireAPIWar)) {\n>> > + //if (isWebApplicationAvailable(gemfireWar, pulseWar, gemfireAPIWar))\n>> {\n>> > + if (agentUtil.isWebApplicationAvailable(gemfireWar, pulseWar,\n>> > gemfireAPIWar)) {\n>> >\n>> > final String bindAddress = this.config.getHttpServiceBindAddress();\n>> > final int port = this.config.getHttpServicePort();\n>> > @@ -222,16 +230,19 @@ public class ManagementAgent {\n>> > this.config.getHttpServiceSSLCiphers(),\n>> > this.config.getHttpServiceSSLProperties());\n>> >\n>> > - if (isWebApplicationAvailable(gemfireWar)) {\n>> > + //if (isWebApplicationAvailable(gemfireWar)) {\n>> > + if (agentUtil.isWebApplicationAvailable(gemfireWar)) {\n>> > this.httpServer = JettyHelper.addWebApplication(this.httpServer,\n>> > \"/gemfire\", gemfireWar);\n>> > }\n>> >\n>> > - if (isWebApplicationAvailable(pulseWar)) {\n>> > + //if (isWebApplicationAvailable(pulseWar)) {\n>> > + if (agentUtil.isWebApplicationAvailable(pulseWar)) {\n>> > this.httpServer = JettyHelper.addWebApplication(this.httpServer,\n>> \"/pulse\",\n>> > pulseWar);\n>> > }\n>> >\n>> > if(isServer && this.config.getStartDevRestApi()) {\n>> > - if (isWebApplicationAvailable(gemfireAPIWar) ) {\n>> > + //if (isWebApplicationAvailable(gemfireAPIWar) ) {\n>> > + if (agentUtil.isWebApplicationAvailable(gemfireAPIWar) ) {\n>> > this.httpServer = JettyHelper.addWebApplication(this.httpServer,\n>> > \"/gemfire-api\", gemfireAPIWar);\n>> > isRestWebAppAdded = true;\n>> > }\n>> > @@ -253,7 +264,8 @@ public class ManagementAgent {\n>> > this.httpServer = JettyHelper.startJetty(this.httpServer);\n>> >\n>> > // now, that Tomcat has been started, we can set the URL used by web\n>> > clients to connect to Pulse\n>> > - if (isWebApplicationAvailable(pulseWar)) {\n>> > + //if (isWebApplicationAvailable(pulseWar)) {\n>> > + if (agentUtil.isWebApplicationAvailable(pulseWar)) {\n>> > managerBean.setPulseURL(\"http://\n>> > \".concat(getHost(bindAddress)).concat(\":\").concat(String.valueOf(port))\n>> > .concat(\"/pulse/\"));\n>> > }\n>> > @@ -298,6 +310,7 @@ public class ManagementAgent {\n>> > // First, look in the $GEMFIRE/tools/Management directory\n>> > // Second, look in the $GEMFIRE/lib directory\n>> > // Finally, if we cannot find Management WAR file then return null...\n>> > + /*\n>> > private String getGemFireWarLocation(final String gemfireHome) {\n>> > assert !StringUtils.isBlank(gemfireHome) : \"The GEMFIRE environment\n>> > variable must be set!\";\n>> >\n>> > @@ -311,11 +324,12 @@ public class ManagementAgent {\n>> > return null;\n>> > }\n>> > }\n>> > -\n>> > + */\n>> > // Use the GEMFIRE environment variable to find the GemFire product\n>> tree.\n>> > // First, look in the $GEMFIRE/tools/Pulse directory\n>> > // Second, look in the $GEMFIRE/lib directory\n>> > // Finally, if we cannot find the Management WAR file then return\n>> null...\n>> > + /*\n>> > private String getPulseWarLocation(final String gemfireHome) {\n>> > assert !StringUtils.isBlank(gemfireHome) : \"The GEMFIRE environment\n>> > variable must be set!\";\n>> >\n>> > @@ -329,7 +343,8 @@ public class ManagementAgent {\n>> > return null;\n>> > }\n>> > }\n>> > -\n>> > + */\n>> > + /*\n>> > private String getGemFireAPIWarLocation(final String gemfireHome) {\n>> > assert !StringUtils.isBlank(gemfireHome) : \"The GEMFIRE environment\n>> > variable must be set!\";\n>> > if (new File(gemfireHome + \"/tools/Extensions/gemfire-api\" +\n>> > GEMFIRE_VERSION + \".war\").isFile()) {\n>> > @@ -342,15 +357,16 @@ public class ManagementAgent {\n>> > return null;\n>> > }\n>> > }\n>> > -\n>> > + */\n>> > private boolean isRunningInTomcat() {\n>> > return (System.getProperty(\"catalina.base\") != null ||\n>> > System.getProperty(\"catalina.home\") != null);\n>> > }\n>> > -\n>> > + /*\n>> > private boolean isWebApplicationAvailable(final String warFileLocation)\n>> {\n>> > return !StringUtils.isBlank(warFileLocation);\n>> > }\n>> > -\n>> > + */\n>> > + /*\n>> > private boolean isWebApplicationAvailable(final String...\n>> > warFileLocations) {\n>> > for (String warFileLocation : warFileLocations) {\n>> > if (isWebApplicationAvailable(warFileLocation)) {\n>> > @@ -360,7 +376,7 @@ public class ManagementAgent {\n>> >\n>> > return false;\n>> > }\n>> > -\n>> > + */\n>> > private void setStatusMessage(ManagerMXBean mBean, String message) {\n>> > mBean.setPulseURL(\"\");\n>> > mBean.setStatusMessage(message);\n>> > diff --git\n>> >\n>> a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java\n>> >\n>> b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java\n>> > index 37a767c..7520abb 100755\n>> > ---\n>> >\n>> a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java\n>> > +++\n>> >\n>> b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java\n>> > @@ -8,12 +8,12 @@\n>> >\n>> > package com.gemstone.gemfire.management.internal;\n>> >\n>> > -import java.io.File;\n>> > +//import java.io.File;\n>> >\n>> > import org.apache.logging.log4j.Logger;\n>> > import org.eclipse.jetty.server.Server;\n>> > import org.eclipse.jetty.server.ServerConnector;\n>> > -import org.springframework.util.Assert;\n>> > +//import org.springframework.util.Assert;\n>> >\n>> > import com.gemstone.gemfire.cache.AttributesFactory;\n>> > import com.gemstone.gemfire.cache.CacheFactory;\n>> > @@ -24,7 +24,7 @@ import\n>> > com.gemstone.gemfire.distributed.internal.DistributionConfig;\n>> > import com.gemstone.gemfire.internal.GemFireVersion;\n>> > import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;\n>> > import com.gemstone.gemfire.internal.cache.InternalRegionArguments;\n>> > -import com.gemstone.gemfire.internal.lang.StringUtils;\n>> > +//import com.gemstone.gemfire.internal.lang.StringUtils;\n>> > import com.gemstone.gemfire.internal.logging.LogService;\n>> > import com.gemstone.gemfire.management.ManagementService;\n>> >\n>> > @@ -42,7 +42,9 @@ public class RestAgent {\n>> >\n>> > private boolean running = false;\n>> > private final DistributionConfig config;\n>> > -\n>> > + private final String GEMFIRE_VERSION =\n>> > GemFireVersion.getGemFireVersion();\n>> > + private AgentUtil agentUtil = new AgentUtil(GEMFIRE_VERSION);\n>> > +\n>> > public RestAgent(DistributionConfig config) {\n>> > this.config = config;\n>> > }\n>> > @@ -92,8 +94,8 @@ public class RestAgent {\n>> > }\n>> >\n>> > private Server httpServer;\n>> > - private final String GEMFIRE_VERSION =\n>> > GemFireVersion.getGemFireVersion();\n>> >\n>> > + /*\n>> > private String getGemFireAPIWarLocation(final String gemfireHome) {\n>> > assert !StringUtils.isBlank(gemfireHome) : \"The GEMFIRE environment\n>> > variable must be set!\";\n>> > if (new File(gemfireHome + \"/tools/Extensions/gemfire-api\" +\n>> > GEMFIRE_VERSION + \".war\").isFile()) {\n>> > @@ -106,24 +108,25 @@ public class RestAgent {\n>> > return null;\n>> > }\n>> > }\n>> > -\n>> > + */\n>> > private boolean isRunningInTomcat() {\n>> > return (System.getProperty(\"catalina.base\") != null ||\n>> > System.getProperty(\"catalina.home\") != null);\n>> > }\n>> > -\n>> > + /*\n>> > private boolean isWebApplicationAvailable(final String warFileLocation)\n>> {\n>> > return !StringUtils.isBlank(warFileLocation);\n>> > }\n>> > -\n>> > + */\n>> > //Start HTTP service in embedded mode\n>> > public void startHttpService() {\n>> > //TODO: add a check that will make sure that we start HTTP service on\n>> > non-manager data node\n>> > logger.info(\"Attempting to start HTTP service on port ({}) at\n>> > bind-address ({})...\",\n>> > this.config.getHttpServicePort(),\n>> this.config.getHttpServiceBindAddress());\n>> >\n>> > - String gemfireHome = System.getenv(\"GEMFIRE\");\n>> > + //String gemfireHome = System.getenv(\"GEMFIRE\");\n>> >\n>> > // Check for empty variable. if empty, then log message and exit HTTP\n>> > server startup\n>> > + /*\n>> > if (StringUtils.isBlank(gemfireHome)) {\n>> > String gemfire = System.getProperty(\"gemfire.home\");\n>> > logger.info(\"Reading gemfire.home System Property -> {}\", gemfire);\n>> > @@ -134,9 +137,12 @@ public class RestAgent {\n>> > gemfireHome = gemfire;\n>> > }\n>> > }\n>> > -\n>> > + */\n>> > +\n>> > +\n>> > // Find the developer REST WAR file\n>> > - final String gemfireAPIWar = getGemFireAPIWarLocation(gemfireHome);\n>> > + //final String gemfireAPIWar = getGemFireAPIWarLocation(gemfireHome);\n>> > + final String gemfireAPIWar = agentUtil.getGemFireWebApiWarLocation();\n>> >\n>> > if(gemfireAPIWar == null){\n>> > logger.info(\"Unable to find GemFire Developer REST API WAR file; the\n>> > Developer REST API for GemFire will not be exported and accessible.\");\n>> > @@ -147,7 +153,8 @@ public class RestAgent {\n>> > if (isRunningInTomcat()) {\n>> > logger.warn(\"Detected presence of catalina system properties. HTTP\n>> service\n>> > will not be started. To enable the GemFire developer REST API, please\n>> > deploy the gemfire-web.war file in your application server.\");\n>> > }\n>> > - else if (isWebApplicationAvailable(gemfireAPIWar)) {\n>> > + //else if (isWebApplicationAvailable(gemfireAPIWar)) {\n>> > + else if (agentUtil.isWebApplicationAvailable(gemfireAPIWar)) {\n>> >\n>> > final String bindAddress = this.config.getHttpServiceBindAddress();\n>> > final int port = this.config.getHttpServicePort();\n>> >\n>> > —\n>> > Reply to this email directly or view it on GitHub\n>> > <https://github.com/project-geode/docs/issues/1#issuecomment-98337585>.\n>>\n>> >\n>>\n>> —\n>> Reply to this email directly or view it on GitHub\n>> <https://github.com/project-geode/docs/issues/1#issuecomment-98437710>.\n>>\n>\n>\n"}}