Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sunshine.exe retries every 3 seconds while sunshinesvc.exe runs in the background #3578

Open
2 tasks done
GustafXTT opened this issue Jan 22, 2025 · 12 comments
Open
2 tasks done

Comments

@GustafXTT
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is your issue described in the documentation?

  • I have read the documentation

Is your issue present in the latest beta/pre-release?

This issue is present in the latest pre-release

Describe the Bug

Sunshine failed to start while executing sunshine.exe. Failed to open WebUI.
A sunshinesvc.exe is running in the background, which contains a Sunshine Service.
A sunshine.exe keeps trying to start and fails every 3 seconds in the background.

Expected Behavior

No response

Additional Context

No response

Host Operating System

Windows

Operating System Version

24H2 26100.2894

Architecture

amd64/x86_64

Sunshine commit or version

v2025.122.24544

Package

Windows - installer (recommended)

GPU Type

NVIDIA

GPU Model

RTX 3070 Mobile

GPU Driver/Mesa Version

561.09

Capture Method

None

Config

<EMPTY>

Apps

Relevant log output

./sunshine.exe
[2025-01-22 15:44:35.828]: Info: Sunshine version: v2025.122.24544
[2025-01-22 15:44:35.828]: Info: Package Publisher: LizardByte
[2025-01-22 15:44:35.828]: Info: Publisher Website: https://app.lizardbyte.dev
[2025-01-22 15:44:35.828]: Info: Get support: https://app.lizardbyte.dev/support
[2025-01-22 15:44:35.829]: Info: Provided workaround settings for SettingsManager:
{
  "hdr_blank_delay": null
}
[2025-01-22 15:44:35.832]: Info: Currently available display devices:
[
  {
    "device_id": "{97a2cf0b-92a9-53c9-991c-279f8bf5e790}",
    "display_name": "\\\\.\\DISPLAY1",
    "friendly_name": "VX2758-2K-PRO",
    "info": {
      "hdr_state": "Enabled",
      "origin_point": {
        "x": 0,
        "y": 0
      },
      "primary": true,
      "refresh_rate": {
        "type": "rational",
        "value": {
          "denominator": 1000,
          "numerator": 184999
        }
      },
      "resolution": {
        "height": 1440,
        "width": 2560
      },
      "resolution_scale": {
        "type": "rational",
        "value": {
          "denominator": 100,
          "numerator": 100
        }
      }
    }
  }
]
[2025-01-22 15:44:36.073]: Info: nvprefs: No need to modify application profile settings
[2025-01-22 15:44:36.073]: Info: nvprefs: Changed OGL_CPL_PREFER_DXPRESENT to OGL_CPL_PREFER_DXPRESENT_PREFER_ENABLED for base profile
[2025-01-22 15:44:36.121]: Info: Compiling shaders...
[2025-01-22 15:44:36.142]: Info: System tray created
[2025-01-22 15:44:36.221]: Info: Compiled shaders
[2025-01-22 15:44:36.234]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-01-22 15:44:36.234]: Info: Trying encoder [nvenc]
[2025-01-22 15:44:36.567]: Info:
Device Description : NVIDIA GeForce RTX 3070 Laptop GPU
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x0000249D
Device Video Mem   : 8020 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8138 MiB
Feature Level      : 0x0000B100
Capture size       : 2560x1440
Offset             : 0x0
Virtual Desktop    : 2560x1440
[2025-01-22 15:44:36.568]: Info: Active GPU has HAGS enabled
[2025-01-22 15:44:36.568]: Info: Using realtime GPU priority
[2025-01-22 15:44:36.568]: Info:
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 10
Red Primary        : [0.660156,0.326172]
Green Primary      : [0.275391,0.644531]
Blue Primary       : [0.145508,0.0556641]
White Point        : [0.3125,0.329102]
Min Luminance      : 0.4184 nits
Max Luminance      : 436.208 nits
Max Full Luminance : 436.208 nits
[2025-01-22 15:44:36.571]: Info: Desktop resolution [2560x1440]
[2025-01-22 15:44:36.571]: Info: Desktop format [DXGI_FORMAT_R16G16B16A16_FLOAT]
[2025-01-22 15:44:36.571]: Info: Display refresh rate [184.999Hz]
[2025-01-22 15:44:36.571]: Info: Requested frame rate [60fps]
[2025-01-22 15:44:36.571]: Info: Creating encoder [h264_nvenc]
[2025-01-22 15:44:36.571]: Info: Color coding: SDR (Rec. 601)
[2025-01-22 15:44:36.571]: Info: Color depth: 8-bit
[2025-01-22 15:44:36.572]: Info: Color range: JPEG
[2025-01-22 15:44:36.624]: Info: NvEnc: created encoder H.264 P1 two-pass rfi
[2025-01-22 15:44:36.654]: Info: Creating encoder [hevc_nvenc]
[2025-01-22 15:44:36.655]: Info: Color coding: SDR (Rec. 601)
[2025-01-22 15:44:36.655]: Info: Color depth: 8-bit
[2025-01-22 15:44:36.655]: Info: Color range: JPEG
[2025-01-22 15:44:36.706]: Info: NvEnc: created encoder HEVC P1 two-pass rfi
[2025-01-22 15:44:36.737]: Info: Creating encoder [av1_nvenc]
[2025-01-22 15:44:36.737]: Info: Color coding: SDR (Rec. 601)
[2025-01-22 15:44:36.737]: Info: Color depth: 8-bit
[2025-01-22 15:44:36.737]: Info: Color range: JPEG
[2025-01-22 15:44:36.761]: Error: NvEnc: encoding format is not supported by the gpu
[2025-01-22 15:44:36.770]: Info: Creating encoder [h264_nvenc]
[2025-01-22 15:44:36.770]: Info: Color coding: SDR (Rec. 601)
[2025-01-22 15:44:36.770]: Info: Color depth: 8-bit
[2025-01-22 15:44:36.770]: Info: Color range: JPEG
[2025-01-22 15:44:36.824]: Info: NvEnc: created encoder H.264 P1 yuv444 two-pass rfi
[2025-01-22 15:44:37.059]: Info:
Device Description : NVIDIA GeForce RTX 3070 Laptop GPU
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x0000249D
Device Video Mem   : 8020 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8138 MiB
Feature Level      : 0x0000B100
Capture size       : 2560x1440
Offset             : 0x0
Virtual Desktop    : 2560x1440
[2025-01-22 15:44:37.059]: Info: Active GPU has HAGS enabled
[2025-01-22 15:44:37.059]: Info: Using realtime GPU priority
[2025-01-22 15:44:37.059]: Info:
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 10
Red Primary        : [0.660156,0.326172]
Green Primary      : [0.275391,0.644531]
Blue Primary       : [0.145508,0.0556641]
White Point        : [0.3125,0.329102]
Min Luminance      : 0.4184 nits
Max Luminance      : 436.208 nits
Max Full Luminance : 436.208 nits
[2025-01-22 15:44:37.061]: Info: Desktop resolution [2560x1440]
[2025-01-22 15:44:37.062]: Info: Desktop format [DXGI_FORMAT_R16G16B16A16_FLOAT]
[2025-01-22 15:44:37.062]: Info: Display refresh rate [184.999Hz]
[2025-01-22 15:44:37.062]: Info: Requested frame rate [60fps]
[2025-01-22 15:44:37.062]: Info: Creating encoder [hevc_nvenc]
[2025-01-22 15:44:37.062]: Info: Color coding: SDR (Rec. 709)
[2025-01-22 15:44:37.062]: Info: Color depth: 10-bit
[2025-01-22 15:44:37.062]: Info: Color range: JPEG
[2025-01-22 15:44:37.199]: Info: NvEnc: created encoder HEVC P1 yuv444 10-bit two-pass rfi
[2025-01-22 15:44:37.257]: Info:
[2025-01-22 15:44:37.257]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025-01-22 15:44:37.257]: Info:
[2025-01-22 15:44:37.257]: Info: Found H.264 encoder: h264_nvenc [nvenc]
[2025-01-22 15:44:37.257]: Info: Found HEVC encoder: hevc_nvenc [nvenc]
[2025-01-22 15:44:37.257]: Info: Open the Web UI to set your new username and password and getting started
[2025-01-22 15:44:37.257]: Fatal: Couldn't bind RTSP server to port [48010], 以一种访问权 限不允许的方式做了一个访问套接字的尝试。(Translation: An attempt was made to access a socket in a way that the access permissions do not allow.)
[2025-01-22 15:44:37.258]: Info: File C:\Program Files\Sunshine\config\sunshine_state.json doesn't exist
terminate called recursively
terminate called after throwing an instance of 'boost::wrapexcept<boost::system::system_error>
@ReenigneArcher
Copy link
Member

If the service is running, you shouldn't run sunshine manually

@GustafXTT
Copy link
Author

Pardon me if I didn't make it clear, the service was not running before I manually executed Sunshine.

A sunshinesvc.exe is running in the background, which contains a Sunshine Service.
A sunshine.exe keeps trying to start and fails every 3 seconds in the background.

It means the situation after I tried to run Sunshine.

@ReenigneArcher
Copy link
Member

Something is using a port that Sunshine needs, maybe you have multiple instances running?

I would just restart your computer.

@GustafXTT
Copy link
Author

A reboot didn't fix the problem.

@GustafXTT
Copy link
Author

Just did some tests and found no process using port 47990, maybe it's not a port conflict issue.

@ReenigneArcher
Copy link
Member

The logs indicate something else is using a different port.

[2025-01-22 15:44:37.257]: Fatal: Couldn't bind RTSP server to port [48010]

@GustafXTT
Copy link
Author

The information after this log, which I provided a translation before:

An attempt was made to access a socket in a way that the access permissions do not allow.

Could it be a permission issue?
If not then I have no idea :(

@ReenigneArcher
Copy link
Member

Could it be a permission issue?

Yes, I think there are also other permission issues.

[2025-01-22 15:44:37.258]: Info: File C:\Program Files\Sunshine\config\sunshine_state.json doesn't exist
terminate called recursively
terminate called after throwing an instance of 'boost::wrapexcept<boost::system::system_error>

Running Sunshine as a service should prevent permission issues like this though, since it runs as the SYSTEM account.

@GustafXTT
Copy link
Author

Trying to solve the permission issue:
Give both sunshinesvc.exe and sunshine.exe administration permission was not working.
Reinstalling an old 0.20.0 version / latest beta version of Sunshine was not working either.
Manually running the exe file & Starting the SunshineService from the task manager's services panel were working neither.

@jvvilar
Copy link

jvvilar commented Jan 24, 2025

Adding that I'm experiencing the same issue. Sunshine service is running and the application keeps trying to start. I have already searched for anything using the 48010 port and found nothing. (Both netstat -ano | findstr :48010 as well as Get-Process -Id (Get-NetTCPConnection -LocalPort 48010).OwningProcess)

My log ends slightly differently though:

[2025-01-24 11:34:02.760]: Info: Open the Web UI to set your new username and password and getting started
[2025-01-24 11:34:02.760]: Fatal: Couldn't bind RTSP server to port [48010], An attempt was made to access a socket in a way forbidden by its access permissions
[2025-01-24 11:34:02.760]: Info: File C:\Program Files\Sunshine\config\sunshine_state.json doesn't exist
[2025-01-24 11:34:02.871]: Info: nvprefs: Restored OGL_CPL_PREFER_DXPRESENT for base profile
[2025-01-24 11:34:03.541]: Info: Registered Sunshine mDNS service
[2025-01-24 11:34:03.541]: Info: Unregistered Sunshine mDNS service

@X3ZvaWQ
Copy link

X3ZvaWQ commented Jan 27, 2025

I encountered the same problem. My computer has Hyper-V enabled.

@LouKordos
Copy link

Same issue here, I also get

Fatal: Couldn't bind RTSP server to port [48010], An attempt was made to access a socket in a way forbidden by its access permissions
[2025-01-30 09:53:53.277]: Info: File C:\Program Files\Sunshine\config\sunshine_state.json doesn't exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants