cancel
Showing results for 
Search instead for 
Did you mean: 

Start Hana/Frontend Server during Boot on AWS

Former Member

Hi all,

we have a Linux instance which is hosted on AWS. On this machine we installed Hana with the XSA addon. Moreover, on the same machine an ABAP Front-end server is installed. We deployed custom SAPUI5 applications to the ABAP repository that are accessible through the Fiori Launchpad. The applications access the backend system via ODATA which is developed with Java on Hana XSA.

Now we shutdown our AWS instance everyday to save costs. I wrote a little script which I added to the after.local and halt.local file so that the HANA and Frontend server is started/stopped automatically. The script looks likes follow:

after.local:

su - <HANASID>adm –c “/usr/sap/<HANASID>/HDB00/HDB start”
su - <ABAPSID>adm –c “/usr/sap/<ABAPSID>/SYS/exe/uc/linuxx86_64/startsap r3”

halt.local

su - <ABAPSID>adm –c “/usr/sap/<ABAPSID>/SYS/exe/uc/linuxx86_64/stopsap r3”
su - <HANASID>adm –c “/usr/sap/<HANASID>/HDB00/HDB stop”

The script works fine. However, the Hana database not start the XSA components. At every boot process randomily one service such as xscontroller/xsexecagent/xsuaaserver failed to start. In the log files i found this:

[2017-02-24 08:49:13:700]-[Controller.Admin]-[error]-[controller]-[startup]: Failed to start controller
com.sap.xs2rt.controller.ControllerExceptions$ControllerStartUpException: Could not startup the controller components: The controller is not available via the platform router. The cause for this could be port 30030 is unavailable, wrong proxy settings, an unreachable or incorrect domain or others. Please check the SAP WebDispatcher logs in /hana/shared/HCD/xs/bin/../controller_data/controller/router/webdispatcher/logs and the controller log.
	at com.sap.xs2rt.controller.impl.ControllerImpl.startUp(ControllerImpl.java:1027)
	at com.sap.xs2rt.controller.impl.ControllerConsole.main(ControllerConsole.java:679)
Caused by: com.sap.xs2rt.controller.ControllerExceptions$ControllerStartUpException: The controller is not available via the platform router. The cause for this could be port 30030 is unavailable, wrong proxy settings, an unreachable or incorrect domain or others. Please check the SAP WebDispatcher logs in /hana/shared/HCD/xs/bin/../controller_data/controller/router/webdispatcher/logs and the controller log.
	at com.sap.xs2rt.controller.impl.ControllerImpl.startUp(ControllerImpl.java:979)
	... 1 more
Caused by: com.sap.xs2rt.core.rest.client.RestException: Error executing request GET https://hkrbudgeting:30030/v2/info: java.net.ConnectException: errno: 111 (Connection refused), error: Connection refused (local port 48270 to address 10.0.21.133 (hkrbudgeting), remote port 30030 to address 10.0.21.133 (hkrbudgeting))
	at com.sap.xs2rt.core.rest.client.RestResource.method(RestResource.java:470)
	at com.sap.xs2rt.core.rest.client.RestResource.get(RestResource.java:235)
	at com.sap.xs2rt.core.generated.rest.resource.client.InfoClient.getInfo(InfoClient.java:64)
	at com.sap.xs2rt.controller.impl.ControllerImpl.startUp(ControllerImpl.java:971)
	... 1 more
Caused by: javax.ws.rs.ProcessingException: java.net.ConnectException: errno: 111 (Connection refused), error: Connection refused (local port 48270 to address 10.0.21.133 (hkrbudgeting), remote port 30030 to address 10.0.21.133 (hkrbudgeting))
	at org.glassfish.jersey.client.HttpUrlConnector.apply(HttpUrlConnector.java:244)
	at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:245)
	at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:671)
	at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:668)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:444)
	at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:668)
	at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:402)
	at com.sap.xs2rt.core.rest.client.RestResource.method(RestResource.java:466)
	... 4 more
Caused by: java.net.ConnectException: errno: 111 (Connection refused), error: Connection refused (local port 48270 to address 10.0.21.133 (hkrbudgeting), remote port 30030 to address 10.0.21.133 (hkrbudgeting))
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:591)
	at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:437)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:532)
	at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
	at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
	at org.glassfish.jersey.client.HttpUrlConnector._apply(HttpUrlConnector.java:335)
	at org.glassfish.jersey.client.HttpUrlConnector.apply(HttpUrlConnector.java:242)
	... 14 more

When I not using the startup script and manually execute the script when the AWS instance is up it works fine.

Somebody why this is not working during the bootstrap phase on AWS?

Best regards,

Manjinder

Accepted Solutions (0)

Answers (3)

Answers (3)

BJarkowski
Active Contributor
Former Member
0 Kudos

Hi,

the autostart function is not a good option. In our case the frond-end server (SAP NW 7.5) should be also start automatically. If I set the flag to true and remove the Hana line from the script the startsap ALL (or r3) fail because the Hana database is not running at this point of time.

We using the same script in our S/4 Hana AWS instance and there it is working fine. Only in combination with XSA this is not working. The strange thing is that randomily some XSA services are failing to start.

Best regards,

Manjinder

Mushfiq
Explorer
0 Kudos

the start hana script , sometimes it takes longer than normal to start all services of HANA