Unable to update SYS_SERVER, does not start


2017-03-04 20:54:25.961 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.AppComponents - Using app components: [com.haulmont.cuba, com.haulmont.charts, com.haulmont.reports]
2017-03-04 20:54:25.989 INFO  [localhost-startStop-1] com.haulmont.cuba.web.sys.WebAppContextLoader - Loading app properties from classpath:cuba-web-app.properties
2017-03-04 20:54:25.990 INFO  [localhost-startStop-1] com.haulmont.cuba.web.sys.WebAppContextLoader - Loading app properties from classpath:net/ezmovil/ezcrm/web-app.properties
2017-03-04 20:54:26.258 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.CubaClassPathXmlApplicationContext - Refreshing com.haulmont.cuba.core.sys.CubaClassPathXmlApplicationContext@3898e470: startup date [Sat Mar 04 20:54:26 CST 2017]; root of context hierarchy
2017-03-04 20:54:27.754 INFO  [localhost-startStop-1] com.haulmont.cuba.web.sys.remoting.WebRemoteProxyBeanCreator - Configuring proxy beans for local service invocations: [cuba_LoginService, cuba_ServerInfoService, cuba_UserSettingService, cuba_UserManagementService, cuba_DataService, cuba_ConfigStorageService, cuba_PersistenceManagerService, cuba_LockService, cuba_UserSessionService, cuba_FoldersService, cuba_EmailService, cuba_FileStorageService, cuba_EntitySnapshotService, cuba_UniqueNumbersService, cuba_LocalizedMessageService, cuba_ResourceService, cuba_ScheduledTasksService, cuba_EntityLogService, cuba_TestingService, cuba_ObjectsCacheManagerService, cuba_DomainDescriptionService, cuba_RelatedEntitiesService, cuba_EntitySqlGenerationService, cuba_NumberIdService, cuba_QueryResultsService, cuba_DynamicAttributesCacheService, cuba_EntityRestoreService, cuba_LocalFileExchangeService, cuba_EntityImportExportService, cuba_ScreenProfilerService, cuba_ServerTokenStore, cuba_IdpService]
2017-03-04 20:54:27.757 INFO  [localhost-startStop-1] com.haulmont.cuba.web.sys.remoting.WebRemoteProxyBeanCreator - Configuring proxy beans for local service invocations: [report_ReportService, report_ReportWizardService]
2017-03-04 20:54:28.198 INFO  [localhost-startStop-1] com.haulmont.chile.core.datatypes.Datatypes - Can't find /datatypes.xml, using default datatypes settings
2017-03-04 20:54:28.783 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.CubaThreadPoolTaskScheduler - Initializing ExecutorService  'scheduler'
2017-03-04 20:54:29.124 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.jmx.MBeanExporter - Registering beans for JMX exposure: [app.cuba:type=ConfigStorage, app.cuba:type=CachingFacade, app.cuba:type=FileUploading, app.cuba:type=JmxNodeIdentifier, app.cuba:type=JmxLogControl, app.cuba:type=ClassLoaderManager, app.cuba:type=StatisticsCounter]
2017-03-04 20:54:29.205 INFO  [localhost-startStop-1] com.haulmont.cuba.web.sys.WebAppContextLoader - AppContext initialized
2017-03-04 20:54:29.244 INFO  [localhost-startStop-1] com.haulmont.cuba.web.sys.CubaDispatcherServlet - FrameworkServlet 'dispatcher': initialization started
2017-03-04 20:54:29.248 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.CubaXmlWebApplicationContext - Refreshing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Sat Mar 04 20:54:29 CST 2017]; parent: com.haulmont.cuba.core.sys.CubaClassPathXmlApplicationContext@3898e470
2017-03-04 20:54:29.551 DEBUG [localhost-startStop-1] org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider
2017-03-04 20:54:30.144 INFO  [localhost-startStop-1] com.haulmont.cuba.web.sys.CubaDispatcherServlet - FrameworkServlet 'dispatcher': initialization completed in 900 ms
2017-03-04 20:54:30.145 INFO  [localhost-startStop-1] com.haulmont.restapi.sys.CubaRestApiServlet - FrameworkServlet 'rest_api': initialization started
2017-03-04 20:54:30.146 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.CubaXmlWebApplicationContext - Refreshing WebApplicationContext for namespace 'rest_api-servlet': startup date [Sat Mar 04 20:54:30 CST 2017]; parent: com.haulmont.cuba.core.sys.CubaClassPathXmlApplicationContext@3898e470
2017-03-04 20:54:31.155 INFO  [localhost-startStop-1] com.haulmont.restapi.sys.CubaRestApiServlet - FrameworkServlet 'rest_api': initialization completed in 1010 ms
2017-03-04 20:54:31.254 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.AppComponents - Using app components: [com.haulmont.cuba, com.haulmont.charts, com.haulmont.reports]
2017-03-04 20:54:31.262 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.AppContextLoader - Loading app properties from classpath:cuba-app.properties
2017-03-04 20:54:31.262 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.AppContextLoader - Loading app properties from classpath:net/ezmovil/ezcrm/app.properties
2017-03-04 20:54:31.269 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.AppContextLoader - DbmsType of the main database is set to postgres
2017-03-04 20:54:31.342 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.persistence.PersistenceConfigProcessor - Creating file /home/system76/tomcat/work/app-core/persistence.xml
2017-03-04 20:54:31.361 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.CubaCoreApplicationContext - Refreshing com.haulmont.cuba.core.sys.CubaCoreApplicationContext@4d759589: startup date [Sat Mar 04 20:54:31 CST 2017]; root of context hierarchy
2017-03-04 20:54:34.741 INFO  [localhost-startStop-1] com.haulmont.chile.core.datatypes.Datatypes - Can't find /datatypes.xml, using default datatypes settings
2017-03-04 20:54:36.586 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.CubaThreadPoolTaskScheduler - Initializing ExecutorService  'scheduler'
2017-03-04 20:54:37.014 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.jmx.MBeanExporter - Registering beans for JMX exposure: [app-core.cuba:type=PersistenceManager, app-core.cuba:type=ConfigStorage, app-core.cuba:type=UserSessions, app-core.cuba:type=UniqueNumbers, app-core.cuba:type=Emailer, app-core.cuba:type=EntityLog, app-core.cuba:type=FileStorage, app-core.cuba:type=LockManager, app-core.cuba:type=CachingFacade, app-core.cuba:type=ClusterManager, app-core.cuba:type=ScriptingManager, app-core.cuba:type=ServerInfo, app-core.cuba:type=Scheduling, app-core.cuba:type=ObjectsCacheManager, app-core.cuba:type=PasswordEncryptionSupport, app-core.cuba:type=JmxNodeIdentifier, app-core.cuba:type=JmxLogControl, app-core.cuba:type=ClassLoaderManager, app-core.cuba:type=StatisticsCounter, app-core.cuba:type=BruteForceProtection, app-core.cuba:type=QueryCacheSupport, app-core.cuba:type=IdpSessions]
2017-03-04 20:54:37.206 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.jmx.MBeanExporter - Registering beans for JMX exposure: [app-core.reports:type=CubaOfficeIntegration, app-core.reports:type=ReportImportExport]
2017-03-04 20:54:37.219 DEBUG [localhost-startStop-1] com.haulmont.cuba.security.app.LoginWorkerBean - Initialize anonymous session
2017-03-04 20:54:37.221 INFO  [localhost-startStop-1] com.haulmont.cuba.core.app.ConfigStorage - Loading DB-stored app properties cache
2017-03-04 20:54:37.347 ERROR [localhost-startStop-1] com.haulmont.cuba.core.sys.AppContextLoader - Error initializing application
java.lang.RuntimeException: Error loading DB-stored app properties cache
	at com.haulmont.cuba.core.app.ConfigStorage.loadCache(ConfigStorage.java:135) ~[cuba-core-6.4.1.jar:6.4.1]
	at com.haulmont.cuba.core.app.ConfigStorage.getDbProperty(ConfigStorage.java:106) ~[cuba-core-6.4.1.jar:6.4.1]
	at com.haulmont.cuba.core.sys.ConfigPersisterImpl.getProperty(ConfigPersisterImpl.java:44) ~[cuba-core-6.4.1.jar:6.4.1]
	at com.haulmont.cuba.core.config.ConfigGetter.getProperty(ConfigGetter.java:110) ~[cuba-global-6.4.1.jar:6.4.1]
	at com.haulmont.cuba.core.config.ConfigGetter.getProperty(ConfigGetter.java:95) ~[cuba-global-6.4.1.jar:6.4.1]
	at com.haulmont.cuba.core.config.ConfigGetter.invoke(ConfigGetter.java:67) ~[cuba-global-6.4.1.jar:6.4.1]
	at com.haulmont.cuba.core.config.ConfigHandler.invoke(ConfigHandler.java:79) ~[cuba-global-6.4.1.jar:6.4.1]
	at com.sun.proxy.$Proxy142.getAnonymousLogin(Unknown Source) ~[na:na]
	at com.haulmont.cuba.security.app.LoginWorkerBean.loginAnonymous(LoginWorkerBean.java:209) ~[cuba-core-6.4.1.jar:6.4.1]
	at com.haulmont.cuba.security.app.LoginWorkerBean.initializeAnonymousSession(LoginWorkerBean.java:511) ~[cuba-core-6.4.1.jar:6.4.1]
	at com.haulmont.cuba.security.app.LoginWorkerBean.applicationStarted(LoginWorkerBean.java:521) ~[cuba-core-6.4.1.jar:6.4.1]
	at com.haulmont.cuba.core.sys.AppContext.startContext(AppContext.java:234) ~[cuba-global-6.4.1.jar:6.4.1]
	at com.haulmont.cuba.core.sys.AppContext$Internals.startContext(AppContext.java:289) ~[cuba-global-6.4.1.jar:6.4.1]
	at com.haulmont.cuba.core.sys.AbstractWebAppContextLoader.contextInitialized(AbstractWebAppContextLoader.java:74) ~[cuba-global-6.4.1.jar:6.4.1]
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727) [catalina.jar:8.5.9]
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5189) [catalina.jar:8.5.9]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.5.9]
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752) [catalina.jar:8.5.9]
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728) [catalina.jar:8.5.9]
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) [catalina.jar:8.5.9]
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107) [catalina.jar:8.5.9]
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841) [catalina.jar:8.5.9]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_121]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_121]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
Caused by: java.sql.SQLException: ERROR: relation "sys_config" does not exist
  Position: 25 Query: select NAME, VALUE from SYS_CONFIG Parameters: []
	at com.haulmont.bali.db.QueryRunner.rethrow(QueryRunner.java:463) ~[cuba-global-6.4.1.jar:6.4.1]
	at com.haulmont.bali.db.QueryRunner.query(QueryRunner.java:321) ~[cuba-global-6.4.1.jar:6.4.1]
	at com.haulmont.bali.db.QueryRunner.query(QueryRunner.java:412) ~[cuba-global-6.4.1.jar:6.4.1]
	at com.haulmont.bali.db.QueryRunner.query(QueryRunner.java:387) ~[cuba-global-6.4.1.jar:6.4.1]
	at com.haulmont.bali.db.QueryRunner.query(QueryRunner.java:431) ~[cuba-global-6.4.1.jar:6.4.1]
	at com.haulmont.cuba.core.app.ConfigStorage.loadCache(ConfigStorage.java:123) ~[cuba-core-6.4.1.jar:6.4.1]
	... 26 common frames omitted
2017-03-04 20:54:37.354 ERROR [localhost-startStop-1] com.haulmont.cuba.core.app.ServerInfo - Unable to update SYS_SERVER: {}
java.sql.SQLException: ERROR: relation "sys_server" does not exist
  Position: 8 Query: update SYS_SERVER set UPDATE_TS = ?, IS_RUNNING = ? where NAME = ? Parameters: [2017-03-04 20:54:37.351, false, localhost:8080/app-core]
	at com.haulmont.bali.db.QueryRunner.rethrow(QueryRunner.java:463) ~[cuba-global-6.4.1.jar:6.4.1]
	at com.haulmont.bali.db.QueryRunner.update(QueryRunner.java:551) ~[cuba-global-6.4.1.jar:6.4.1]
	at com.haulmont.bali.db.QueryRunner.update(QueryRunner.java:630) ~[cuba-global-6.4.1.jar:6.4.1]
	at com.haulmont.cuba.core.app.ServerInfo.applicationStopped(ServerInfo.java:154) ~[cuba-core-6.4.1.jar:6.4.1]
	at com.haulmont.cuba.core.sys.AppContext.stopContext(AppContext.java:249) [cuba-global-6.4.1.jar:6.4.1]
	at com.haulmont.cuba.core.sys.AppContext$Internals.stopContext(AppContext.java:296) [cuba-global-6.4.1.jar:6.4.1]
	at com.haulmont.cuba.core.sys.AbstractWebAppContextLoader.contextDestroyed(AbstractWebAppContextLoader.java:84) [cuba-global-6.4.1.jar:6.4.1]
	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4774) [catalina.jar:8.5.9]
	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5411) [catalina.jar:8.5.9]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226) [catalina.jar:8.5.9]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) [catalina.jar:8.5.9]
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752) [catalina.jar:8.5.9]
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728) [catalina.jar:8.5.9]
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) [catalina.jar:8.5.9]
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107) [catalina.jar:8.5.9]
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841) [catalina.jar:8.5.9]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_121]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_121]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
2017-03-04 20:54:37.354 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.CubaCoreApplicationContext - Closing com.haulmont.cuba.core.sys.CubaCoreApplicationContext@4d759589: startup date [Sat Mar 04 20:54:31 CST 2017]; root of context hierarchy
2017-03-04 20:54:37.356 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.CubaThreadPoolTaskScheduler - Shutting down ExecutorService 'scheduler'

Hi,

It seems that your database is empty. Have you created your DB? Could you describe your steps? What database type do you use?

Dear Yriy, thanks, i do the next:


Postgresql 9.5 installed version
$ sudo -i -u postgres
$ psl \l
List of databases
   Name    |  Owner   | Encoding | Collate | Ctype |   Access privileges   
-----------+----------+----------+---------+-------+-----------------------
 ezcrm     | cuba     | LATIN1   | en_US   | en_US | =Tc/cuba             +
           |          |          |         |       | cuba=CTc/cuba
 postgres  | postgres | LATIN1   | en_US   | en_US | 
 template0 | postgres | LATIN1   | en_US   | en_US | =c/postgres          +
           |          |          |         |       | postgres=CTc/postgres
 template1 | postgres | LATIN1   | en_US   | en_US | =c/postgres          +
           |          |          |         |       | postgres=CTc/postgres

ezcrm is my database crated

But i was reading about cuba does not create the database automatically then I create my db ezcrm
About the user/login& password i create too.

I am trying to know an understand if I can run the scripts under …/init/db (.sqls) but area a lot because i need run (create for postgres and my own scritps created via studio)

Let me know some ways to resolve this,
regards.

Is it your development database on local host or test/production database? In case of development you can easily create database from CUBA Studio using Create database action from the menu. If it is your test/production server please read this page: https://doc.cuba-platform.com/manual-6.4/db_update_in_prod_by_server.html

P.S. please use markdown mark up carefully on forum, do not post unformatted content. You can read more about Markdown syntax here https://guides.github.com/features/mastering-markdown/ or in the quick reference under Comment form