Question

How to properly set up FME_SERVER_HOST environment variable using Docker and Kubernetes deployment?

  • 25 May 2022
  • 1 reply
  • 5 views

We're deploying our FME Server 2021.0.3 (21326) on Kubernetes using Docker containers and would like to properly set up FME_SERVER_HOST environment variable which is now set up simply to "localhost" value for every job.

 

I tried to change FMESERVERHOSTNAME environment variable under core and web containers to proper hostname and restarted FME Server, but this led to that core container couldn't connect to the web container - trying to update its services as log said. Probably container couldn't connect by other hostname than "localhost".

fmeserver-core container logs when FMESERVERHOSTNAME changed to other than localhost:
Update Services: Trying to update FME Server services...

 

 

Is it possible to adjust FME_SERVER_HOST environment variable on FME Server 2021.0.3? Do you have any suggestions?

 

YAML from Kubernetes with environment variables set up for my core and web containers:

spec:
      containers:
#fmeserver-core:21326
        - env:
            - name: PRIMARY_PROCESS
              value: core
            - name: FMESERVERHOSTNAME
              value: localhost
            - name: WEBSERVERHOSTNAME
              value: vin06
            - name: FMESERVERHOSTNAMELOCAL
              value: vin06
            - name: EXTERNALHOSTNAME
              value: vin06
            - name: EXTERNALPORT
              value: '80'
            - name: WEBPROTOCOL
              value: http
            - name: NODENAMENS
              value: fmeserver
            - name: REDISHOSTS
              value: fmeserverqueue
            - name: REMOVEENGINETAGSONDISCONNECT
              value: 'true'
            - name: PGSQLHOSTNAME
              value: fme-db-2021
            - name: PGSQLPORT
              value: '5432'
            - name: PGSQLDATABASENAME
              value: fmeserver
            - name: FIRSTLOGINCHANGEPASSWORD
              value: 'false'
            - name: PGSQLUSERNAME
              value: fmeserver
            - name: PGSQLPASSWORD
              valueFrom:
                secretKeyRef:
                  key: ***
                  name: ***
            - name: FMESERVER_UID
              value: '3001'
            - name: FMESERVER_GID
              value: '3001'
            - name: FME_SERVER_HOST
              value: vin06
          image: safesoftware/fmeserver-core:21326
          imagePullPolicy: IfNotPresent
          name: fmeserver-core
          ports:
            - containerPort: 7070
              name: 7070tcp
              protocol: TCP
          resources:
            requests:
              cpu: '2'
              memory: 4Gi
#fmeserver-web:21326
        - env:
            - name: FMESERVER_UID
              value: '3001'
            - name: FMESERVER_GID
              value: '3001'
            - name: FMESERVERHOSTNAME
              value: localhost
            - name: WEBSERVERHOSTNAME
              value: vin06
            - name: FMESERVERHOSTNAMELOCAL
              value: vin06
            - name: EXTERNALHOSTNAME
              value: vin06
            - name: WEBPROTOCOL
              value: http
            - name: EXTERNALPORT
              value: '80'
            - name: MAXTHREADS
              value: '200'
            - name: READONLYQUEUES
              value: 'true'
            - name: PGSQLHOSTNAME
              value: fme-db-2021
            - name: PGSQLPORT
              value: '5432'
            - name: PGSQLDATABASENAME
              value: fmeserver
            - name: PGSQLUSERNAME
              value: fmeserver
            - name: PGSQLPASSWORD
              valueFrom:
                secretKeyRef:
                  key: ***
                  name: ***
            - name: FME_SERVER_HOST
              value: vin06
          image: safesoftware/fmeserver-web:21326
          imagePullPolicy: IfNotPresent
          livenessProbe:
            failureThreshold: 6
            httpGet:
              path: /fmerest/v3/healthcheck?ready=false
              port: 8080
              scheme: HTTP
            initialDelaySeconds: 60
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 5
          name: web
          ports:
            - containerPort: 8080
              name: 8080tcp
              protocol: TCP
          readinessProbe:
            failureThreshold: 3
            httpGet:
              path: /fmerest/v3/healthcheck?ready=true
              port: 8080
              scheme: HTTP
            initialDelaySeconds: 20
            periodSeconds: 5
            successThreshold: 1
            timeoutSeconds: 3
          resources:
            requests:
              cpu: 500m
              memory: 1Gi

 


1 reply

Badge +2

Hi Skime,

 

Can you share what your expected outcome is from changing the FMESERVERHOSTNAME?

 

I believe that hostname is what's used for cluster-internal communication, and doesn't set the externally facing hostname. To do that, you will need to set the deployment.hostname value.

The helm chart configuration values are available on github.

Reply