# OpenSearch Dashboards Port 443

**URL:** <https://forum.opensearch.org/t/opensearch-dashboards-port-443/22587>\
**Category:** OpenSearch Dashboards\
**Tags:** configure, install\
**Created:** [November 27, 2024, 6:21am UTC](https://forum.opensearch.org/t/opensearch-dashboards-port-443/22587 "2024-11-27T06:21:53Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![faraya](https://avatars.discourse-cdn.com/v4/letter/f/b4bc9f/32.png) [@faraya](https://forum.opensearch.org/u/faraya)\
**Post date:** [November 27, 2024, 6:21am UTC](https://forum.opensearch.org/t/opensearch-dashboards-port-443/22587/1 "2024-11-27T06:21:53Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.16.0

**Describe the issue** : I’m trying to start OpenSearch Dashboards with HTTPS in Port 443 using the Helm Charts but I get an error: “Error: listen EACCES: permission denied 0.0.0.0:443”  
I was able to configure HTTPS with the certificates with the default port 5601 but now I’m trying to change the port and getting the error.

**Configuration** :  
Here is my values.yaml:

```auto
opensearchHosts: "https://opensearch-cluster-2-16-0:9200"
replicaCount: 1
 
image:
  repository: "opensearchproject/opensearch-dashboards"
  tag: "2.16.0"
  pullPolicy: "Always"

startupProbe:
  tcpSocket:
    port: 443
  periodSeconds: 10
  timeoutSeconds: 5
  failureThreshold: 20
  successThreshold: 1
  initialDelaySeconds: 10

livenessProbe:
  tcpSocket:
    port: 443
  periodSeconds: 20
  timeoutSeconds: 5
  failureThreshold: 10
  successThreshold: 1
  initialDelaySeconds: 10

readinessProbe:
  tcpSocket:
    port: 443
  periodSeconds: 20
  timeoutSeconds: 5
  failureThreshold: 10
  successThreshold: 1
  initialDelaySeconds: 10

ingress:
  enabled: true
  ingressClassName: "azure-application-gateway"
  annotations:
    appgw.ingress.kubernetes.io/health-probe-port: "443"
    appgw.ingress.kubernetes.io/backend-protocol: https
  hosts:
    - host: opensearch.myhost.com
      paths:
        - path: /
          backend:
           serviceName: os-dashboards-2-16-0-opensearch-dashboards
           servicePort : 443
  tls:
    - hosts:
        - opensearch.myhost.com
      secretName: opensearch-dashboards-app-tls

config:
  opensearch_dashboards.yml: |
    opensearch.hosts: [https://opensearch-cluster-2-16-0:9200]
    opensearch.ssl.verificationMode: none
    opensearch.requestHeadersWhitelist: [authorization, securitytenant]

    opensearch_security.multitenancy.enabled: true
    opensearch_security.multitenancy.tenants.preferred: [Private, Global]
    opensearch_security.readonly_mode.roles: [kibana_read_only]
    server.host: '0.0.0.0'

    server.port: 443
    server.ssl.enabled: true
    server.ssl.key: /tmp/opensearch-dashboards.key
    server.ssl.certificate: /tmp/opensearch-dashboards.crt
    opensearch_security.cookie.secure: true

secretMounts: 
 - name: opensearch-dashboards-cert
   secretName: opensearch-dashboards-cert
   path: /tmp/opensearch-dashboards.crt
   subPath: opensearch-dashboards.crt
 - name: opensearch-dashboards-cert-key
   secretName: opensearch-dashboards-cert-key
   path: /tmp/opensearch-dashboards.key
   subPath: opensearch-dashboards.key

```

**Relevant Logs or Screenshots** :

```auto
{"type":"log","@timestamp":"2024-11-27T05:11:16Z","tags":["info","plugins-service"],"pid":1,"message":"Plugin \"applicationConfig\" is disabled."}
{"type":"log","@timestamp":"2024-11-27T05:11:16Z","tags":["info","plugins-service"],"pid":1,"message":"Plugin \"cspHandler\" is disabled."}
{"type":"log","@timestamp":"2024-11-27T05:11:16Z","tags":["info","plugins-service"],"pid":1,"message":"Plugin \"dataSource\" is disabled."}
{"type":"log","@timestamp":"2024-11-27T05:11:16Z","tags":["info","plugins-service"],"pid":1,"message":"Plugin \"visTypeXy\" is disabled."}
{"type":"log","@timestamp":"2024-11-27T05:11:16Z","tags":["info","plugins-service"],"pid":1,"message":"Plugin \"workspace\" is disabled."}
{"type":"log","@timestamp":"2024-11-27T05:11:16Z","tags":["warning","config","deprecation"],"pid":1,"message":"\"cpu.cgroup.path.override\" is deprecated and h
as been replaced by \"ops.cGroupOverrides.cpuPath\""}
{"type":"log","@timestamp":"2024-11-27T05:11:16Z","tags":["warning","config","deprecation"],"pid":1,"message":"\"cpuacct.cgroup.path.override\" is deprecated a
nd has been replaced by \"ops.cGroupOverrides.cpuAcctPath\""}
{"type":"log","@timestamp":"2024-11-27T05:11:16Z","tags":["warning","config","deprecation"],"pid":1,"message":"\"opensearch.requestHeadersWhitelist\" is deprec
ated and has been replaced by \"opensearch.requestHeadersAllowlist\""}
{"type":"log","@timestamp":"2024-11-27T05:11:16Z","tags":["fatal","root"],"pid":1,"message":"Error: listen EACCES: permission denied 0.0.0.0:443\n at Server
.setupListenHandle [as _listen2] (node:net:1800:21)\n at listenInCluster (node:net:1865:12)\n at doListen (node:net:2014:7)\n at processTicksAndReject
ions (node:internal/process/task_queues:83:21) {\n code: 'EACCES',\n errno: -13,\n syscall: 'listen',\n address: '0.0.0.0',\n port: 443\n}"}

 FATAL Error: listen EACCES: permission denied 0.0.0.0:443

```

Have you ever seen this before? any ideas? thanks in advance.

---

<div class="post-metadata">

**Author:** ![yeonghyeonKo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/yeonghyeonko/32/8202_2.png) [@yeonghyeonKo](https://forum.opensearch.org/u/yeonghyeonKo)\
**Post date:** [November 27, 2024, 6:30am UTC](https://forum.opensearch.org/t/opensearch-dashboards-port-443/22587/2 "2024-11-27T06:30:37Z")

</div>

Can you share the information of Service type( **dashboards** ) in your namespace?

ex)

```auto
$ kubectl describe svc test-opensearch-cluster-dashboards

Name: test-opensearch-cluster-dashboards
Namespace: test-opensearch-cluster
...
Type: ClusterIP
IP Family Policy: SingleStack
IP Families: IPv4
IP: 172.31.38.89
IPs: 172.31.38.89
Port: http 5601/TCP
TargetPort: 5601/TCP
Endpoints: 10.251.73.166:5601
Session Affinity: None
Events: <none>

```

---

<div class="post-metadata">

**Author:** ![faraya](https://avatars.discourse-cdn.com/v4/letter/f/b4bc9f/32.png) [@faraya](https://forum.opensearch.org/u/faraya)\
**Post date:** [November 27, 2024, 6:45am UTC](https://forum.opensearch.org/t/opensearch-dashboards-port-443/22587/3 "2024-11-27T06:45:22Z")

</div>

It looks like is still using port 5601 😕

```auto
Name: os-dashboards-2-16-0-opensearch-dashboards
Namespace: default
Labels: app.kubernetes.io/instance=os-dashboards-2-16-0
                          app.kubernetes.io/managed-by=Helm
                          app.kubernetes.io/name=opensearch-dashboards
                          app.kubernetes.io/version=2.18.0
                          helm.sh/chart=opensearch-dashboards-2.25.0
Annotations: meta.helm.sh/release-name: os-dashboards-2-16-0
                          meta.helm.sh/release-namespace: default
Selector: app=opensearch-dashboards,release=os-dashboards-2-16-0
Type: ClusterIP
IP Family Policy: SingleStack
IP Families: IPv4
IP: 172.0.0.69
IPs: 172.0.0.69
Port: http 5601/TCP
TargetPort: 5601/TCP
Endpoints: 10.8.8.79:5601
Port: metrics 9601/TCP
TargetPort: 9601/TCP
Endpoints: 10.8.8.79:9601
Session Affinity: None
Internal Traffic Policy: Cluster
Events: <none>

```

what am I missing?

---

<div class="post-metadata">

**Author:** ![faraya](https://avatars.discourse-cdn.com/v4/letter/f/b4bc9f/32.png) [@faraya](https://forum.opensearch.org/u/faraya)\
**Post date:** [November 27, 2024, 6:55am UTC](https://forum.opensearch.org/t/opensearch-dashboards-port-443/22587/4 "2024-11-27T06:55:57Z")

</div>

I added the following section to my values.yaml:

```auto
service:
  type: ClusterIP
  port: 443
  metricsPort: 9601
  loadBalancerIP: ""
  nodePort: ""
  labels: {}
  annotations: {}
  loadBalancerSourceRanges: []
  httpPortName: https
  metricsPortName: metrics

```

and now I get the correct port numbers when I describe the service.  
but, I keep getting the same error in the pod

---

<div class="post-metadata">

**Author:** ![yeonghyeonKo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/yeonghyeonko/32/8202_2.png) [@yeonghyeonKo](https://forum.opensearch.org/u/yeonghyeonKo)\
**Post date:** [November 27, 2024, 6:57am UTC](https://forum.opensearch.org/t/opensearch-dashboards-port-443/22587/5 "2024-11-27T06:57:07Z")

</div>

If so, can you try the below yaml for ingress and share what would happen?

```auto
hosts:
    - host: opensearch.myhost.com
      paths:
        - path: /
          backend:
           serviceName: os-dashboards-2-16-0-opensearch-dashboards
           servicePort : 5601

```

---

<div class="post-metadata">

**Author:** ![faraya](https://avatars.discourse-cdn.com/v4/letter/f/b4bc9f/32.png) [@faraya](https://forum.opensearch.org/u/faraya)\
**Post date:** [November 27, 2024, 7:08am UTC](https://forum.opensearch.org/t/opensearch-dashboards-port-443/22587/6 "2024-11-27T07:08:41Z")

</div>

It looks like it doesn’t have any effect, in the service or the pod.  
If I describe the ingress I see this:

```auto
Backend target port 5601 does not have matching endpoint port

```

---

<div class="post-metadata">

**Author:** ![yeonghyeonKo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/yeonghyeonko/32/8202_2.png) [@yeonghyeonKo](https://forum.opensearch.org/u/yeonghyeonKo)\
**Post date:** [November 27, 2024, 9:16am UTC](https://forum.opensearch.org/t/opensearch-dashboards-port-443/22587/7 "2024-11-27T09:16:37Z")

</div>

Has error from the ingress still been returned after you keep the original port(5601), not overwriting service.port through values.yaml?

---

<div class="post-metadata">

**Author:** ![mgelszinnis](https://avatars.discourse-cdn.com/v4/letter/m/d9b06d/32.png) [@mgelszinnis](https://forum.opensearch.org/u/mgelszinnis)\
**Post date:** [November 27, 2024, 2:46pm UTC](https://forum.opensearch.org/t/opensearch-dashboards-port-443/22587/8 "2024-11-27T14:46:31Z")

</div>

443 is a privileged port, depending on your setup the dashboards process may not have the necessary permissions for that.  
I would recommend starting dasboards on a non-privileged port as you will still be able to reach dasboards on 443 because of your service configuration, if you set the targetport to your new non-privileged port.

---

<div class="post-metadata">

**Author:** ![faraya](https://avatars.discourse-cdn.com/v4/letter/f/b4bc9f/32.png) [@faraya](https://forum.opensearch.org/u/faraya)\
**Post date:** [November 28, 2024, 3:41am UTC](https://forum.opensearch.org/t/opensearch-dashboards-port-443/22587/9 "2024-11-28T03:41:18Z")

</div>

thanks for your answers.  
it looks like the helm chart doesn’t allow having a service with a different targetport (it could be a nice improvement), so I created my own service and it works.  
however, this doesn’t solve the original question, can the pod run using port 443? if it is possible, how?

---

<div class="post-metadata">

**Author:** ![yeonghyeonKo](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/yeonghyeonko/32/8202_2.png) [@yeonghyeonKo](https://forum.opensearch.org/u/yeonghyeonKo)\
**Post date:** [November 28, 2024, 7:03am UTC](https://forum.opensearch.org/t/opensearch-dashboards-port-443/22587/10 "2024-11-28T07:03:46Z")

</div>

In my case, tls for cluster is enabled but not for dashboards.  
How about inject opensearch.ssl.verificationMode env and set it _ **none** _?  
OpenSearch doesn’t require you to conform tls setting for dashboards.

```yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    ingress.kubernetes.io/backend-protocol: HTTPS
  name: test-opensearch-cluster-os
  namespace: test-opensearch-cluster
spec:
  ingressClassName: nginx
  rules:
  - host: test-opensearch-cluster-os.xxx.xxxx.com
    http:
      paths:
      - backend:
          service:
            name: test-opensearch-cluster
            port:
              number: 9200
        path: /
        pathType: ImplementationSpecific
  tls:
  - hosts:
    - test-opensearch-cluster-os.xxx.xxxx.com
    secretName: test-opensearch-cluster-http-cert
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: test-opensearch-cluster-osd
  namespace: test-opensearch-cluster
spec:
  ingressClassName: nginx
  rules:
  - host: test-opensearch-cluster-osd.xxx.xxxx.com
    http:
      paths:
      - backend:
          service:
            name: test-opensearch-cluster-dashboards
            port:
              number: 5601
        path: /
        pathType: ImplementationSpecific

```

```yaml
apiVersion: opensearch.opster.io/v1
kind: OpenSearchCluster
metadata:
  name: test-opensearch-cluster
  namespace: test-opensearch-cluster
spec:
  dashboards:
    additionalConfig:
      opensearch.ssl.verificationMode: none
    enable: true
    image: harbor.xxxx.com/library/opensearchproject/opensearch-dashboards:v2.17.1
    opensearchCredentialsSecret:
      name: admin-credentials-secret
    replicas: 1
    resources:
      limits:
        cpu: 500m
        memory: 2Gi
      requests:
        cpu: 500m
        memory: 2Gi
    tls: null
    version: 2.3.0
...

```

---

<div class="post-metadata">

**Author:** ![mgelszinnis](https://avatars.discourse-cdn.com/v4/letter/m/d9b06d/32.png) [@mgelszinnis](https://forum.opensearch.org/u/mgelszinnis)\
**Post date:** [November 28, 2024, 7:52am UTC](https://forum.opensearch.org/t/opensearch-dashboards-port-443/22587/11 "2024-11-28T07:52:47Z")

</div>

You will have to start the pod in priviliged mode i.e. with the root user. That is generally not recommended if it isn’t necessary for some reason. You would do that with the securityContext setting on the pod [Configure a Security Context for a Pod or Container | Kubernetes](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container)

---

<div class="post-metadata">

**Author:** ![faraya](https://avatars.discourse-cdn.com/v4/letter/f/b4bc9f/32.png) [@faraya](https://forum.opensearch.org/u/faraya)\
**Post date:** [November 28, 2024, 2:55pm UTC](https://forum.opensearch.org/t/opensearch-dashboards-port-443/22587/12 "2024-11-28T14:55:29Z")

</div>

tried using the securityContext to switch to the root user:

```auto
securityContext:
  runAsUser: 0

```

but I got the following error:

```auto
Error: container's runAsUser breaks non-root policy 

```

---

<div class="post-metadata">

**Author:** ![mgelszinnis](https://avatars.discourse-cdn.com/v4/letter/m/d9b06d/32.png) [@mgelszinnis](https://forum.opensearch.org/u/mgelszinnis)\
**Post date:** [November 28, 2024, 3:17pm UTC](https://forum.opensearch.org/t/opensearch-dashboards-port-443/22587/13 "2024-11-28T15:17:10Z")

</div>

well, seems like your kubernetes cluster disallows this. Why are you trying to start dasboards on port 443? You can remap to any port you want with the service and ingress, there is literally no need to do that

---

<div class="post-metadata">

**Author:** ![jakabasej5](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@jakabasej5](https://forum.opensearch.org/u/jakabasej5)\
**Post date:** [November 29, 2024, 11:31am UTC](https://forum.opensearch.org/t/opensearch-dashboards-port-443/22587/14 "2024-11-29T11:31:35Z")

</div>

Good question! 😊 If the ingress error is still occurring even after keeping the original port (5601)
