What are different log levels for a Kubernetes-pod? and what are it roles? - kubernetes

there are log levels for kubernetes pod like WARNING, CRITICAL,ERROR , TRACE, DEBUG can some one list all log levels in kubernetes and their functions
like ERROR for error messages
link for Kubernetes pod logs doc
# kubectl logs carts-78f46c5569-cv5wq -n sock-shop
OpenJDK 64-Bit Server VM warning: ignoring option PermSize=32m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=64m; support was removed in 8.0
2020-07-16 12:58:54.877 INFO [bootstrap,,,] 6 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext#51521cc1: startup date [Thu Jul 16 12:58:54 GMT 2020]; root of context hierarchy
2020-07-16 12:58:55.867 INFO [bootstrap,,,] 6 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [class org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$b894f39] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

Related

Getting exception when running Okta Spring Security & Okta-Hosted Login Page example

I followed the steps in this sample code: https://github.com/okta/samples-java-spring/tree/master/okta-hosted-login
When I run the example using the command:
mvn -Dokta.oauth2.issuer=https://{yourOktaDomain}/oauth2/default \ -Dokta.oauth2.clientId={clientId} \ -Dokta.oauth2.clientSecret={clientSecret}
I get the following exception:
`2023-02-06 11:08:41.717 INFO 17288 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2023-02-06 11:08:41.725 INFO 17288 --- [ main] c.o.s.e.CodeFlowExampleApplication : Started CodeFlowExampleApplication in 2.881 seconds (JVM running for 5.358)
2023-02-06 11:08:53.299 INFO 17288 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2023-02-06 11:08:53.299 INFO 17288 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2023-02-06 11:08:53.301 INFO 17288 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 0 ms
2023-02-06 11:08:53.558 ERROR 17288 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler processing failed; nested exception is java.lang.NoSuchMethodError: org.thymeleaf.context.IWebContext.getExchange()Lorg/thymeleaf/web/IWebExchange;] with root cause
java.lang.NoSuchMethodError: org.thymeleaf.context.IWebContext.getExchange()Lorg/thymeleaf/web/IWebExchange;
at org.thymeleaf.extras.springsecurity5.util.Spring5VersionSpecificUtility.isWebMvcContext(Spring5VersionSpecificUtility.java:80) ~[thymeleaf-extras-springsecurity5-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.thymeleaf.extras.springsecurity5.util.SpringVersionSpecificUtils.isWebMvcContext(SpringVersionSpecificUtils.java:118) ~[thymeleaf-extras-springsecurity5-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.thymeleaf.extras.springsecurity5.util.SpringSecurityContextUtils.getAuthenticationObject(SpringSecurityContextUtils.java:127) ~[thymeleaf-extras-springsecurity5-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.thymeleaf.extras.springsecurity5.auth.AuthUtils.getAuthenticationObject(AuthUtils.java:102) ~[thymeleaf-extras-springsecurity5-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.thymeleaf.extras.springsecurity5.dialect.expression.SpringSecurityExpressionObjectFactory.buildObject(SpringSecurityExpressionObjectFactory.java:91) ~[thymeleaf-extras-springsecurity5-3.1.1.RELEASE.jar:3.1.1.RELEASE]
...`
I also tried running this sample from my Intellij IDEA IDE and when I open it I get the following error:
'parent.relativePath' of POM com.example.okta:okta-spring-boot-oauth-code-flow-example:0.0.1-SNAPSHOT (C:\Users\fteran\repos\demos\okta-github\samples-java-spring\okta-hosted-login\pom.xml) points at com.okta.examples:aggregator instead of org.springframework.boot:spring-boot-starter-parent, please verify your project structure
I was kind of expecting the sample code to work if I was very careful to follow the instructions, which I think I did, at this point I am not sure if this is an issue on my local or if there is an issue with the sample code itself.
Try this example: https://github.com/okta-samples/okta-spring-boot-sample/
It's more up-to-date.

Failing to start up HazelCast on AWS ECS

I'm trying to start up Hazelcast on AWS ECS. I have gone through the tutorial and have enabled all the permissions on the task role i.e decribeTasks, lisTasks etc. I have have a very simple configuration file
hazelcast:
cluster-name: hs-dcom-hazelcast
network:
join:
multicast:
enabled: false
aws:
enabled: true
interfaces:
enabled: true
interfaces:
- 10.106.*.*
However when the container tries to start it throws the following error
2023-01-23T14:47:16.975Z INFO 835 --- [ main] com.hazelcast.instance.impl.Node : [10.106.139.69]:5701 [hs-dcom-hazelcast] [5.0-BETA-1] Shutting down node engine...
7467 2023-01-23T14:47:17.004Z INFO 835 --- [ main] c.hazelcast.instance.impl.NodeExtension : [10.106.139.69]:5701 [hs-dcom-hazelcast] [5.0-BETA-1] Destroying node NodeExtension.
7468 2023-01-23T14:47:17.004Z INFO 835 --- [ main] com.hazelcast.instance.impl.Node : [10.106.139.69]:5701 [hs-dcom-hazelcast] [5.0-BETA-1] Hazelcast Shutdown is completed in 35 ms.
! 7469 2023-01-23T14:47:17.006Z WARN 835 --- [ main] o.s.w.c.s.GenericWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hazelcastInstance' defined in class path resource [org/springframework/boot/autoconfigure/hazelcast/HazelcastServerConfiguration$HazelcastServerConfigFileConfiguration.class]: Failed to instantiate [com.hazelcast.core.HazelcastInstance]: Factory method 'hazelcastInstance' threw exception with message: Failure executing: POST at: https://ecs.eu-west-1.amazonaws.com. Message: {"__type":"InvalidParameterException","message":"Identifier is for 570169269855. Your accountId is 531465454359"}. HTTP Error Code: 400
7470 2023-01-23T14:47:17.021Z INFO 835 --- [ main] .s.b.a.l.ConditionEvaluationReportLogger :
7471
7472 Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
7473 2023-01-23T14:47:17.052Z ERROR 835 --- [ main] o.s.boot.SpringApplication : Application run failed
7474
7475 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hazelcastInstance' defined in class path resource [org/springframework/boot/autoconfigure/hazelcast/HazelcastServerConfiguration$HazelcastServerConfigFileConfiguration.class]: Failed to instantiate [com.hazelcast.core.HazelcastInstance]: Factory method 'hazelcastInstance' threw exception with message: Failure executing: POST at: https://ecs.eu-west-1.amazonaws.com. Message: {"__type":"InvalidParameterException","message":"Identifier is for 570169269855. Your accountId is 531465454359"}. HTTP Error Code: 400
7476 at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:657) ~[spring-beans-6.0.3.jar:6.0.3]
7477 at
I have tried looking on the forum, however can't seem to find anyone that has had this issue before.

Error while initializing actor system wavesplatform com.protonail.leveldb.jna.LevelDBException

I want to fork the waves blockchain in which I wanted to change the coin. I first change the name of coin in waves node
link : https://github.com/wavesplatform/Waves/blob/version-1.2.x/node/src/main/scala/com/wavesplatform/transaction/assets/exchange/AssetPair.scala
according to the link I deployed on windows and I got this error.
ERROR: 18:28:45,568 ERROR [main] c.w.actor.RootActorSystem$ - Error while initializing actor system wavesplatform com.protonail.leveldb.jna.LevelDBException: IO error: /root/.local/share/waves-testnet/data: Invalid argument
(note : full error is given below)
software details:
openjdk11
ubuntu 18.04LTS
I am deploying in windows through ubuntu 18.04LTS by following steps for installing in windows and installing deb file.
link for installing: https://docs.waves.tech/en/waves-node/how-to-install-a-node/on-windows
command: java -jar node/target/waves-all-1.2.15-DIRTY.jar node/target/classes/application.conf
I got error while initializing it with wavesplatform.
root#WJLP-1220:/mnt/c/Users/swatim/Desktop/wavesProject/Waves/node/target# java -jar waves-all-1.2.15-DIRTY.jar classes/application.conf
2021-01-04 18:28:44,524 INFO [main] c.w.Application$ - Starting...
2021-01-04 18:28:45,082 INFO [ctor.default-dispatcher-4] a.event.slf4j.Slf4jLogger - Slf4jLogger started 2021-01-04 18:28:45,193 INFO [main] c.w.Application$ - Waves v1.2.15-DIRTY Blockchain Id: T
2021-01-04 18:28:45,271 INFO [main] c.w.d.LevelDBFactory$ - Loaded com.wavesplatform.database.jna.LevelDBJNADBFactory with com.wavesplatform.database.jna.LevelDBJNADBFactory#72ba28ee
2021-01-04 18:28:45,568 ERROR [main] c.w.actor.RootActorSystem$ - Error while initializing actor system wavesplatform com.protonail.leveldb.jna.LevelDBException: IO error: /root/.local/share/waves-testnet/data: Invalid argument
at com.protonail.leveldb.jna.LevelDBNative.checkError(LevelDBNative.java:295)
at com.protonail.leveldb.jna.LevelDB.(LevelDB.java:16) at com.wavesplatform.database.jna.LevelDBJNADBFactory.openJnaDatabase(LevelDBJNADBFactory.scala:11)
at com.wavesplatform.database.jna.LevelDBJNADBFactory.open(LevelDBJNADBFactory.scala:15)
at com.wavesplatform.database.package$.openDB(package.scala:51)
at com.wavesplatform.Application.(Application.scala:69)
at com.wavesplatform.Application$.$anonfun$startNode$4(Application.scala:558)
at com.wavesplatform.Application$.$anonfun$startNode$4$adapted(Application.scala:555)
at com.wavesplatform.actor.RootActorSystem$.start(RootActorSystem.scala:25)
at com.wavesplatform.Application$.startNode(Application.scala:555)
at com.wavesplatform.Application$.main(Application.scala:524)
at com.wavesplatform.Application.main(Application.scala)

Mongobee stuck several minutes before to quit

I'm currently using mongobee to update a mongoDB database.
An update can take up to a few minutes however it seems that the real behaviour of mongobee itself only lasts for a few seconds and after that the java process stay stuck for a few minutes before to shut.
2020-10-13 17:32:53.791 INFO 1 --- [mongo] o.m.d.cluster : Setting max set version to 4 from replica set primary XXXXXXXXX
2020-10-13 17:32:53.791 INFO 1 --- [mongo] o.m.d.cluster : Discovered replica set primary XXXXXXXXX
2020-10-13 17:32:54.889 INFO 1 --- [imer-1-thread-1] o.m.d.connection : Opened connection [connectionId{localValue:1, serverValue:18352}] to XXXXXXXXX
2020-10-13 17:32:55.191 INFO 1 --- [ main] c.g.m.Mongobee : Mongobee acquired process lock, starting the data migration sequence..
2020-10-13 17:32:55.508 INFO 1 --- [ main] o.r.Reflections : Reflections took 200 ms to scan 1 urls, producing 1 keys and 1 values
2020-10-13 17:32:55.691 INFO 1 --- [ main] c.g.m.Mongobee : Mongobee is releasing process lock.
2020-10-13 17:32:55.698 INFO 1 --- [ main] c.g.m.Mongobee : Mongobee has finished his job.
2020-10-13T17:35:37,089 TECHNICAL INFO myapplication {o.s.b.StartupInfoLogger} Started MyApplication in 28.81 seconds (JVM running for 36.744)
After that, the java process still works for a few minutes before to end without any further log.
According to the log, Mongobee has finished his job at 17:35:37, so I don't understand why I'm stuck for maybe 5 minutes before it stops.
Is it an expected behaviour ? Does springboot/mongobee have a parameter like maybe a "session idle time" to be respected before to leave the connexion ?

Embedded-Debezium spring boot postgreSQL DB connectivity issue

I tried connecting postgreSQL with spring boot and embedded debezium, the DB connection is getting established, after the table is locked i get access denied. I am logging in with replication access. Kindly find the below logs.
2020-09-15 20:27:00.806 INFO 14784 --- [pool-3-thread-1] i.d.c.postgresql.PostgresConnectorTask : user 'loginUser' connected to database 'pgDatabase' on PostgreSQL 12.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39), 64-bit with roles:
role 'loginUser' [superuser: false, replication: true, inherit: true, create role: false, create db: false, can log in: true]
2020-09-15 20:27:00.813 INFO 14784 --- [pool-3-thread-1] i.d.c.p.connection.PostgresConnection : Obtained valid replication slot ReplicationSlot [active=false, latestFlushedLsn=null, catalogXmin=null]
2020-09-15 20:27:00.813 INFO 14784 --- [pool-3-thread-1] i.d.c.postgresql.PostgresConnectorTask : Found previous offset PostgresOffsetContext [sourceInfoSchema=Schema{io.debezium.connector.postgresql.Source:STRUCT}, sourceInfo=source_info[server='pgServer.com-pgDatabase'db='pgDatabase', lsn=LSN{2/61010900}, txId=14082, timestamp=2020-09-10T01:04:03.660Z, snapshot=FALSE], partition={server=pgServer.com-pgDatabase}, lastSnapshotRecord=true, lastCompletelyProcessedLsn=null, lastCommitLsn=null, transactionContext=TransactionContext [currentTransactionId=null, perTableEventCount={}, totalEventCount=0]]
2020-09-15 20:27:00.814 INFO 14784 --- [pool-3-thread-1] i.d.c.p.snapshot.InitialSnapshotter : Previous snapshot has completed successfully, streaming logical changes from last known position
2020-09-15 20:27:00.871 DEBUG 14784 --- [ main] .m.m.a.ExceptionHandlerExceptionResolver : ControllerAdvice beans: 0 #ExceptionHandler, 1 ResponseBodyAdvice
2020-09-15 20:27:08.185 INFO 14784 --- [pool-3-thread-1] i.d.c.p.c.PostgresReplicationConnection : Initializing PgOutput logical decoder publication
2020-09-15 20:27:08.243 INFO 14784 --- [pool-3-thread-1] i.d.c.p.c.PostgresReplicationConnection : Creating new publication 'dbz_publication' for plugin 'PGOUTPUT'
2020-09-15 20:27:08.246 INFO 14784 --- [pool-3-thread-1] i.d.c.p.c.PostgresReplicationConnection : Creating Publication with statement 'CREATE PUBLICATION dbz_publication FOR ALL TABLES;'
2020-09-15 20:27:08.765 INFO 14784 --- [pool-3-thread-1] o.a.k.c.storage.FileOffsetBackingStore : Stopped FileOffsetBackingStore
2020-09-15 20:27:09.059 ERROR 14784 --- [pool-3-thread-1] io.debezium.embedded.EmbeddedEngine : Unable to initialize and start connector's task class 'io.debezium.connector.postgresql.PostgresConnectorTask' with config: {connector.class=io.debezium.connector.postgresql.PostgresConnector, database.user=loginUser, database.dbname=pgDatabase, offset.storage=org.apache.kafka.connect.storage.FileOffsetBackingStore, database.server.name=pgServer.com-pgDatabase, database.port=5432, plugin.name=pgoutput, table.whitelist=schema.tableName, offset.flush.interval.ms=10000, offset.storage.file.filename=/Users/loginUser/student-offset.dat, database.hostname=pgServer.com, database.password=********, name=student-postgres-connector}
io.debezium.jdbc.JdbcConnectionException: ERROR: permission denied for database pgDatabase
Please check permissions of your role loginUser:
Setting up a PostgreSQL server to run a Debezium connector requires a database user who can perform replications. Replication can be performed only by a database user who has appropriate permissions and only for a configured number of hosts.
From my experience one needs (with pgoutput plugin starting from v10.x):
Enable logical replication on DB instance;
User belonging to REPLICATION (or rds_replication for AWS RDS - server-less options seems to be broken for years) role;
Be owner (the user connecting to DB) of all white-listed tables;
Have USE, SELECT on all white-listed tables and sequences;
Have access for USE, SELECT on "public" schema (meta data);
Have permissions to create objects on "public" schema.
Note: the requirement to have rds_admin is not a requirement but simple way to get started if the list above is overhwhelming.