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

provide human friendly error msg for local port forwarding errors #831

Closed
eyberg opened this issue Dec 9, 2020 · 5 comments · Fixed by #1033
Closed

provide human friendly error msg for local port forwarding errors #831

eyberg opened this issue Dec 9, 2020 · 5 comments · Fixed by #1033
Assignees
Labels
dx good first issue Good for newcomers

Comments

@eyberg
Copy link
Contributor

eyberg commented Dec 9, 2020

"qemu-system-x86_64: Could not set up host forwarding rule 'tcp::8080:8080'"

we should explicitly tell the user that there is probably something listening on this port already if un-privileged - I would almost go as far as to say we should show which process is listening on it

@eyberg eyberg added the dx label Dec 9, 2020
@eyberg eyberg added the good first issue Good for newcomers label May 7, 2021
@arknable
Copy link
Contributor

arknable commented May 7, 2021

@eyberg how to reproduce this ?

@eyberg
Copy link
Contributor Author

eyberg commented May 7, 2021

without running a tap - try running this example https://ops.city/ on the same port twice - you should get this error message complaining that qemu can't listen on the same port since something else is already listening on it - what we'd like is a more developer friendly message - "something is already listening on this port" - we could even go further and show the user what process id it is

@arknable
Copy link
Contributor

arknable commented May 9, 2021

This is what I output from port checking:

Port 8083 is being used by other application (PID 725270)

currently the checking is using lsof -i that should be available for linux and osx. will add windows support after I installed windows.

@fabioDMFerreira
Copy link
Contributor

Currently, ops isn't supporting windows. Alternatively, windows users can use ops in WSL.

@arknable
Copy link
Contributor

arknable commented May 9, 2021

ah ok, will leave windows for now.

This was linked to pull requests May 10, 2021
fabioDMFerreira pushed a commit that referenced this issue May 14, 2021
(closes #831 )

* Added ports pre checking

To find out whether they are being used by other applications.

* Check which process is using target port, if any

* Moved excludeWhitespace() function to util package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dx good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants