LS3solutions / openstream-server

GNU General Public License v3.0
201 stars 26 forks source link

Fatal: Couldn't bind RTSP server to port [48010] #7

Open Uka-Uka opened 3 years ago

Uka-Uka commented 3 years ago

Hello! I get this error message whenever I try to host a session! "Fatal: Couldn't bind RTSP server to port [48010], likely another process already bound to the port"

it looks like another process is listening on that port, so I tried 'netstat -ano | findstr 48010' via cmd and it returned nothing, so the port is actually not busy

I also have noticed that sunshine shows the same exact error when open-stream is installed on the machine, so this is maybe a conflict between them? if so how can I completely get rid of sunshine? I know it's a portable app but maybe it has some leftovers here or there, after been executed through PowerShell?

Quackdoc commented 3 years ago

Im having the same issue on a fresh install, I can confirm openstreamhost.exe is using the host

PS C:\Windows\system32> tasklist | findstr "1428"
openstreamhost.exe            1428 Console                    4     20,208 K
PS C:\Windows\system32> netstat -ano | findstr "48010"
  UDP    0.0.0.0:48010          *:*                                    1428
Uka-Uka commented 3 years ago

Yeah, that's right, open-stream is shooting itself in the foot.

Actually what I've found is that open-stream, in my case, gets that port busy then reports back that there's another process bound to it.

I was able to fix this by a little workaround, by running open-stream, scan the port via cmd while open-stream is hanging that port... netstat -ano | findstr 48010 then killing the process with this command... taskkill /f /pid **** then start hosting again, all of that must be done without closing open-stream.

However, I still can't establish a sane session with my friend through open-stream due to this error https://github.com/LS3solutions/openstream-server/issues/8, may you report back if it's working for you after this little workaround.

TsukikoChan commented 3 years ago

Same thing happens to me (win10-21h2) but only rarely; following Uka's advice above works as a stopgap fix.

m4rkoup commented 3 years ago

"Fatal: Couldn't bind RTSP server to port [48010], likely another process already bound to the port" When you get that error, it happens because the stream host for some reason didn't close its own process correctly. It happens randomly from what I can see (and as @TsukikoChan mentioned).

You can close the stream host background program using the task manager.

  1. Open Windows task manager.
  2. Seeks for the stream host "openstreamhost"
  3. Right click, finish task.

Captura de pantalla (363)_LI

After that, you can execute openstream again without getting the above problem.

Some fix to this will be added.

m4rkoup commented 3 years ago

8 is unrelated to this. @Uka-Uka

bluenote73 commented 3 years ago

This was happening to me, until I realized that the gui is not very intuitive. When I launch open-stream (or it launches on startup .. how do we toggle that...) the server is automatically running. But the buttons make it seem like you should press start. Then if you close the window, the server keeps running. So next time you open, now you're getting the error port busy. At least, since I became anal about looking at the "server up/down" status, and using the "stop / start" buttons, I haven't had this issue.

m4rkoup commented 3 years ago

Hello @bluenote73. Thanks for pointing that out!

When I launch open-stream (or it launches on startup .. how do we toggle that...)

The app automatically will launch on startup. The option isn't toggleable in the last released alpha version.

the server is automatically running

Yes, right now the primary user base is cloud gaming: "Turn on the remote machine, and connect through moonlight without logging into the remote console".

Then if you close the window, the server keeps running.

Yes, it is a windows tray app. If you close the window, the application will minimize in the tray area.
If you mean that after closing the program (right-click on the tray icon, close app), the server stills running underhood, that´s a bug that is happening randomly.

Thank you again!

Quackdoc commented 3 years ago

This is my issue too. Please add a task manager entry for autostart on boot. I think this alone would fix issue.

Also maybe change start and stop buttons to a single toggle? Love the program though

m4rkoup commented 3 years ago

Hi everyone, indeed there's an issue with the buttons. It shouldn't allow the start button to click if the stream server is running. This is the root cause of this report.
It will be fixed.

Also maybe change start and stop buttons to a single toggle?

Nice suggestion @Quackdoc

Stealphie commented 3 years ago

Had this exact issue, the fix didn't work for me.

NextGenRyo commented 3 years ago

I get this error when trying to connect with 1440p and above. 720p and 1080p connect fine. This happens when connecting with moonlight from pc. When connecting with moonlight on smart phone, I just see black screen.720 and 1080p work on the phone too.

I don't know much about streaming yet, this is my first time, but the streaming host pc is an old laptop for testing.

spidervirus commented 1 year ago

It's possible that there is a conflict between OpenStream Server and Sunshine Game Streaming Technology if both are installed on the same machine. If you suspect this is the case, you can try completely uninstalling Sunshine to see if that resolves the issue.

To uninstall Sunshine, you can simply delete the directory where it was installed. You can also search for any Sunshine-related files or directories and delete them as well.

If that doesn't resolve the issue, there may be another process running on the machine that is using the port. You can try using a tool like TCPView to see if any other applications are using port 48010.

If you still can't find the cause of the issue, you can try changing the port number that OpenStream Server uses. You can do this by modifying the config.js file in the OpenStream Server directory and changing the http_port and rtsp_port settings to different port numbers. Make sure that the new ports you choose are not already in use by another application.

Edwar2910 commented 11 months ago

I am having this error and finishing the open stream dont helped in nothing, i had used this aplication before, I uninstall it and now it doesn´t work, can someone help?

Captura de pantalla 2023-07-22 143949

Uka-Uka commented 11 months ago

I am having this error and finishing the open stream dont helped in nothing, i had used this aplication before, I uninstall it and now it doesn´t work, can someone help?

Captura de pantalla 2023-07-22 143949

This is a long-dead project. You better take a look at this one instead Sunshine

Edwar2910 commented 11 months ago

I am using this to Connect It to my Psvita, i have sunshine and this one but when i put my IP direction It tell me error, that i cannot Connect, this happened me before i installed Openstream, because a time ago i used the 2 apps and It worked, but i tried now and this doesnt work by that error