Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot start using M1 #9

Open
loranger opened this issue Oct 12, 2022 · 1 comment
Open

Cannot start using M1 #9

loranger opened this issue Oct 12, 2022 · 1 comment

Comments

@loranger
Copy link

Hi,

I struggle with trying to launch icescrum using docker-compose on Mac M1

Here is my setup

.env
APP_PROJECT=icescrum
APP_DOMAIN=icescrum.docker

ICESCRUM_HTTPS_PROXY=false
ICESCRUM_CONTEXT=/

MYSQL_DATABASE=icescrum
MYSQL_ROOT_PASSWORD=mySecretPass
docker-compose.yml
version: '3'

services:

  icescrum:
    image: icescrum/icescrum
    platform: linux/amd64
    env_file:
      - .env
    volumes:
      - ./docs:/root
#    ports:
#      - "8099:8080"
    depends_on:
      - mysql
    labels:
      - "traefik.http.routers.${APP_PROJECT}.rule=Host(`${APP_DOMAIN}`)"
      - "traefik.http.services.${APP_PROJECT}-service.loadbalancer.server.port=8080"

  mysql:
    image: mysql:5.7
    platform: linux/amd64
    volumes:
      - ./database:/var/lib/mysql
    env_file:
      - .env
    command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci

networks:
  default:
      name: web

It starts and thene takes ages (about 5mn) to reach the Spring Security OAuth2 provider steps and then wait another very long time (about 10mn) to timeout and fails with the iceScrum failed to start error.

docker-compose output
❯ docker-compose up
[+] Running 2/0
 ⠿ Container icescrum-mysql-1     Created                                  0.0s
 ⠿ Container icescrum-icescrum-1  Creat...                                 0.0s
Attaching to icescrum-icescrum-1, icescrum-mysql-1
icescrum-mysql-1     | 2022-10-12 10:08:41+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.39-1.el7 started.
icescrum-icescrum-1  | Java version: 1.8.0_222
icescrum-icescrum-1  |
icescrum-icescrum-1  | Starting iceScrum...
icescrum-mysql-1     | 2022-10-12 10:08:42+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
icescrum-mysql-1     | 2022-10-12 10:08:42+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.39-1.el7 started.
icescrum-mysql-1     | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
icescrum-mysql-1     | 2022-10-12T10:08:44.519095Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
icescrum-mysql-1     | 2022-10-12T10:08:44.527177Z 0 [Note] mysqld (mysqld 5.7.39) starting as process 1 ...
icescrum-mysql-1     | 2022-10-12T10:08:44.545261Z 0 [Warning] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
icescrum-mysql-1     | 2022-10-12T10:08:44.570018Z 0 [Note] InnoDB: PUNCH HOLE support available
icescrum-mysql-1     | 2022-10-12T10:08:44.572005Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
icescrum-mysql-1     | 2022-10-12T10:08:44.572112Z 0 [Note] InnoDB: Uses event mutexes
icescrum-mysql-1     | 2022-10-12T10:08:44.572208Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
icescrum-mysql-1     | 2022-10-12T10:08:44.572305Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
icescrum-mysql-1     | 2022-10-12T10:08:44.572382Z 0 [Note] InnoDB: Using Linux native AIO
icescrum-mysql-1     | 2022-10-12T10:08:44.579094Z 0 [Note] InnoDB: Number of pools: 1
icescrum-mysql-1     | 2022-10-12T10:08:44.581190Z 0 [Note] InnoDB: Using CPU crc32 instructions
icescrum-mysql-1     | 2022-10-12T10:08:44.583758Z 0 [ERROR] InnoDB: Linux Native AIO interface is not supported on this platform. Please check your OS documentation and install appropriate binary of InnoDB.
icescrum-mysql-1     | 2022-10-12T10:08:44.583981Z 0 [Note] InnoDB: You can disable Linux Native AIO by setting innodb_use_native_aio = 0 in my.cnf
icescrum-mysql-1     | 2022-10-12T10:08:44.584182Z 0 [Warning] InnoDB: Linux Native AIO disabled.
icescrum-mysql-1     | 2022-10-12T10:08:44.588259Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
icescrum-mysql-1     | 2022-10-12T10:08:44.649407Z 0 [Note] InnoDB: Completed initialization of buffer pool
icescrum-mysql-1     | 2022-10-12T10:08:44.670021Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
icescrum-mysql-1     | 2022-10-12T10:08:44.697973Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
icescrum-mysql-1     | 2022-10-12T10:08:44.794403Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
icescrum-mysql-1     | 2022-10-12T10:08:44.798451Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
icescrum-mysql-1     | 2022-10-12T10:08:44.863572Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
icescrum-mysql-1     | 2022-10-12T10:08:44.872731Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
icescrum-mysql-1     | 2022-10-12T10:08:44.872864Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
icescrum-mysql-1     | 2022-10-12T10:08:44.880883Z 0 [Note] InnoDB: Waiting for purge to start
icescrum-mysql-1     | 2022-10-12T10:08:44.933072Z 0 [Note] InnoDB: 5.7.39 started; log sequence number 12140440
icescrum-mysql-1     | 2022-10-12T10:08:44.936599Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
icescrum-mysql-1     | 2022-10-12T10:08:44.944147Z 0 [Note] Plugin 'FEDERATED' is disabled.
icescrum-mysql-1     | 2022-10-12T10:08:44.973254Z 0 [Note] InnoDB: Buffer pool(s) load completed at 221012 10:08:44
icescrum-mysql-1     | 2022-10-12T10:08:45.003875Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
icescrum-mysql-1     | 2022-10-12T10:08:45.003981Z 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
icescrum-mysql-1     | 2022-10-12T10:08:45.004084Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
icescrum-mysql-1     | 2022-10-12T10:08:45.004106Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
icescrum-mysql-1     | 2022-10-12T10:08:45.023622Z 0 [Warning] CA certificate ca.pem is self signed.
icescrum-mysql-1     | 2022-10-12T10:08:45.025034Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
icescrum-mysql-1     | 2022-10-12T10:08:45.030083Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
icescrum-mysql-1     | 2022-10-12T10:08:45.030873Z 0 [Note] IPv6 is available.
icescrum-mysql-1     | 2022-10-12T10:08:45.031228Z 0 [Note]   - '::' resolves to '::';
icescrum-mysql-1     | 2022-10-12T10:08:45.031570Z 0 [Note] Server socket created on IP: '::'.
icescrum-mysql-1     | 2022-10-12T10:08:45.120956Z 0 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
icescrum-mysql-1     | 2022-10-12T10:08:45.238312Z 0 [Note] Event Scheduler: Loaded 0 events
icescrum-mysql-1     | 2022-10-12T10:08:45.240231Z 0 [Note] mysqld: ready for connections.
icescrum-mysql-1     | Version: '5.7.39'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
icescrum-icescrum-1  | Oct 12, 2022 10:08:52 AM org.apache.coyote.AbstractProtocol init
icescrum-icescrum-1  | INFO: Initializing ProtocolHandler ["http-nio-8080"]
icescrum-icescrum-1  | Oct 12, 2022 10:08:52 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
icescrum-icescrum-1  | INFO: Using a shared selector for servlet write/read
icescrum-icescrum-1  | Oct 12, 2022 10:08:52 AM org.apache.catalina.core.StandardService startInternal
icescrum-icescrum-1  | INFO: Starting service [Tomcat]
icescrum-icescrum-1  | Oct 12, 2022 10:08:52 AM org.apache.catalina.core.StandardEngine startInternal
icescrum-icescrum-1  | INFO: Starting Servlet Engine: Apache Tomcat/8.5.51
icescrum-icescrum-1  | Oct 12, 2022 10:08:54 AM org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
icescrum-icescrum-1  | INFO: No global web.xml found
icescrum-icescrum-1  | Oct 12, 2022 10:09:25 AM org.apache.catalina.core.ApplicationContext log
icescrum-icescrum-1  | INFO: No Spring WebApplicationInitializer types detected on classpath
icescrum-icescrum-1  | Oct 12, 2022 10:09:25 AM org.apache.catalina.core.ApplicationContext log
icescrum-icescrum-1  | INFO: Initializing AtmosphereFramework
icescrum-icescrum-1  | log4j:WARN No appenders could be found for logger (org.atmosphere.cpr.DefaultAsyncSupportResolver).
icescrum-icescrum-1  | log4j:WARN Please initialize the log4j system properly.
icescrum-icescrum-1  | log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
icescrum-icescrum-1  | Oct 12, 2022 10:09:26 AM org.apache.catalina.core.ApplicationContext log
icescrum-icescrum-1  | INFO: AtmosphereFramework : Installed class org.atmosphere.cpr.SessionSupport
icescrum-icescrum-1  | | Server Timezone: UTC
icescrum-icescrum-1  | | Java version: 1.8.0_222
icescrum-icescrum-1  |
icescrum-icescrum-1  | | Tmp directory: /tmp
icescrum-icescrum-1  | --------------------------------------------------------
icescrum-icescrum-1  | Use configuration file from the iceScrum home: /root/.icescrum/config.groovy
icescrum-icescrum-1  | (*) grails.config.locations = [file:/root/.icescrum/config.groovy]
icescrum-icescrum-1  | --------------------------------------------------------
icescrum-icescrum-1  |
icescrum-icescrum-1  | | Log directory: /root/logs/
icescrum-icescrum-1  | Oct 12, 2022 10:09:34 AM org.apache.catalina.core.ApplicationContext log
icescrum-icescrum-1  | INFO: Initializing Spring root WebApplicationContext
icescrum-icescrum-1  | | Server Timezone: UTC
icescrum-icescrum-1  | | Java version: 1.8.0_222
icescrum-icescrum-1  |
icescrum-icescrum-1  | | Tmp directory: /tmp
icescrum-icescrum-1  | --------------------------------------------------------
icescrum-icescrum-1  | Use configuration file from the iceScrum home: /root/.icescrum/config.groovy
icescrum-icescrum-1  | (*) grails.config.locations = [file:/root/.icescrum/config.groovy]
icescrum-icescrum-1  | --------------------------------------------------------
icescrum-icescrum-1  | ...
icescrum-icescrum-1  | Configuring Spring Security Core ...
icescrum-icescrum-1  | ... finished configuring Spring Security Core
icescrum-icescrum-1  |
icescrum-icescrum-1  | Configuring iceScrum...
icescrum-icescrum-1  | ..............................................................................
icescrum-icescrum-1  | Configuring Spring Security ACL ...
icescrum-icescrum-1  | ... finished configuring Spring Security ACL
icescrum-icescrum-1  |
icescrum-icescrum-1  | Configuring Spring Security OAuth2 provider ...
icescrum-icescrum-1  | ... done configuring Spring Security OAuth2 provider
icescrum-icescrum-1  | ...--------------------------------------------------------
icescrum-icescrum-1  | ERROR: iceScrum failed to start. Please read the logs above and icescrum.log in order to find the cause and fix it.
icescrum-icescrum-1  | --------------------------------------------------------
icescrum-icescrum-1  | --------------------------------------------------------
icescrum-icescrum-1  | iceScrum is stopped
icescrum-icescrum-1  | --------------------------------------------------------

I red the logs, but found nothing useful (at least for me)

catalina.out
...
Configuring Spring Security ACL ...
... finished configuring Spring Security ACL

Configuring Spring Security OAuth2 provider ...
... done configuring Spring Security OAuth2 provider
...--------------------------------------------------------
ERROR: iceScrum failed to start. Please read the logs above and icescrum.log in order to find the cause and fix it.
--------------------------------------------------------
--------------------------------------------------------
iceScrum is stopped
--------------------------------------------------------
Exception in thread "Timer-0" java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
	at org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:83)
	at org.codehaus.groovy.grails.web.context.ServletEnvironmentGrailsApplicationDiscoveryStrategy.findApplicationContext(ServletEnvironmentGrailsApplicationDiscoveryStrategy.groovy:46)
	at org.codehaus.groovy.grails.web.context.ServletEnvironmentGrailsApplicationDiscoveryStrategy.findGrailsApplication(ServletEnvironmentGrailsApplicationDiscoveryStrategy.groovy:41)
	at grails.util.Holders.getGrailsApplication(Holders.java:116)
	at sun.reflect.GeneratedMethodAccessor290.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1847)
	at groovy.lang.ExpandoMetaClass.getProperty(ExpandoMetaClass.java:1153)
	at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3737)
	at groovy.lang.ExpandoMetaClass.getProperty(ExpandoMetaClass.java:1165)
	at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.getProperty(ClassMetaClassGetPropertySite.java:51)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296)
	at org.icescrum.core.support.CheckerTimerTask.run(ApplicationSupport.groovy:1084)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
icescrum.log
2022-10-12 10:10:08,667 [localhost-startStop-1] INFO  grails.plugin.hibernate4.HibernatePluginSupport  - Set db generation strategy to 'update' for datasource DEFAULT
2022-10-12 10:10:54,241 [localhost-startStop-1] WARN  net.sf.ehcache.config.ConfigurationFactory  - No configuration found. Configuring ehcache from ehcache-failsafe.xml  found in the classpath: jar:file:/tmp/standalone-war/embedded9056859384365372381-exploded-1665569324586/WEB-INF/lib/ehcache-2.9.0.jar!/ehcache-failsafe.xml
2022-10-12 10:11:45,712 [localhost-startStop-1] INFO  CacheHeadersGrailsPlugin  - Caching enabled in Config: true
2022-10-12 10:11:46,559 [localhost-startStop-1] INFO  net.sf.ehcache.pool.sizeof.filter.AnnotationSizeOfFilter  - Using regular expression provided through VM argument net.sf.ehcache.pool.sizeof.ignore.pattern for IgnoreSizeOf annotation : ^.*cache\..*IgnoreSizeOf$
2022-10-12 10:11:46,574 [localhost-startStop-1] INFO  net.sf.ehcache.pool.sizeof.AgentLoader  - Unavailable or unrecognised attach API : java.lang.ClassNotFoundException: com.sun.tools.attach.VirtualMachine
2022-10-12 10:11:46,623 [localhost-startStop-1] INFO  net.sf.ehcache.pool.sizeof.JvmInformation  - Detected JVM data model settings of: 64-Bit OpenJDK JVM with Compressed OOPs
2022-10-12 10:11:46,623 [localhost-startStop-1] INFO  net.sf.ehcache.pool.impl.DefaultSizeOfEngine  - using Unsafe sizeof engine
2022-10-12 10:11:46,674 [localhost-startStop-1] INFO  net.sf.ehcache.pool.impl.DefaultSizeOfEngine  - using Unsafe sizeof engine
2022-10-12 10:11:51,371 [localhost-startStop-1] INFO  grails.plugin.databasemigration.MigrationRunner  - updateOnStart enabled for 'dataSource'
2022-10-12 10:12:03,233 [localhost-startStop-1] INFO  liquibase  - Reading from DATABASECHANGELOG
2022-10-12 10:12:05,324 [localhost-startStop-1] INFO  grails.plugin.databasemigration.MigrationRunner  - Migrations detected for 'dataSource': [changelog.groovy, changelog-workflow.groovy, changelog-team-communication.groovy]
2022-10-12 10:12:05,345 [localhost-startStop-1] INFO  grails.plugin.databasemigration.MigrationRunner  - Running script 'changelog.groovy'
2022-10-12 10:12:05,377 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:12:15,425 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:12:25,472 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:12:35,502 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:12:45,537 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:12:55,566 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:13:05,593 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:13:15,622 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:13:25,640 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:13:35,674 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:13:45,695 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:13:55,726 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:14:05,749 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:14:15,784 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:14:25,814 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:14:35,843 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:14:45,875 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:14:55,903 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:15:05,932 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:15:15,980 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:15:26,046 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:15:36,060 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:15:46,081 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:15:56,126 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:16:06,167 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:16:16,198 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:16:26,225 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:16:36,253 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:16:46,286 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:16:56,316 [localhost-startStop-1] INFO  liquibase  - Waiting for changelog lock....
2022-10-12 10:17:06,459 [localhost-startStop-1] ERROR org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener  - Error initializing the application: Could not acquire change log lock.  Currently locked by 725dec7d4f29 (172.20.0.9) since 10/11/22 7:16 PM
liquibase.exception.LockException: Could not acquire change log lock.  Currently locked by 725dec7d4f29 (172.20.0.9) since 10/11/22 7:16 PM
	at liquibase.lockservice.LockService.waitForLock(LockService.java:81)
	at liquibase.Liquibase.update(Liquibase.java:102)
	at grails.plugin.databasemigration.MigrationRunner$_runMigrations_closure2.doCall(MigrationRunner.groovy:128)
	at grails.plugin.databasemigration.MigrationRunner.runMigrations(MigrationRunner.groovy:120)
	at grails.plugin.databasemigration.MigrationRunner$_autoRun_closure1.doCall(MigrationRunner.groovy:87)
	at grails.plugin.databasemigration.MigrationUtils.executeInSession(MigrationUtils.groovy:137)
	at grails.plugin.databasemigration.MigrationRunner.autoRun(MigrationRunner.groovy:58)
	at DatabaseMigrationGrailsPlugin$_closure2.doCall(DatabaseMigrationGrailsPlugin.groovy:97)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
2022-10-12 10:17:06,466 [localhost-startStop-1] ERROR org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener  - Error initializing Grails: Could not acquire change log lock.  Currently locked by 725dec7d4f29 (172.20.0.9) since 10/11/22 7:16 PM
liquibase.exception.LockException: Could not acquire change log lock.  Currently locked by 725dec7d4f29 (172.20.0.9) since 10/11/22 7:16 PM
	at liquibase.lockservice.LockService.waitForLock(LockService.java:81)
	at liquibase.Liquibase.update(Liquibase.java:102)
	at grails.plugin.databasemigration.MigrationRunner$_runMigrations_closure2.doCall(MigrationRunner.groovy:128)
	at grails.plugin.databasemigration.MigrationRunner.runMigrations(MigrationRunner.groovy:120)
	at grails.plugin.databasemigration.MigrationRunner$_autoRun_closure1.doCall(MigrationRunner.groovy:87)
	at grails.plugin.databasemigration.MigrationUtils.executeInSession(MigrationUtils.groovy:137)
	at grails.plugin.databasemigration.MigrationRunner.autoRun(MigrationRunner.groovy:58)
	at DatabaseMigrationGrailsPlugin$_closure2.doCall(DatabaseMigrationGrailsPlugin.groovy:97)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
2022-10-12 10:17:06,481 [localhost-startStop-1] ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/icescrum]  - Exception sending context initialized event to listener instance of class [org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener]
org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is liquibase.exception.LockException: Could not acquire change log lock.  Currently locked by 725dec7d4f29 (172.20.0.9) since 10/11/22 7:16 PM
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: liquibase.exception.LockException: Could not acquire change log lock.  Currently locked by 725dec7d4f29 (172.20.0.9) since 10/11/22 7:16 PM
	at liquibase.lockservice.LockService.waitForLock(LockService.java:81)
	at liquibase.Liquibase.update(Liquibase.java:102)
	at grails.plugin.databasemigration.MigrationRunner$_runMigrations_closure2.doCall(MigrationRunner.groovy:128)
	at grails.plugin.databasemigration.MigrationRunner.runMigrations(MigrationRunner.groovy:120)
	at grails.plugin.databasemigration.MigrationRunner$_autoRun_closure1.doCall(MigrationRunner.groovy:87)
	at grails.plugin.databasemigration.MigrationUtils.executeInSession(MigrationUtils.groovy:137)
	at grails.plugin.databasemigration.MigrationRunner.autoRun(MigrationRunner.groovy:58)
	at DatabaseMigrationGrailsPlugin$_closure2.doCall(DatabaseMigrationGrailsPlugin.groovy:97)
	... 4 more
2022-10-12 10:17:06,484 [localhost-startStop-1] ERROR org.apache.catalina.core.StandardContext  - One or more listeners failed to start. Full details will be found in the appropriate container log file
2022-10-12 10:17:06,540 [localhost-startStop-1] ERROR org.apache.catalina.core.StandardContext  - Context [/icescrum] startup failed due to previous errors
2022-10-12 10:17:06,555 [localhost-startStop-1] INFO  org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/icescrum]  - Closing Spring root WebApplicationContext
2022-10-12 10:17:06,570 [localhost-startStop-1] WARN  org.codehaus.groovy.grails.lifecycle.ShutdownOperations  - Error occurred running shutdown operation: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

stacktrace.log
2022-10-12 10:17:06,570 [localhost-startStop-1] ERROR StackTrace  - Full Stack Trace:
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Did I miss something ?

@vbarrier
Copy link
Member

Hello,

I see from the logs that either the database is not up (docker network not correctly set) or the table migration is locked. If you can delete the data folder of the database container it will be the easiest way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants