Issue
In Fusion 5.9.9, deployments may generate repeated warnings in API Gateway pod logs similar to the following:
2025-02-06T20:35:38.980Z - WARN [boundedElastic-104:o.s.c.l.LogAccessor@271] - Make sure that either the primary-port-name label has been added to the service, or spring.cloud.kubernetes.discovery.primary-port-name has been configured. Alternatively name the primary port 'https' or 'http' An incorrect configuration may result in non-deterministic behaviour.
This warning typically does not disrupt API Gateway functionality but results in excessive log output.
Diagnosis
This issue was introduced in Fusion 5.9.9 due to changes in how the API Gateway discovers service ports using Spring Cloud Kubernetes. The API Gateway now requires either:
- A Kubernetes service port explicitly named
httporhttps, - The label
primary-port-nameset on the Kubernetes service, or - A custom Spring configuration defining the primary port name.
Without one of these configurations, the warning appears continuously in logs.
Environment
- Product: Lucidworks Fusion (Self-Hosted)
- Version: 5.9.9 through 5.9.11
Cause
Fusion 5.9.9 introduced a change in the API Gateway’s mechanism for discovering service ports via Spring Cloud Kubernetes. If the primary port name is not clearly defined, the discovery process may become non-deterministic, triggering the warning message.
Resolution
This issue is resolved in Fusion version 5.9.12. To eliminate the log warning, perform one of the following actions:
Option 1: Upgrade Fusion
Upgrade your Fusion deployment to version 5.9.12 or later, where this issue has been addressed.
Option 2: Modify configuration in 5.9.9
If you must remain on Fusion 5.9.9, implement one of the following configurations to suppress the warning:
- Name the primary port in your Kubernetes service as either
httporhttps. For example:
ports:
- name: http
port: 6764
targetPort: 6764Add the primary-port-name label to your Kubernetes service definition:
metadata:
labels:
primary-port-name: httpSet a Spring configuration override in your API Gateway deployment:
env:
- name: JAVA_TOOL_OPTIONS
value: "-Dspring.cloud.kubernetes.discovery.primary-port-name=http"