Hmm, I think you are missing a spring boot dependency that needs to contain 
HttpService.class
Maybe you have to use the @EnableHttpService annotation in your application.

https://docs.spring.io/spring-gemfire/docs/current/reference/html/#bootstrap-annotation-config-embedded-services-http

I have no further clue ☺

From: Pratibha Ayengar [mailto:pratibha.ayen...@gmail.com]
Sent: 16 February 2021 04:52
To: user@geode.apache.org
Subject: Re: Apache geode 1.12.0 swagger UI issue


This email has reached the company via an external source.

Please be cautious opening any attachments or links.

Thank you, Rupert. This does help narrow it down. Would you be able to help on 
what this particular check is - if 
(cache.getOptionalService(HttpService.class).isPresent())
This is the one that seems to be failing.

Thanks,
Pratibha


On Mon, Feb 15, 2021 at 3:04 PM Rupert St John Webster 
<rupert.stjohnwebs...@impress-solutions.com<mailto:rupert.stjohnwebs...@impress-solutions.com>>
 wrote:
// Check if we're already running inside Tomcat
        if (isRunningInTomcat()) {
            logger.warn("Detected presence of catalina system properties. HTTP 
service will not be started. To enable the GemFire Developer REST API, please 
deploy the /geode-web-api WAR file in your application server.");
        } else if (agentUtil.isAnyWarFileAvailable(gemfireAPIWar)) {
            Map<String, Object> securityServiceAttr = new HashMap<>();
            
securityServiceAttr.put(HttpService.SECURITY_SERVICE_SERVLET_CONTEXT_PARAM, 
securityService);
            if (cache.getOptionalService(HttpService.class).isPresent()) {
                HttpService httpService = 
cache.getOptionalService(HttpService.class).get();
                Path gemfireAPIWarPath = Paths.get(gemfireAPIWar);
                httpService.addWebApplication("/gemfire-api", 
gemfireAPIWarPath, securityServiceAttr);
                httpService.addWebApplication("/geode", gemfireAPIWarPath, 
securityServiceAttr);
            } else {
                logger.warn("HttpService is not available - could not start Dev 
REST API");
            }

Is this any help?

cheers

From: Pratibha Ayengar 
[mailto:pratibha.ayen...@gmail.com<mailto:pratibha.ayen...@gmail.com>]
Sent: 14 February 2021 09:44
To: user@geode.apache.org<mailto:user@geode.apache.org>
Subject: Re: Apache geode 1.12.0 swagger UI issue


This email has reached the company via an external source.

Please be cautious opening any attachments or links.

Hi Aashish,

Thank you for coming back. I got the same result after setting GEODE_HOME. Here 
are the logs. Any idea what could cause this issue?

2021-02-14 15:12:31.426  INFO 9976 --- [           main] 
o.a.geode.management.internal.AgentUtil  : GEODE_HOME:D:\apache-geode-1.12.0
2021-02-14 15:12:31.428  INFO 9976 --- [           main] 
o.a.geode.management.internal.AgentUtil  : Located war: geode-web-api at 
location: file:/D:/apache-geode-1.12.0/tools/Extensions/geode-web-api-1.12.0.war
2021-02-14 15:12:31.429  WARN 9976 --- [           main] 
o.a.geode.management.internal.RestAgent  : HttpService is not available - could 
not start Dev REST API

Thanks,
Pratibha

On Sat, Feb 13, 2021 at 5:57 PM Ashish Choudhary 
<aashish.choudha...@gmail.com<mailto:aashish.choudha...@gmail.com>> wrote:
For some reason your GEODE_HOME is null and it might be causing this issue. 
Please check that first.
With best regards,
Ashish

On Sat, Feb 13, 2021, 4:56 PM Pratibha Ayengar 
<pratibha.ayen...@gmail.com<mailto:pratibha.ayen...@gmail.com>> wrote:

Hi Geode Team,

I am upgrading apache geode version from 1.6.0 to 1.12.0 for our project and I 
am having trouble starting up the REST API. Could you please help me understand 
what I am missing here.

We start up the locator using gfsh and use a spring data geode project to start 
the server. Attached are the geode.properties file used to start the locator 
and the project used to start the server.

Following are the commands and the JVM arguments used for the locator and 
server respectively. I have also attached the logs from the server that does 
not seem to indicate the reason why the swagger API is not started.

SpringBoot version - 2.3.0.RELEASE

Locator start command
start locator --name=Locator1 --port=10334 
--properties-file=D:\apache-geode-1.12.0\geode-locator.properties

JVM arguments used while starting server
-Dgemfire.home=D:\apache-geode-1.12.0

Line in the logs that show the API is not available -
2021-02-04 10:53:05.983  INFO 8936 --- [           main] 
o.a.geode.management.internal.AgentUtil  : GEODE_HOME:null
2021-02-04 10:53:05.984  INFO 8936 --- [           main] 
o.a.geode.management.internal.AgentUtil  : Reading gemfire.home System Property 
-> D:\apache-geode-1.12.0
2021-02-04 10:53:05.985  INFO 8936 --- [           main] 
o.a.geode.management.internal.AgentUtil  : Located war: geode-web-api at 
location: file:/D:/apache-geode-1.12.0/tools/Extensions/geode-web-api-1.12.0.war
2021-02-04 10:53:05.986  WARN 8936 --- [           main] 
o.a.geode.management.internal.RestAgent  : HttpService is not available - could 
not start Dev REST API

Appreciate any help I can get.

Thank you,
Pratibha Ayengar

Reply via email to