jfrog / charts

JFrog official Helm Charts
https://jfrog.com/integration/helm-repository/
Apache License 2.0
261 stars 447 forks source link

Can't disable JF Connect #1806

Closed jacobcsmith closed 1 year ago

jacobcsmith commented 1 year ago

Is this a request for help?: No


Is this a BUG REPORT or FEATURE REQUEST? (choose one): Bug Report

Version of Helm and Kubernetes: Helm 3 and Kubernetes 1.26.2

Which chart: artifactory 107.63.7

Which product license (Enterprise/Pro/oss): Enterprise

What happened: Artifactory attempts to connect to an entitlements service for JF Connect and fails to start after a few minutes even though jfconnect is disabled in values.yaml. Exception as follows:

DATA-----------------------------
404 page not found
]. Will not retry anymore.
2023-08-12T01:28:13.751Z [jfrt ][ERROR][                ] [titlementsAutoUpdatingCache:49] [pool-46-thread-1    ] - Can't update entitlements
org.jfrog.jfconnect.client.exception.RetryFailedException: org.jfrog.common.ExecutionFailed: Failed executing GetEntitlements, last error [UNIMPLEMENTED: HTTP status code 404
invalid content-type: text/plain; charset=utf-8
headers: Metadata(:status=404,content-type=text/plain; charset=utf-8,x-content-type-options=nosniff,date=Sat, 12 Aug 2023 01:28:13 GMT,content-length=19)
DATA-----------------------------
404 page not found
]. Will not retry anymore.
    at org.jfrog.jfconnect.client.grpc.GrpcRetryableCallSupplier.executeWithRetry(GrpcRetryableCallSupplier.java:38)
    at org.jfrog.jfconnect.client.grpc.GrpcClient.executeWithRetryAndConfig(GrpcClient.java:95)
    at org.jfrog.jfconnect.client.grpc.GrpcClient.getEntitlements(GrpcClient.java:79)
    at org.jfrog.jfconnect.client.EntitlementsAutoUpdatingCache.updateEntitlements(EntitlementsAutoUpdatingCache.java:96)
    at org.jfrog.jfconnect.client.EntitlementsAutoUpdatingCache.lambda$init$0(EntitlementsAutoUpdatingCache.java:47)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)

What you expected to happen: Not attempt to connect to any JF Connect related service.

How to reproduce it (as minimally and precisely as possible): In values.yaml set:

jfconnect:
  enabled: false
splitServicesToContainers: true

Anything else we need to know:

Was able to workaround by manually changing the JF_JFCONNECT_ENABLED env var to false in the statefulset manifest. Perhaps the value of this env var should come from Values.jfconnect.enabled rather than hardcoding.

ssarivis commented 1 year ago

@jacobcsmith thanks for raising this , could you confirm which chart you are using artifactory or artifactory-ha ?

Also, Can you try using the latest chart by disabling jfconnect_service via values.yaml , which would mean we disable in systemyaml no need of using ENV variables

jfconnect:
  enabled: false
jacobcsmith commented 1 year ago

Hey @ssarivis I am using the artifactory chart. I am already setting jfconnect.enabled to false and see that reflected in our system.yaml.

router:
  serviceRegistry:
    insecure: false
shared:
  metrics:
    enabled: true
  logging:
    consoleLog:
      enabled: false
  extraJavaOpts: >
    -Dartifactory.graceful.shutdown.max.request.duration.millis=30000
    -Dartifactory.access.client.max.connections=50
    -Xms6g
    -Xmx8g
artifactory:
  database:
    maxOpenConnections: 100
  tomcat:
    maintenanceConnector:
      port: 8091
    connector:
      maxThreads: 200
      sendReasonPhrase: false
      extraConfig: acceptCount="100"
frontend:
  session:
    timeMinutes: "30"
access:
  database:
    maxOpenConnections: 100
  tomcat:
    connector:
      maxThreads: 50
      sendReasonPhrase: false
      extraConfig: acceptCount="100"
metadata:
  database:
    maxOpenConnections: 100
jfconnect:
  enabled: false
jfconnect_service:
  enabled: false

The reason I brought up environment variables is due to this line: https://github.com/jfrog/charts/blob/master/stable/artifactory/templates/artifactory-statefulset.yaml#L927. Please note we have enabled splitServicesToContainers to true.

Was there a change between 107.63.7 and 107.63.12 which addressed this issue? Looking at the changelog and commits I didn't see a change in the chart which would address this issue.

ssarivis commented 1 year ago

@jacobcsmith , Thanks for reporting this. We have fixed this now internally and should be available in the upcoming releases.ETA 2weeks.

chukka commented 1 year ago

@jacobcsmith Fixed in 107.68.7 chart and please try and share feedback

jacobcsmith commented 1 year ago

We upgraded to 107.68.14 without an issue. Thank you for resolving 👍