]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
remote: improve error message when no URI is set
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 17 Apr 2025 17:06:02 +0000 (18:06 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 25 Apr 2025 10:18:07 +0000 (11:18 +0100)
When no URI is set we try to guess what daemon to connect to by looking
for any listening sockets. If there are no listening sockets, however,
we don't even know what daemon the user expected to connect to. The
error message in this case is not especially clear

This tweaks the error message to try to make the problem easier to
understand.

Resolves: https://issues.redhat.com/browse/RHEL-87177
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/remote/remote_sockets.c

index 8d403b6f014a26e6de354e0d3496108a6bde59dc..4e6d19098c177ac16510262d4cd21eb714ae0d73 100644 (file)
@@ -398,7 +398,7 @@ remoteGetUNIXSocket(remoteDriverTransport transport,
 
         if (!direct_sock_name) {
             virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
-                           _("Cannot use direct socket mode if no URI is set. For more information see https://libvirt.org/kbase/failed_connection_after_install.html"));
+                           _("No URI is provided and cannot identify any listening daemon socket path to attempt to connect to. Please ensure the expected daemon sockets are active and/or provide an explicit URI. For more information see https://libvirt.org/kbase/failed_connection_after_install.html"));
             return NULL;
         }