-->

Thursday, February 27, 2020

[Solved] com/okta/tools/WithOkta : Unsupported major.minor version

Error

 Exception in thread "main" java.lang.UnsupportedClassVersionError: com/okta/tools/WithOkta : Unsupported major.minor version 52.0  
      at java.lang.ClassLoader.defineClass1(Native Method)  
      at java.lang.ClassLoader.defineClass(ClassLoader.java:808)  
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)  
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:442)  
      at java.net.URLClassLoader.access$100(URLClassLoader.java:64)  
      at java.net.URLClassLoader$1.run(URLClassLoader.java:354)  
      at java.net.URLClassLoader$1.run(URLClassLoader.java:348)  
      at java.security.AccessController.doPrivileged(Native Method)  
      at java.net.URLClassLoader.findClass(URLClassLoader.java:347)  
      at java.lang.ClassLoader.loadClass(ClassLoader.java:430)  
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:323)  
      at java.lang.ClassLoader.loadClass(ClassLoader.java:363)  
      at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)  

Cause/solution:-

Main reason for this error is older version of the Java JDK being used. Like in mine case it was

 java -version  
 java version "1.7.0_191"  
 OpenJDK Runtime Environment (amzn-2.6.15.4.82.amzn1-x86_64 u191-b01)  
 OpenJDK 64-Bit Server VM (build 24.191-b01, mixed mode)  

But the application requires atleast JDK Version 1.8 .

So to resolve the issue consider upgrading the JDK to version 1.8 instead.

Wednesday, February 26, 2020

Learnings Shared in Kubernetes Conference in Delhi 2020

1. Kubernetes implementation on cloud and on-premise are very different.

2. Enough linux internals for a solid understanding of how to operate kubernetes in production environment.

3. Install and operate kubernetes using only community tools.

4. Deploy community kubernetes cluster on manually VMs from scratch.

5. Design and implement CI/CD piepelines for independent deployments.

6. Figure out governance strategies to independently develop, configure and operate each microservice in a kubernetes cluster.

7. Configure istio  in a flexible manner to govern east-west traffic.

8. Run all K8s processes as Docker containers rather than binaries.

9. In the absence of open internet, start with docker registry first and populate all necessary images.

10. Use kubespray to setup RHEL VMs
--> Use Ansible playbooks for opinionated provisioning
--> Sets up Calcio overlay networking

Tuesday, February 18, 2020

[Solved] Difference between the Variable vs Global variable in Amazon RDS

Recently faced the issue after making changes in the RDS Parameters and querying the same within the mysql rds in the Amazon AWS.

 mysql> SHOW VARIABLES WHERE Variable_name LIKE 'character_set_%' OR Variable_name LIKE 'collation%';  
 +--------------------------+-------------------------------------------+  
 | Variable_name      | Value                   |  
 +--------------------------+-------------------------------------------+  
 | character_set_client   | utf8                   |  
 | character_set_connection | utf8                   |  
 | character_set_database  | utf8mb4                  |  
 | character_set_filesystem | binary                  |  
 | character_set_results  | utf8                   |  
 | character_set_server   | utf8mb4                  |  
 | character_set_system   | utf8                   |  
 | character_sets_dir    | /rdsdbbin/mysql-5.7.22.R5/share/charsets/ |  
 | collation_connection   | utf8_general_ci              |  
 | collation_database    | utf8mb4_unicode_ci            |  
 | collation_server     | utf8mb4_unicode_ci            |  
 +--------------------------+-------------------------------------------+  
 11 rows in set (0.01 sec)  
 mysql> SHOW GLOBAL VARIABLES WHERE Variable_name LIKE 'character_set_%' OR Variable_name LIKE 'collation%';  
 +--------------------------+-------------------------------------------+  
 | Variable_name      | Value                   |  
 +--------------------------+-------------------------------------------+  
 | character_set_client   | utf8mb4                  |  
 | character_set_connection | utf8mb4                  |  
 | character_set_database  | utf8mb4                  |  
 | character_set_filesystem | binary                  |  
 | character_set_results  | utf8mb4                  |  
 | character_set_server   | utf8mb4                  |  
 | character_set_system   | utf8                   |  
 | character_sets_dir    | /rdsdbbin/mysql-5.7.22.R5/share/charsets/ |  
 | collation_connection   | utf8mb4_unicode_ci            |  
 | collation_database    | utf8mb4_unicode_ci            |  
 | collation_server     | utf8mb4_unicode_ci            |  
 +--------------------------+-------------------------------------------+  
 11 rows in set (0.00 sec)  

Cause:-
session variables are getting overridden is because the client auto detects which character set to use based on the operating system setting. 

Reproduce:-
for reproducing the case two different MySQL clients running on separate servers. One was installed on an Ubuntu subsystem running on my local machine and the other was installed on a Ubuntu Linux server running on an EC2 instance. MySQL client running on my local machine the variables were not overridden. However, on the Ubuntu Linux server running on EC2 the session variables got overridden. 

Workaround/Resolution:-
setting the 'skip-character-set-client-handshake' parameter to 1 using you custom parameter group. This will ignore the character set information detected by the client and therefore set the session character set variable to be the same value as your global variables