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

keypass container is taking 5 minutes until start #148

Open
AlvaroVega opened this issue May 10, 2021 · 2 comments
Open

keypass container is taking 5 minutes until start #148

AlvaroVega opened this issue May 10, 2021 · 2 comments

Comments

@AlvaroVega
Copy link
Member

INFO: MySQL endpoint
INFO: KEYPASS_DB_HOST_NAME
INFO: KEYPASS_DB_HOST_PORT <3306>
INFO: KEYPASS_DB_USER
INFO: KEYPASS_DB_PASSWORD
iot-mysql port 3306 open.
Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
time=2021-05-10T09:39:23.010Z | lvl=INFO | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Waiting for changelog lock....
time=2021-05-10T09:39:33.024Z | lvl=INFO | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Waiting for changelog lock....

...
time=2021-05-10T09:43:53.351Z | lvl=INFO | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Waiting for changelog lock....
time=2021-05-10T09:44:03.356Z | lvl=INFO | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Waiting for changelog lock....
time=2021-05-10T09:44:13.361Z | lvl=INFO | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Waiting for changelog lock....
Exception in thread "main" liquibase.exception.LockException: Could not acquire change log lock. Currently locked by iot-keypass (172.17.0.7) since 3/11/21 7:39 AM
at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:168)
at liquibase.Liquibase.update(Liquibase.java:189)
at liquibase.Liquibase.update(Liquibase.java:181)
at io.dropwizard.migrations.DbMigrateCommand.run(DbMigrateCommand.java:57)
at io.dropwizard.migrations.DbCommand.run(DbCommand.java:52)
at io.dropwizard.migrations.AbstractLiquibaseCommand.run(AbstractLiquibaseCommand.java:63)
at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:76)
at io.dropwizard.cli.Cli.run(Cli.java:70)
at io.dropwizard.Application.run(Application.java:72)
at es.tid.fiware.iot.ac.AcService.main(AcService.java:59)
Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

@AlvaroVega
Copy link
Member Author

@cesarjorgemartinez
Copy link
Contributor

I detected this issue on one environment:
Keypass version: 1.8.0

And find the following workaround:

  • Enter inside MySQL database keypass.
  • Launch select to check the problem:
mysql> select * from DATABASECHANGELOGLOCK;
+----+--------+---------------------+----------------------------------------------+
| ID | LOCKED | LOCKGRANTED         | LOCKEDBY                                     |
+----+--------+---------------------+----------------------------------------------+
|  1 | �      | 2020-11-12 11:58:55 | iot-keypass (fe80:0:0:0:42:acff:fe11:3%eth0) |
+----+--------+---------------------+----------------------------------------------+
1 row in set (0,03 sec)
  • Truncate the table:
truncate table DATABASECHANGELOGLOCK;
  • Restart the keypass component.
  • Check logs and final state of this table:
mysql> select * from DATABASECHANGELOGLOCK;
+----+--------+-------------+----------+
| ID | LOCKED | LOCKGRANTED | LOCKEDBY |
+----+--------+-------------+----------+
|  1 |        | NULL        | NULL     |
+----+--------+-------------+----------+
1 row in set (0,03 sec)

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