i have pulled all traces and named the namespace ...
# umh-support
u
i have pulled all traces and named the namespace as you recommended not sure where to start on this error: "Error: Command failed: /opt/Lens/resources/x64/helm install united-manufacturing-hub/united-manufacturing-hub --version 0.9.14 --values /tmp/5b6337fb1b34ec9da0c48d3752334d99/values.yaml --namespace united-manufacturing-hub --kubeconfig /tmp/kubeconfig-4b03168440f110452d30e949da3a8cc0 --generate-name Error: INSTALLATION FAILED: Deployment.apps "united-manufacturing-hub-1691533899-mqttkafkabridge" is invalid: [spec.template.spec.volumes[1].name: Invalid value: "united-manufacturing-hub-1691533899-mqttkafkabridge-mqtt-certificates": must be no more than 63 characters, spec.template.spec.containers[0].volumeMounts[1].name: Not found: "united-manufacturing-hub-1691533899-mqttkafkabridge-mqtt-certificates", spec.template.spec.initContainers[0].name: Invalid value: "united-manufacturing-hub-1691533899-mqttkafkabridge-init-newtopic": must be no more than 63 characters]"
f
I so far couldn't replicate your error. I have installed our stack basically as described on our documentation. 1) Install microk8s using snap 2) Installed helm & kubectl (also used snap here, but that shouldn't make any difference) 3) Exported the microk8s config to be used by kubectl and helm:
Copy code
cd $HOME
mkdir .kube
cd .kube
microk8s config > config
4) Checked if not is ready (
sudo kubectl get nodes --kubeconfig .kube/config
) 5) Followed the "Install the UMH stack" instructions (https://umh.docs.umh.app/docs/production-guide/installation/local-k3d-installation/#install-the-umh-stack) 6) Enable the dns and hostpath-storage addon:
Copy code
microk8s enable dns
microk8s enable hostpath-storage
7) Wait a couple minutes, while you can see the pod getting ready in lens 8) Everything should be running after ~5-10 minutes
If you see factoryinsight failing with this error:
Copy code
{
  "log.level": "fatal",
  "@timestamp": "2023-08-09T09:00:09.336Z",
  "log.origin": {
    "file.name": "factoryinsight/main.go",
    "file.line": 376
  },
  "message": "Error starting the server: listen tcp :80: bind: permission denied",
  "ecs.version": "1.6.0"
}
You can fix this by setting the securityContext of the factoryinsight deployment to:
Copy code
yaml
      securityContext:
        sysctls:
        - name: net.ipv4.ip_unprivileged_port_start
          value: "80"
        allowPrivilegeEscalation: false
        capabilities:
          drop: 
            - ALL
          add:
            - NET_BIND_SERVICE
please let me know if this step by step guide worked for you.
u
awesome, thank you! i'll give this a shot. umh and k8s for the first time feels like an ambitious choice all of a sudden 🙂
i've followed your guide but the error persists:
Copy code
Error: Command failed: /opt/Lens/resources/x64/helm install united-manufacturing-hub/united-manufacturing-hub --version 0.9.14 --values /tmp/a04b63c33386ce727c7592532290cca7/values.yaml --namespace united-manufacturing-hub --kubeconfig /tmp/kubeconfig-4b03168440f110452d30e949da3a8cc0 --generate-name
Error: INSTALLATION FAILED: Deployment.apps "united-manufacturing-hub-1691702439-mqttkafkabridge" is invalid: [spec.template.spec.volumes[1].name: Invalid value: "united-manufacturing-hub-1691702439-mqttkafkabridge-mqtt-certificates": must be no more than 63 characters, spec.template.spec.containers[0].volumeMounts[1].name: Not found: "united-manufacturing-hub-1691702439-mqttkafkabridge-mqtt-certificates", spec.template.spec.initContainers[0].name: Invalid value: "united-manufacturing-hub-1691702439-mqttkafkabridge-init-newtopic": must be no more than 63 characters]
can the names be shortened?united-manufacturing-hub-1691702439-mqttkafkabridge to umh-1691702439-mqttkafkabridge
could be a difference between a cli helm install to a lens helm install?
f
It shouldnt but im also wondering, why it even tries to put a numerical identifier into the container name. Because checking it on my microk8s cluster, it sets the correct name, without numeric ident:
u
this is the helm chart as i deploy:
so with the previous install attempts i left the install name blank asit was optional in Lens. seems that is anauto-gen'ed hash for theinstall name. i have used umh in the install name and it went much further but we have a new error:
Copy code
Error: Command failed: /opt/Lens/resources/x64/helm install umh united-manufacturing-hub/united-manufacturing-hub --version 0.9.14 --values /tmp/2a0ec5f733864760e6c6ec9e6c3868d4/values.yaml --namespace united-manufacturing-hub --kubeconfig /tmp/kubeconfig-4b03168440f110452d30e949da3a8cc0
Error: INSTALLATION FAILED: failed post-install: timed out waiting for the condition
i am gonna see if it finishes as the deployment still states progressing
thank you for your help so far 🙂
still crunching lol
ok, i just did an upgrade on it and lens confirms deployed
well that didnt help exactly
Copy code
{
  "log.level": "fatal",
  "@timestamp": "2023-08-15T22:42:47.773Z",
  "log.origin": {
    "file.name": "mqtt-bridge/main.go",
    "file.line": 72
  },
  "message": "environment variable REMOTE_BROKER_PASSWORD is required but not set",
  "ecs.version": "1.6.0"
}
so i have pulled the orginal helm install and ran helm from command line and it looks to be in much better shape
i am getting the error you spoke about
Copy code
{
  "log.level": "fatal",
  "@timestamp": "2023-08-15T23:06:59.219Z",
  "log.origin": {
    "file.name": "factoryinsight/main.go",
    "file.line": 376
  },
  "message": "Error starting the server: listen tcp :80: bind: permission denied",
  "ecs.version": "1.6.0"
}
however i am not sure where to set the security context
full pod error
Copy code
{"log.level":"error","@timestamp":"2023-08-15T23:11:50.626Z","log.origin":{"file.name":"factoryinsight/main.go","file.line":79},"message":"environment variable POSTGRES_PORT is not an integer. using fallback value","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-08-15T23:11:50.626Z","log.origin":{"file.name":"internal/fgtrace.go","file.line":32},"message":"DEBUG_ENABLE_FGTRACE not set. Not enabling debug tracing","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-08-15T23:11:50.626Z","log.origin":{"file.name":"factoryinsight/main.go","file.line":264},"message":"Starting API version 1","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-08-15T23:11:50.626Z","log.origin":{"file.name":"factoryinsight/main.go","file.line":279},"message":"Starting API version 2","ecs.version":"1.6.0"}
{"log.level":"fatal","@timestamp":"2023-08-15T23:11:50.626Z","log.origin":{"file.name":"factoryinsight/main.go","file.line":376},"message":"Error starting the server: listen tcp :80: bind: permission denied","ecs.version":"1.6.0"}
could this error also be that i have another deployment using port 80? i do have a wordpress deployment on the cluster
f
u
where would i add the security context ? the helm file had 18 or so
f
Inside Workloads->Deployments->united-manufacturing-hub-deployment
Then search for securityContext, and replace the existing empty definition with the one from above
u
thank you
so when i edit the deployment in lens, select save, then save & close. then edit again the changes are not visible even though lens gives me the green bubble saying deployment updated. any suggestions?
d
you coud try to apply the changes manually using helm uprgrade and set the debug flag to see what is happening.
u
i will give that a shot 🙂
which of the 18 securityContext entries am i looking for ? do you have an approx line number?
any suggestions?
f
It should be around line 360-380 in the factoryinsight deployment
If you can't find it, we can also setup a quick call, so I can fix it for you. (https://calendly.com/flinnenberg)
u
thank you will try tomorrow
i feel like im mixing yaml and json here:
i've converted the yaml to json and we look to be ok
2 Views