[ZBX-13178] Uninformative error messages in case of .sock file path being too long Created: 2017 Dec 12  Updated: 2024 Apr 10  Resolved: 2017 Dec 28

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 3.4.5rc1, 4.0.0alpha1
Fix Version/s: 3.4.6rc1, 4.0.0alpha2, 4.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Glebs Ivanovskis (Inactive) Assignee: Michael Veksler
Resolution: Fixed Votes: 0
Labels: troubleshooting
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Team: Team C
Sprint: Sprint 23, Sprint 24
Story Points: 0.25

 Description   

Steps to reproduce:

  1. Put a long SocketDir in server or proxy configuration file
  2. Try to start Zabbix

Result:
In case ipc_make_path() fails users will see "Invalid service name ..." error messages in the log file:

if (NULL == (socket_path = ipc_make_path(service_name)))
{
	*error = zbx_dsprintf(*error, "Invalid service name \"%s\".", service_name);
	goto out;
}

Expected:
What is actually a problem is that a generated socket file path proved to be too long:

 * Return value: The created path or NULL if the path exceeds unix domain     *
 *               socket path maximum length                                   *
 *                                                                            *
 ******************************************************************************/
static const char	*ipc_make_path(const char *service_name)

Generated at Sat Apr 27 06:37:49 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.