Unable to login as anonymous!

Hello,
I’m new to CUBA. I had to update and fix an old (6.3.6) version. I updated to 7.1.0.
Application starts and I can access localhost server through my browser but after a brief period of loading the web app crashes and I get following messages in log files:

app.log
localhost.log

After a quick google search I found this thread but it wasn’t responded to by the author and the log was incomplete so I wasn’t certain whether it was at all related to my case because the last post said the mentioned exception can mean a lot of different things.

The log says the app can’t connect as anonymous, I checked my MariaDB server and anonymous user exists. I tried changing the configuration, manually adding anonymous user, switching the DB (it was hsql before), nothing worked and I get the same error.

Database is populated with tables generated by CUBA so I know that at least gradle can connect properly. I looked through the web module configuration but couldn’t find any references to the DB link manually and grep -n sql modules/web/**/*.* returns empty list.

I’m using:
Linux 5.2.11-1-MANJARO x86_64 18.0.4 Illyria
Gradle 5.5.1
Java 11

Hi,

It looks like a problem with connecting web tier to core, see in the stacktrace the root cause:

Caused by: java.lang.IllegalArgumentException: Service ticketing/cuba_TrustedClientService is not registered in LocalServiceDirectory
	at com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.invoke(LocalServiceProxy.java:105) ~[cuba-web-7.1.0.jar:7.1.0]
	at com.sun.proxy.$Proxy29.getAnonymousSession(Unknown Source) ~[na:na]

The requested service name is suspicious: ticketing/cuba_TrustedClientService. Normally it should be ticketing-core/cuba_TrustedClientService.
Make sure you have the following lines in web-app.properties:

cuba.useLocalServiceInvocation = true
cuba.connectionUrlList = http://localhost:8080/ticketing-core
1 Like

Changing cuba.connectionUrlList = http://localhost:8080/ticketing to cuba.connectionUrlList = http://localhost:8080/ticketing-core in web-app.properties resolved the problem.