RocketChat with Suffix in ROOT_URL working only in API Calls and it's failing in WEB UI

Hi Team,

We have deployed rocket chat application in Kubernetes cluster by using helm chart and we have provided -“-set host=devdomaincom/rocketchat”

Post deployment , i am able to hit the API Calls but Web UI not realize the context path and directly going with default API Calls

example :

Require : http://dev.domain.com/rocketchat/admin/settings
getting response : http://dev.domain.com/admin/settings

chat version: rocketchat-6.4.1
App version: 6.3.4
Image : registry.rocket.chat/rocketchat/rocket.chat:6.3.4

Could you please help me if i missed anything during deployment or else should we pass more variable during helm installation.

Note: set host=devdomaincom/rocketchat , removed the dots , since i am not able to add more that 2 links

Thanks,
Karunakaran

Try also setting the Site_Url
I’m using ENV vars ROOT_URL and OVERWRITE_SETTING_Site_Url

@stefan.badenhorst thanks for the response,

i have made site_Url setting in Web UI as per my need also below ENV cars i have set under my RC deployment configuration.

Current Site URL : https://dev.domain.com/rocketchat/

But still i am facing same issue , API Calls are working fine only in WEB UI i am not able to navigate to any of the fields and it’s working when i hit the exact URL.

Example:

Working if i use this URL’s directly :

https://dev.domain.com/rocketchat/admin/settings
https://dev.domain.com/rocketchat/admin/rooms
https://dev.domain.com/rocketchat/admin/users
https://dev.domain.com/rocketchat/channel/general
https://dev.domain.com/rocketchat/group/testing

Above fields are not working if i click on the WEB UI.

Can you please help us if i missed any configuration during the deployment of helm chat. Also let me know if i need to add any ENV vars in the deployment confuguration.

I don’t know if this will help you, but this is an example setup:

---
apiVersion: v1
kind: Service
metadata:
  labels:
    my.service: rocketchat-server
  name: rocketchat-server
spec:
  ports:
    - name: "1990"
      port: 1990
      targetPort: 1990
  selector:
    my.service: rocketchat-server
---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    my.service: rocketchat-server
  name: rocketchat-server
spec:
  replicas: 1
  selector:
    matchLabels:
      my.service: rocketchat-server
  template:
    metadata:
      labels:
        my.service: rocketchat-server
    spec:
      containers:
        - env:
            - name: ADMIN_EMAIL
              value: rocket@dummy.not
            - name: ADMIN_PASS
              value: rocket_pass
            - name: ADMIN_USERNAME
              value: rocket_admin
            - name: CREATE_TOKENS_FOR_USERS
              value: "true"
            - name: MONGO_OPLOG_URL
              value: mongodb://rocketchat-mongo:27017/local
            - name: MONGO_URL
              value: mongodb://rocketchat-mongo:27017/rocketchat?replicaSet=rs0&directConnection=true
            - name: OVERWRITE_SETTING_Allow_Marketing_Emails
              value: "false"
            - name: OVERWRITE_SETTING_Apps_Framework_enabled
              value: "false"
            - name: OVERWRITE_SETTING_Cloud_Service_Agree_PrivacyTerms
              value: "false"
            - name: OVERWRITE_SETTING_Country
            - name: OVERWRITE_SETTING_Industry
            - name: OVERWRITE_SETTING_Language
            - name: OVERWRITE_SETTING_Layout_Home_Body
            - name: OVERWRITE_SETTING_Organization_Name
              value: testserver
            - name: OVERWRITE_SETTING_Organization_Type
            - name: OVERWRITE_SETTING_Register_Server
              value: "false"
            - name: OVERWRITE_SETTING_Server_Type
            - name: OVERWRITE_SETTING_Show_Setup_Wizard
              value: completed
            - name: OVERWRITE_SETTING_Site_Name
              value: testserver
            - name: OVERWRITE_SETTING_Site_Url
              value: http://testserver/chat
            - name: OVERWRITE_SETTING_Size
            - name: OVERWRITE_SETTING_Statistics_reporting
              value: "false"
            - name: OVERWRITE_SETTING_Website
              value: testserver
            - name: PORT
              value: "1990"
            - name: ROOT_URL
              value: http://testserver/chat
          image: rocketchat/rocket.chat:5.4.2
          livenessProbe:
            exec:
              command:
                - node
                - --eval
                - 'const http = require(''http''); const options = {host: ''0.0.0.0'', port: 1990, timeout: 2000, path:''/health''}; const healthCheck = http.request(options, (res) => {console.log(''HEALTHCHECK STATUS:'', res.statusCode); if (res.statusCode == 200) {process.exit(0);} else {process.exit(1);}}); healthCheck.on(''error'', function (err) {console.error(''ERROR''); process.exit(1);}); healthCheck.end();'
            failureThreshold: 5
            initialDelaySeconds: 200
            periodSeconds: 10
            timeoutSeconds: 20
          name: rocketchat-server
          ports:
            - containerPort: 1990
              protocol: TCP
      restartPolicy: Always
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  labels:
    my.service: rocketchat-server
  name: rocketchat-server
spec:
  entryPoints:
    - web
  routes:
  - match: Host(`testserver`) && PathPrefix(`/chat`)
    kind: Rule
    services:
    - name: rocketchat-server
      port: 1990

@stefan.badenhorst unfortunately it didn’t work.

Step 1: helm install rocketchat -f values.yaml --namespace rc rocketchat/rocketchat

values.yaml contain below details:

mongodb:
auth:
passwords:
- rocketchat
rootPassword: rocketchatroot

host: dev.domain.com/rocketchat/

service:
type: NodePort
port: 3000

We have used above configuration for helm installation , Post helm deployed successfully.

Step 2: we have edited the rocketchat deployment file with given suggested deployment file. Post that same issue, API calls are working fine and WEB UI not working properly.

Also we found in below Repo , that have defined the routes on the code. Can you please check and suggest will that require to modify if yes then we need to change and create our own deployment image.

Since it is working for me I thought I would just share my config, but if you are still having issues, I’ll probably not be able to help, sorry.