# tunneling socket could not be established: 500

**URL:** <https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779>\
**Category:** Product support\
**Tags:** raspberrypi3\
**Created:** [October 12, 2020, 10:52am UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779 "2020-10-12T10:52:52Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anton](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Anton](https://forums.balena.io/u/Anton)\
**Post date:** [October 12, 2020, 10:52am UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/1 "2020-10-12T10:52:52Z")

</div>

Hello! Could you please help me? I have this error:

Error: " Request error: tunneling socket could not be established, statusCode=500" when trying to reboot or restart container.

diagnostics tab : Some networking issues detected:  
test\_dockerhub: Could not query Docker Hub  
test\_balena\_registry: Could not communicate with for authentication

---

<div class="post-metadata">

**Author:** ![georgiats](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/georgiats/32/2571_2.png) [@georgiats](https://forums.balena.io/u/georgiats)\
**Post date:** [October 12, 2020, 11:00am UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/4 "2020-10-12T11:00:02Z")

</div>

Hi there,  
regarding the 500 error, how do you get it? Do you try to reboot the device or does it appear on a different way?

The test\_dockerhub is a false alarm from our side, and we are working on it. You can find the relevant GH issue here [https://github.com/balena-io/device-diagnostics/issues/249](https://github.com/balena-io/device-diagnostics/issues/249).

---

<div class="post-metadata">

**Author:** ![georgiats](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/georgiats/32/2571_2.png) [@georgiats](https://forums.balena.io/u/georgiats)\
**Post date:** [October 12, 2020, 11:01am UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/5 "2020-10-12T11:01:56Z")

</div>

Moreover could you please let me know about the balenaOS and supervisor version you are running in your device?

---

<div class="post-metadata">

**Author:** ![Anton](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Anton](https://forums.balena.io/u/Anton)\
**Post date:** [October 12, 2020, 11:17am UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/7 "2020-10-12T11:17:30Z")

</div>

Host OS version: balenaOS 2.58.3+rev1 Supervisor version: 11.14.0

I tried following the public device url. Also, I tried to reboot the device.

---

<div class="post-metadata">

**Author:** ![nazrhom](https://avatars.discourse-cdn.com/v4/letter/n/ee59a6/32.png) [@nazrhom](https://forums.balena.io/u/nazrhom)\
**Post date:** [October 12, 2020, 11:42am UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/8 "2020-10-12T11:42:53Z")

</div>

Hello Anton, Im sorry I am not sure I understand what you mean about the public url, did you see that error when trying to reach the device publics URL? One thing which would help us understand what is happening is navigating to the diagnostic page and downloading the diagnostic report for the device. That should contain logs for the supervisor and other services which can help us debug these kind of issues

---

<div class="post-metadata">

**Author:** ![Anton](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Anton](https://forums.balena.io/u/Anton)\
**Post date:** [October 12, 2020, 11:52am UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/10 "2020-10-12T11:52:56Z")

</div>

Here it is a diagnostic report:  
[fc7fbc7105b45d186b091a46c86638bb\_2020.10.12\_11.49.17+0000.pdf](https://forums.balena.io/uploads/short-url/ft5Q7vc6h7CIrAFYCfzHIBvuGx4.pdf) (339.2 KB)

---

<div class="post-metadata">

**Author:** ![Anton](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Anton](https://forums.balena.io/u/Anton)\
**Post date:** [October 13, 2020, 9:28am UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/16 "2020-10-13T09:28:13Z")

</div>

So, I solved trouble and get a picture:

 ![Снимок экрана от 2020-10-13 12-25-20](https://global.discourse-cdn.com/balena/original/2X/b/bfa07052f3b18db8ab92f8d7a2458c9418b61ba4.png)

What do I need to do next? How can I make settings for camera?

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [October 13, 2020, 9:59am UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/17 "2020-10-13T09:59:19Z")

</div>

Hey Anton! good to hear that it works for you! what project are you using? For the image it looks like the Hello World?

---

<div class="post-metadata">

**Author:** ![Anton](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Anton](https://forums.balena.io/u/Anton)\
**Post date:** [October 13, 2020, 10:25am UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/18 "2020-10-13T10:25:38Z")

</div>

Great! It works! Thanks for your issue. It helped me to understand what should I do next))

---

<div class="post-metadata">

**Author:** ![jhussain7262](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@jhussain7262](https://forums.balena.io/u/jhussain7262)\
**Post date:** [February 16, 2021, 4:16am UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/22 "2021-02-16T04:16:15Z")

</div>

I am having the same error. I am using the balena cloud and motioneye to get this working but when I click on public device url and then the url it generates, I get this error.  
How to fix that? Below is the message I get.

# Error accessing device

We encountered an error when reaching this [balena.io](https://balena.io/) device:

UUID 7e3ca05ece739bcb2d0xxxxxxxxxxxxxxx

`tunneling socket could not be established: 500`

One possible reason is because nothing is listening on port 80 on the device.

thanks.

---

<div class="post-metadata">

**Author:** ![bkjaya1952](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/bkjaya1952/32/3986_2.png) [@bkjaya1952](https://forums.balena.io/u/bkjaya1952)\
**Post date:** [February 16, 2021, 5:10am UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/23 "2021-02-16T05:10:27Z")

</div>

Please try the procedure in the following link  
[How to control motionEye CCTV system on a Raspberry Pi 3 remotely using balenaCloud](https://bkjaya.wordpress.com/2021/02/13/how-to-control-motioneye-cctv-system-on-a-raspberry-pi-3-remotely-using-balenacloud/)

---

<div class="post-metadata">

**Author:** ![phil-d-wilson](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/phil-d-wilson/32/3730_2.png) [@phil-d-wilson](https://forums.balena.io/u/phil-d-wilson)\
**Post date:** [February 16, 2021, 9:09am UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/24 "2021-02-16T09:09:12Z")

</div>

Hey Javed,

`One possible reason is because nothing is listening on port 80 on the device`

Yes, this is the reason. You will need a service listening to port 80, for the device URL to show anything.

Phil

---

<div class="post-metadata">

**Author:** ![phil-d-wilson](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/phil-d-wilson/32/3730_2.png) [@phil-d-wilson](https://forums.balena.io/u/phil-d-wilson)\
**Post date:** [February 16, 2021, 9:11am UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/25 "2021-02-16T09:11:29Z")

</div>

Javed - could you let me know what code you are running? Is it your own or did you deploy from [hub.balena.io](http://hub.balena.io) or a motionEye GitHub repository?

---

<div class="post-metadata">

**Author:** ![jhussain7262](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@jhussain7262](https://forums.balena.io/u/jhussain7262)\
**Post date:** [February 21, 2021, 4:24am UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/28 "2021-02-21T04:24:05Z")

</div>

I used the instructions as mentioned by bkjaya1952 above.  
I am using pizerow instead of pi3.  
I used the motioneye and pulled from docker per the instructions.  
I get this error when I run it using the device public url.

Thanks,

---

<div class="post-metadata">

**Author:** ![bkjaya1952](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/bkjaya1952/32/3986_2.png) [@bkjaya1952](https://forums.balena.io/u/bkjaya1952)\
**Post date:** [February 22, 2021, 5:27am UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/29 "2021-02-22T05:27:55Z")

</div>

Hi Friend  
I didn’t try for pi zero . When creating an application and device , select the correct balena image compatible with pi zero. I have downloaded the balena image compatible with raspberry pi 3 .If the correct image can’t open the public device url , It is better to seek the assistance of balena team.To start the motionEye ,You will have to start motioneye container by running  
balena start motioneye  
or

balena restart motioneye

On the balina terminal .

---

<div class="post-metadata">

**Author:** ![ab77](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/ab77/32/2870_2.png) [@ab77](https://forums.balena.io/u/ab77)\
**Post date:** [March 8, 2021, 10:33pm UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/33 "2021-03-08T22:33:14Z")

</div>

Hi there, take a look at this [thread](https://forums.balena.io/t/motioneye-security-camera-setup/3903) for additional inspiration. the project it refers to is a little out of date, but it should give you a hint on how to make the software listen on port 80 so that device URLs will work automatically.

Alternatively, you can try [this](https://www.balena.io/blog/make-yourself-a-security-camera-system-in-30-minutes-or-less/) project, which is more up to date.

---

<div class="post-metadata">

**Author:** ![clive](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@clive](https://forums.balena.io/u/clive)\
**Post date:** [September 1, 2024, 5:37pm UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/35 "2024-09-01T17:37:13Z")

</div>

How did you solve this

---

<div class="post-metadata">

**Author:** ![mikecomer](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@mikecomer](https://forums.balena.io/u/mikecomer)\
**Post date:** [July 11, 2025, 8:43pm UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/36 "2025-07-11T20:43:17Z")

</div>

was this ever resolved? seems to match open github issue [tunnel: "500 Internal Server Error" when connecting to remote port bound to 127.0.0.1 · Issue #2366 · balena-io/balena-cli · GitHub](https://github.com/balena-io/balena-cli/issues/2366). I’ll submit a support ticket shortly as-well.

---

<div class="post-metadata">

**Author:** ![Versma](https://avatars.discourse-cdn.com/v4/letter/v/8baadc/32.png) [@Versma](https://forums.balena.io/u/Versma)\
**Post date:** [July 21, 2025, 6:56pm UTC](https://forums.balena.io/t/tunneling-socket-could-not-be-established-500/197779/37 "2025-07-21T18:56:36Z")

</div>

> [@Anton](#):
>
> Hello! Could you please help me? I have this error:
> 
> Error: " Request error: tunnel[i](https://www.cpctraining.org/driver-cpc-training/)ng socket could not be established, statusCode=500" when trying to reboot or restart container.
> 
> diagnostics tab : Some networking issues detected:  
> test\_dockerhub: Could not query Docker Hub  
> test\_balena\_registry: Could not communicate with for authentication

This error usually means a network or proxy issue. Check your proxy settings, firewall, or VPN. Ensure Docker can access external services like Docker Hub and Balena Registry.
