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
|
// 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
|
// Check for a server comment
|
||||||
@@ -2251,12 +2267,9 @@ public class ServerConfiguration
|
|||||||
|
|
||||||
if (nbName != null)
|
if (nbName != null)
|
||||||
domainName = nbName.getName();
|
domainName = nbName.getName();
|
||||||
else
|
|
||||||
throw new AlfrescoRuntimeException("Failed to find local domain/workgroup name");
|
|
||||||
}
|
}
|
||||||
catch (IOException ex)
|
catch (IOException ex)
|
||||||
{
|
{
|
||||||
throw new AlfrescoRuntimeException("Failed to determine local domain/workgroup");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,6 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.filesys.smb.mailslot;
|
package org.alfresco.filesys.smb.mailslot;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.alfresco.filesys.netbios.NetBIOSName;
|
import org.alfresco.filesys.netbios.NetBIOSName;
|
||||||
import org.alfresco.filesys.smb.ServerType;
|
import org.alfresco.filesys.smb.ServerType;
|
||||||
import org.alfresco.filesys.smb.TransactionNames;
|
import org.alfresco.filesys.smb.TransactionNames;
|
||||||
@@ -321,9 +323,19 @@ public abstract class HostAnnouncer extends Thread
|
|||||||
sleepTime = sleepNormal;
|
sleepTime = sleepNormal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch ( IOException ex)
|
||||||
|
{
|
||||||
|
// Debug
|
||||||
|
|
||||||
|
if (m_shutdown == false)
|
||||||
|
{
|
||||||
|
logger.error("HostAnnouncer error", ex);
|
||||||
|
logger.error(" Check <broadcast> setting in file-servers.xml");
|
||||||
|
}
|
||||||
|
m_shutdown = true;
|
||||||
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Debug
|
// Debug
|
||||||
|
|
||||||
if (m_shutdown == false)
|
if (m_shutdown == false)
|
||||||
|
Reference in New Issue
Block a user