Bug 1791996

Summary: TigerVNC should not arbitrarily start on unspecified ports
Product: Red Hat Enterprise Linux 7 Reporter: Joe Wright <jwright>
Component: tigervncAssignee: Jan Grulich <jgrulich>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.7CC: amike, jkoten, mkrajnak, riehecky, tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tigervnc-1.8.0-20.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2174398 (view as bug list) Environment:
Last Closed: 2020-09-29 19:28:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1789022, 2174398    

Description Joe Wright 2020-01-16 20:20:07 UTC
Description of problem:
- TigerVNC should not start on unspecified ports if it fails to start on the defined port

Version-Release number of selected component (if applicable):
tigervnc-1.3.1-9.el7

How reproducible:
100%. This behavior was introduced by ERRATA RHBA-2016-2237

Steps to Reproduce:
1. configure VNC to start on a port that is already in use
2. Observe that it goes through ports until it finds one that is available to start on
3.

Actual results:
VNC opens on the first available port it can find when it fails on the defined port

Expected results:
VNC should not be opening on the first port it can find when it cannot open on the specified port

Additional info:

Comment 8 Martin Krajnak 2020-04-27 14:09:14 UTC
tigervnc-1.8.0-21.el7.x86_64

1.Reproducer
[test@beaker-tigervnc-develop-325 tigervnc]$ vncserver :1      

New 'beaker-tigervnc-develop-325:1 (test)' desktop is beaker-tigervnc-develop-325:1

Starting applications specified in /home/test/.vnc/xstartup
Log file is /home/test/.vnc/beaker-tigervnc-develop-325:1.log

[test@beaker-tigervnc-develop-325 tigervnc]$ vncserver :1
A VNC server is already running as :1

Result:
I was able to connect to the session via vncviewer :1.


2.Reproducer
[test@beaker-tigervnc-develop-325 tigervnc]$ vncserver :1 -fallbacktofreeport
A VNC server is already running as :1
Using port :2 as fallback

New 'beaker-tigervnc-develop-325:2 (test)' desktop is beaker-tigervnc-develop-325:2

Starting applications specified in /home/test/.vnc/xstartup
Log file is /home/test/.vnc/beaker-tigervnc-develop-325:2.log

Result:
I was able to connect to the session via vncviewer :2.

Comment 10 errata-xmlrpc 2020-09-29 19:28:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: tigervnc security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:3875