mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added defaulting of domain/workgroup name to 'WORKGROUP' when the domain cannot
be resolved via network broadcast. Also outputs a message to indicate the domain was defaulted and possible causes (firewall settings/broadcast mask). Added hint message to check the broadcast mask when the host announcer fails with an IOException. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2185 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -590,7 +590,23 @@ public class ServerConfiguration
|
||||
{
|
||||
// Get the local domain/workgroup name
|
||||
|
||||
setDomainName(getLocalDomainName());
|
||||
String localDomain = getLocalDomainName();
|
||||
|
||||
if ( localDomain == null && getPlatformType() != PlatformType.WINDOWS)
|
||||
{
|
||||
// Use a default domain/workgroup name
|
||||
|
||||
localDomain = "WORKGROUP";
|
||||
|
||||
// Output a warning
|
||||
|
||||
logger.error("Failed to get local domain/workgroup name, using default of " + localDomain);
|
||||
logger.error("(This may be due to firewall settings or incorrect <broadcast> setting)");
|
||||
}
|
||||
|
||||
// Set the local domain/workgroup that the CIFS server belongs to
|
||||
|
||||
setDomainName( localDomain);
|
||||
}
|
||||
|
||||
// Check for a server comment
|
||||
@@ -2251,12 +2267,9 @@ public class ServerConfiguration
|
||||
|
||||
if (nbName != null)
|
||||
domainName = nbName.getName();
|
||||
else
|
||||
throw new AlfrescoRuntimeException("Failed to find local domain/workgroup name");
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Failed to determine local domain/workgroup");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user