Bug 2010992

Summary: When ports that are in use are used to update a DS instance the error message is not helpful -use error that is in the logs
Product: Red Hat Directory Server Reporter: Gilbert Kimetto <gkimetto>
Component: cockpit-389-dsAssignee: LDAP Maintainers <idm-ds-dev-bugs>
Status: NEW --- QA Contact: LDAP QA Team <idm-ds-qe-bugs>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 12.0CC: idm-ds-dev-bugs, mreynolds, vashirov
Target Milestone: ---Keywords: Triaged
Target Release: dirsrv-12.3   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description Gilbert Kimetto 2021-10-05 18:00:38 UTC
Description of problem:

When ports that are in use are used to update a DS instance the error message is not helpful -use error that is in the logs
Version-Release number of selected component (if applicable):


How reproducible:

Always

Steps to Reproduce:
1. Create 2 DS Instances on the Webconsole
2. Update the second instance to use the ports that are currently in use by the
   1st instance
3. Follow the prompt to restart the instance for the changes to take effect. 

Actual results:

The error is displayed which is not helpful:

Danger alert:
Error during instance restart operation - Command '['systemctl', 'start', 'dirsrv@dscre']' returned non-zero exit status 1.


Expected results:
The error that is logged should be displayed in the Web Console as its more helpful to the user

ERR - createprlistensockets - PR_Bind() on All Interfaces port 389 failed: Netscape Portable Runtime error -5982 (Local Network address is in use.)


Additional info:

the instance is irrecoverable the message 
This server instance is not running, either start it from the Actions dropdown menu, or choose a different instance

Is displayed unable to go back and update or change anything

Comment 1 Viktor Ashirov 2023-07-28 08:47:17 UTC
I think we should a check if the new port is already taken before we even attempt to change it.