Problem running Cuba application deployed to Tomcat in Cloud

I’m trying to deploy the sample application into Tomcat which is hosted in the Cloud. I managed to get the Cuba login screen but when I entered the user ID and password it remains on the Login screen.

I notice there is an error in the log saying “HTTP Upgrade is not supported by this protocol”. Can someone help me identify the problem? Attached is the snapshot of the log file. Thanks.

2016-10-20 14:53:20.731 DEBUG [ajp-nio-33187-exec-1] com.haulmont.cuba.web.AppUI - Initializing AppUI
2016-10-20 14:53:20.731 DEBUG [ajp-nio-33187-exec-1] com.haulmont.cuba.web.App - Initializing application
20-Oct-2016 14:53:24.269 SEVERE [ajp-nio-33187-exec-1] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [app_servlet] in context with path [/life] threw exception
 java.lang.UnsupportedOperationException: HTTP upgrade is not supported by this protocol
	at org.apache.coyote.AbstractProcessor.doHttpUpgrade(
	at org.apache.coyote.AbstractProcessor.action(
	at org.apache.coyote.Request.action(
	at org.apache.catalina.connector.Request.upgrade(
	at org.apache.catalina.connector.RequestFacade.upgrade(
	at org.apache.tomcat.websocket.server.UpgradeUtil.doUpgrade(
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(
	at com.haulmont.cuba.web.sys.CubaHttpFilter.handleNotFiltered(
	at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(
	at org.apache.catalina.core.StandardWrapperValve.invoke(
	at org.apache.catalina.core.StandardContextValve.invoke(
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
	at org.apache.catalina.core.StandardHostValve.invoke(
	at org.apache.catalina.valves.ErrorReportValve.invoke(
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(
	at org.apache.catalina.core.StandardEngineValve.invoke(
	at org.apache.catalina.connector.CoyoteAdapter.service(
	at org.apache.coyote.ajp.AjpProcessor.service(
	at org.apache.coyote.AbstractProcessorLight.process(
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$
	at org.apache.tomcat.util.threads.TaskThread$


It means some problem exist with websocket.

Do you use proxy, for example nginx?

If yes then you need config your nginx to correctly proxy the websocket whih is used by vaadin Atmosphere framework.


Hi Sándor,

I’m using Tomcat Hosting by JavaPipe. I was told by them that there is a unique Port number assigned to my Tomcat container for example 33nnn. So, they suggest to access the web app that I deployed using that port number like this: By using this way, I managed to get around the previous issue of “HTTP upgrade is not supported”.

However, I get another error that suggest to me that the application is still trying to access the default HTTP port 8080. Then, I tried to change the HTTP port setting from within the Cuba Studio to 33nnn, rebuild the WAR and re-deploy the WAR to my Tomcat. However, I still get the same error where the app is still trying to access port 8080.

Hope this additional info can give you a clearer picture of where the issue might be. Thanks.

This is the error log that I get

2016-10-21 09:48:46.297 DEBUG [http-nio-33186-exec-9] com.haulmont.cuba.web.AppUI - Initializing AppUI
2016-10-21 09:49:51.419 INFO [http-nio-33186-exec-7] com.haulmont.cuba.core.sys.remoting.ClusteredHttpInvokerRequestExecutor - Invocation of http://localhost:8080/life-core/remoting/cuba_LoginService failed: Connection refused
2016-10-21 09:49:51.420 INFO [http-nio-33186-exec-7] com.haulmont.cuba.core.sys.remoting.ClusteredHttpInvokerRequestExecutor - No more URL available
2016-10-21 09:49:51.420 DEBUG [http-nio-33186-exec-7] com.haulmont.cuba.web.log.AppLog - WARNING: SocketException in CommunicationManager. Most likely client (browser) closed socket.


I think, You ned setup correctly the web tier (app) and middleware tier (app-core) connection.
You can find the help in the documentation about scalling.

You probably need to configure the web client’s cuba.connectionUrlList variable correctly and probably set cuba.useLocalServiceInvocation to false, otherways the web client allways tries to connect to the middleware over

Se stage2 for more information.


Do you build a single WAR or separate for web and core?

Hi Konstantin,

I build separate WAR for the app.

Hi Sándor,

Ok, I will look into the info you gave me. Thanks.

Then Sandor is right, you should set up the cuba.connectionUrlList property on the web tier. You can provide it to the buildWar task in the appProperties map.

Hi Sándor & Konstantin,

After I add in the cuba.connectionUrlList property in the buildWar, the previous problem is solved but then I get a different “HTTP 404” error.

Btw, I just noticed there was an error when app-core.WAR is deployed to Tomcat. The error comes from AppContextLoader - Error initializing application. Could it be the original problem?

Attached is the log starting from when the WAR(s) are deployed up to pressing Submit button at the Login screen. I hope you guys can help me find the problem from the log file. Thanks.

catalina_out.txt (46.5K)

I think your middleware (app-core) cannot start because of database problem.

The root cause is this error:

java.sql.SQLException: Invalid default value for ‘CREATE_TS’ Query: create table SYS_DB_CHANGELOG(SCRIPT_NAME varchar(255) not null primary key, CREATE_TS DATETIME default current_timestamp, IS_INIT integer default 0) Parameters: []

So the middleware failed to start, and then web client cannot access it.


Probably your cloud provider uses MySQL of a version older than 5.6. Unfortunately, CUBA supports only 5.6+.

Hi Sándor & Konstantin,

Yes, I think MYSQL is the problem. Thank you all for the helps.