Kubernetes Gateway Pod won't start due to License Not in GZIP format
search cancel

Kubernetes Gateway Pod won't start due to License Not in GZIP format

book

Article ID: 227128

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

When creating the CA API Gateway pod on kubernetes we get an error regarding the license:

2021-10-25T19:37:57.564+0000 WARNING 64     com.l7tech.server.audit.AuditArchiver: 2205: Audit Archiver error: Cancelling Audit Archiver timer.
2021-10-25T19:37:57.566+0000 INFO    64     com.l7tech.server.audit.AuditArchiver: Below start_archive threshold, not starting archiver thread.
2021-10-25T19:37:57.594+0000 INFO    1      com.l7tech.server.licensing.BootstrapLicenseService: Installing license from SSG_LICENSE environment variable
2021-10-25T19:37:57.595+0000 WARNING 1      com.l7tech.server.boot.GatewayMain: Error starting server : Lifecycle error: Fail to install license: Not in GZIP format
com.l7tech.server.LifecycleException: Lifecycle error: Fail to install license: Not in GZIP format
        at com.l7tech.server.BootProcess.start(Unknown Source)
        at com.l7tech.server.boot.GatewayBoot.f(Unknown Source)
        at com.l7tech.server.boot.GatewayBoot.start(Unknown Source)
        at com.l7tech.server.boot.GatewayBoot.runUntilShutdown(Unknown Source)
        at com.l7tech.server.boot.GatewayMain.main(Unknown Source)
Caused by: java.lang.IllegalStateException: Fail to install license: Not in GZIP format
        at com.l7tech.server.licensing.BootstrapLicenseService.a(Unknown Source)
        at com.l7tech.server.licensing.BootstrapLicenseService.onApplicationEvent(Unknown Source)
        at com.l7tech.server.util.q.onApplicationEvent(Unknown Source)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378)
        at com.l7tech.server.BootProcess.a(Unknown Source)
        ... 5 more
Caused by: java.util.zip.ZipException: Not in GZIP format
        at java.base/java.util.zip.GZIPInputStream.readHeader(Unknown Source)
        at java.base/java.util.zip.GZIPInputStream.<init>(Unknown Source)
        at java.base/java.util.zip.GZIPInputStream.<init>(Unknown Source)
        ... 14 more
com.l7tech.server.LifecycleException: Lifecycle error: Fail to install license: Not in GZIP format
        at com.l7tech.server.BootProcess.start(Unknown Source)
        at com.l7tech.server.boot.GatewayBoot.f(Unknown Source)
        at com.l7tech.server.boot.GatewayBoot.start(Unknown Source)
        at com.l7tech.server.boot.GatewayBoot.runUntilShutdown(Unknown Source)
        at com.l7tech.server.boot.GatewayMain.main(Unknown Source)
Caused by: java.lang.IllegalStateException: Fail to install license: Not in GZIP format
        at com.l7tech.server.licensing.BootstrapLicenseService.a(Unknown Source)
        at com.l7tech.server.licensing.BootstrapLicenseService.onApplicationEvent(Unknown Source)
        at com.l7tech.server.util.q.onApplicationEvent(Unknown Source)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378)
        at com.l7tech.server.BootProcess.a(Unknown Source)
        ... 5 more
Caused by: java.util.zip.ZipException: Not in GZIP format
        at java.base/java.util.zip.GZIPInputStream.readHeader(Unknown Source)
        at java.base/java.util.zip.GZIPInputStream.<init>(Unknown Source)
        at java.base/java.util.zip.GZIPInputStream.<init>(Unknown Source)
        ... 14 more

 

**** Unable to start the server: Error starting server : Lifecycle error: Fail to install license: Not in GZIP format





Environment

Release : 10.0

Component : CA API Gateway 

Cause

This is due to the license not being in gzip format when mapping it using the config file.


So if we create the following kind of mapping:

apiVersion: v1

kind: ConfigMap

metadata:

  name: license

  annotations:

    description: Configuration Map for license

data:

  accept.license: "true"

  ssg.license: <we need to put value of the license file in gzip format here>


Now,  when we create gateway pod and we call for this license variable via   key: ssg.license it will come in in gzip format 



        env:

          - name: ACCEPT_LICENSE

            valueFrom:

              configMapKeyRef:

                name: license

                key: accept.license

          - name: EXTRA_JAVA_ARGS

            valueFrom:

              configMapKeyRef:

                name: env

                key: extra-java-args.env

          - name: SSG_LICENSE

            valueFrom:

              configMapKeyRef:

                name: license

                key: ssg.license 




Resolution

Open License File copy the text format, make sure no extra lines are copied 
go to gzip tool and gzip the text 

take the text and copy into config Mapping variable for license