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

[WIP] add sql check #172

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

[WIP] add sql check #172

wants to merge 2 commits into from

Conversation

AlvaroVega
Copy link
Member

@AlvaroVega AlvaroVega commented Dec 15, 2021

possible fix for:
#148

@AlvaroVega
Copy link
Member Author

But log with stack trace still appears at keypass startup:

INFO: keypass entrypoint start
INFO: LOG LEVEL
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.
time=2021-12-15T10:16:22.809Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Connected to keypass@172.17.0.5@jdbc:mysql://iot-mysql/keypass?autoReconnect=true&autoReconnectForPools=true&failOverReadOnly=false&maxReconnects=20&useSSL=false&serverTimezone=UTC
time=2021-12-15T10:16:22.900Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Setting auto commit to false from true
time=2021-12-15T10:16:24.021Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Executing QUERY database command: select count(*) from keypass.DATABASECHANGELOGLOCK
time=2021-12-15T10:16:24.036Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Executing QUERY database command: SELECT LOCKED FROM keypass.DATABASECHANGELOGLOCK WHERE ID=1
time=2021-12-15T10:16:24.038Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Lock Database
time=2021-12-15T10:16:24.169Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Executing UPDATE database command: UPDATE keypass.DATABASECHANGELOGLOCK SET LOCKED = 1, LOCKEDBY = 'iot-keypass (172.17.0.5)', LOCKGRANTED = '2021-12-15 10:16:24.047' WHERE ID = 1 AND LOCKED = 0
time=2021-12-15T10:16:24.339Z | lvl=INFO | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Successfully acquired change log lock
time=2021-12-15T10:16:26.999Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Executing QUERY database command: SELECT MD5SUM FROM keypass.DATABASECHANGELOG WHERE MD5SUM IS NOT NULL
time=2021-12-15T10:16:27.013Z | lvl=INFO | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Reading from keypass.DATABASECHANGELOG
time=2021-12-15T10:16:27.013Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Executing QUERY database command: SELECT FILENAME,AUTHOR,ID,MD5SUM,DATEEXECUTED,ORDEREXECUTED,TAG,EXECTYPE,DESCRIPTION,COMMENTS FROM keypass.DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
time=2021-12-15T10:16:27.030Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Release Database Lock
time=2021-12-15T10:16:27.031Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Executing UPDATE database command: UPDATE keypass.DATABASECHANGELOGLOCK SET LOCKED = 0, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1
time=2021-12-15T10:16:27.415Z | lvl=INFO | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=liquibase | msg=Successfully released change log lock
Exception in thread "main" java.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String
at liquibase.changelog.StandardChangeLogHistoryService.getRanChangeSets(StandardChangeLogHistoryService.java:214)
at liquibase.changelog.AbstractChangeLogHistoryService.upgradeChecksums(AbstractChangeLogHistoryService.java:68)
at liquibase.changelog.StandardChangeLogHistoryService.upgradeChecksums(StandardChangeLogHistoryService.java:180)
at liquibase.Liquibase.checkLiquibaseTables(Liquibase.java:727)
at liquibase.Liquibase.update(Liquibase.java:196)
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)
time=2021-12-15T10:16:30.864Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=CacheManager | msg=Creating new CacheManager with Configuration Object
time=2021-12-15T10:16:30.866Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=PropertyUtil | msg=propertiesString is null.
time=2021-12-15T10:16:30.879Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=ConfigurationHelper | msg=No CacheManagerEventListenerFactory class specified. Skipping...
time=2021-12-15T10:16:30.952Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=Cache | msg=No BootstrapCacheLoaderFactory class specified. Skipping...
time=2021-12-15T10:16:30.952Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=Cache | msg=CacheWriter factory not configured. Skipping...
time=2021-12-15T10:16:30.952Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=ConfigurationHelper | msg=No CacheExceptionHandlerFactory class specified. Skipping...
time=2021-12-15T10:16:31.028Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=StandardAttributeFactory | msg=Initializing standard datatypes
time=2021-12-15T10:16:31.060Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=StandardFunctionFactory | msg=Initializing standard Target functions
time=2021-12-15T10:16:31.092Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=StandardFunctionFactory | msg=Initializing standard Condition functions
time=2021-12-15T10:16:31.119Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=StandardFunctionFactory | msg=Initializing standard General functions
time=2021-12-15T10:16:31.207Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=StandardCombiningAlgFactory | msg=Initializing standard combining algorithms
time=2021-12-15T10:16:31.298Z | lvl=INFO | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=ServerFactory | msg=Starting AcService


| |/ / | __ \
| ' / ___ _ | |__) | _ ___ ___
| < / _ \ | | | / ` / __/ __|
| . \ __/ |
| | | | (
| _
_

||____|_, || _,|//
/ |
|
/

v1.9.0

time=2021-12-15T10:16:31.909Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=DropwizardResourceConfig | msg=resources = [es.tid.fiware.iot.ac.pap.TenantEndpoint, es.tid.fiware.iot.ac.pap.SubjectEndpoint, es.tid.fiware.iot.ac.pap.PoliciesEndpoint, es.tid.fiware.iot.ac.pdp.PdpEndpoint, es.tid.fiware.iot.ac.util.LogsEndpoint, es.tid.fiware.iot.ac.util.VersionEndpoint]
time=2021-12-15T10:16:31.909Z | lvl=DEBUG | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=DropwizardResourceConfig | msg=providers = [io.dropwizard.jersey.caching.CacheControlledResourceMethodDispatchAdapter, io.dropwizard.jersey.guava.OptionalResourceMethodDispatchAdapter, io.dropwizard.jersey.guava.OptionalQueryParamInjectableProvider, io.dropwizard.jersey.validation.ConstraintViolationExceptionMapper, io.dropwizard.jersey.jackson.JsonProcessingExceptionMapper, com.codahale.metrics.jersey.InstrumentedResourceMethodDispatchAdapter, io.dropwizard.errors.EarlyEofExceptionMapper, io.dropwizard.hibernate.UnitOfWorkResourceMethodDispatchAdapter]
time=2021-12-15T10:16:31.949Z | lvl=INFO | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=DropwizardResourceConfig | msg=The following paths were found for the configured resources:

DELETE  /pap/v1 (es.tid.fiware.iot.ac.pap.TenantEndpoint)
DELETE  /pap/v1/subject/{subject} (es.tid.fiware.iot.ac.pap.SubjectEndpoint)
GET     /pap/v1/subject/{subject} (es.tid.fiware.iot.ac.pap.SubjectEndpoint)
POST    /pap/v1/subject/{subject} (es.tid.fiware.iot.ac.pap.SubjectEndpoint)
DELETE  /pap/v1/subject/{subject}/policy/{policyId} (es.tid.fiware.iot.ac.pap.PoliciesEndpoint)
GET     /pap/v1/subject/{subject}/policy/{policyId} (es.tid.fiware.iot.ac.pap.PoliciesEndpoint)
PUT     /pap/v1/subject/{subject}/policy/{policyId} (es.tid.fiware.iot.ac.pap.PoliciesEndpoint)
POST    /pdp/v3 (es.tid.fiware.iot.ac.pdp.PdpEndpoint)
GET     /admin/log (es.tid.fiware.iot.ac.util.LogsEndpoint)
PUT     /admin/log (es.tid.fiware.iot.ac.util.LogsEndpoint)
GET     /version (es.tid.fiware.iot.ac.util.VersionEndpoint)

time=2021-12-15T10:16:32.360Z | lvl=INFO | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=ServerConnector | msg=Started application@6c15e8c7{HTTP/1.1}{0.0.0.0:7070}
time=2021-12-15T10:16:32.361Z | lvl=INFO | corr= | trans=n/a | srv= | subsrv=n/a | comp=KEYPASS | op=ServerConnector | msg=Started admin@56380231{HTTP/1.1}{0.0.0.0:7071}
time=2021-12-15T10:17:08.700Z | lvl=DEBUG | corr=8293ed09-8051-4d0e-8be4-451ea8e773a8 | trans=n/a | srv=healthcheck | subsrv=n/a | comp=KEYPASS | op=CorrelatorProvider | msg=correlator not found

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

Successfully merging this pull request may close these issues.

1 participant