Occurrence of 502 Bad Gateway when using Remote Browser
Generallyrb-appThis is usedport (ex : 30110 ~ 30xxx)Occurs when communication is not possible.
Expected Cases
It is likely, but it does not necessarily fall under the following cases.
- Issue with rb-app not being able to occupy port 30xxx
- Although the rb-app is occupying port 30xxx, there is an issue with communication between the k8s Service and the pod.
- Issue with rb-app pod not being in Running state
Inspection Method
Check Method: Issue with rb-app not occupying port 30xxx
Things to Check First
rb-app is외부(www.naver.com 등 외부망)and communication불가능In an environment, the k8s rb-manager configmap'sRB_CHROME_ARGSat--disable-component-update502 occurs when there is no __PH_0__.
RB_CHROME_ARGS: '--no-sandbox --enable-unsafe-webgpu --lang=ko --disable-component-update'like this--disable-component-updatemust be included!!
--disable-component-update 옵션의 역할: Widevine download not in progress, which makes it unusable when using video DRM.
Chromium attempts to communicate with the external network to install Widevine itself. If the installation fails at this time, it will fail to occupy the port, so the k8s pod is active, but when communication is attempted,
502a situation arises
Others
- SSH access to the host where the rb-app pod is running (most likely a workerNode unless there are special circumstances)
sudo lsof -iTCP:30100-30199 -sTCP:LISTENorss -tuln | grep -E ':(301[0-9][0-9])\b'Check the list of currently used ports with __PH_0__ (When using lsof, sudo is required!! If you run it without sudo privileges, the ports will not be displayed.)
iadmin@dev-kubernetes-worker-5:~$ ss -tuln | grep -E ':(301[0-9][0-9])\b'
tcp LISTEN 0 511 *:30110 *:*
tcp LISTEN 0 511 *:30112 *:*
tcp LISTEN 0 511 *:30113 *:*
30xxxports사용중(LISTEN)Cognitive Confirmation- In case there is a process occupying the specified port
rb-appThere is also a possibility that this is not the case, so additionallyrb-appIt would be better to check the log files as well. - Accessing the rb-app pod via ssh
logsMove to folderrb-svc-*.logView the most recent date file among the log files in the format (you can use either cat or tail, the method is free)
nobody@dev-kubernetes-master-2:~/logs$ tail -f rb-svc-2025-08-07.log
2025-08-07T05:46:14.951Z [info] js-flags : --turbo-fast-api-calls --sparkplug --concurrent-recompilation --turbo-inline-array-builtins --turbo-load-elimination --use-osr
2025-08-07T05:46:16.885Z [info] Server is listening on port 30115
[info] Server is listening on port 30xxxCheck if the log is printed- if
already portIf there is a log indicating that the port is already in use, it means that another process, not rb-app, is already occupying that port, which causes the issue. It is necessary to modify the rb-manager configmap to change the port range. [info] Server is listening on port 30xxxNo logs are visible.already portIf you don't see any logs, there may be another issue, so set the rb-app log level todebugItraceAfter changing to __PH_0__, it is necessary to recheck the logs.
Inspection method: Although rb-app occupies port 30xxx, there is an issue where it cannot communicate with the pod in the k8s Service.
rb-svcis normal30xxxIf the port is listening but communication is not working, it may be a problem with the k8s service being unable to communicate with the pod.
- Accessing Rancher
- move to services page
- in filter
rb-appSearch with rb-app-service-*The service namedactiveCheck if the status is correctrb-app-service-*ofedit configoredit yamlto selectportsCheck if the information is normal
ports:
- port: 80
protocol: TCP
targetPort: 30110
- Everything is normal, but if it doesn't connect, there is another issue, so additional error analysis is needed.
Check Method: Issue with rb-app pod not in Running state
- Accessing Rancher
- access the workload -> pods page
- in filter
rb-appSearch with - Click the right "More" (three dots) button.
view logsCheck - Need to identify the cause through log analysis