Home

Urgent help! address already in use error with alfresco-jlan

You are here

3 posts / 0 new
Last post
Urgent help! address already in use error with alfresco-jlan

Hello, Everyone,

I am trying to develop an Android samba server application with alfresco-jlan library. I always met the below error after I stop/restart samba server if client failed to connect my server, could anyone help me? Thank you very much!!!

I/System.out( 3769): NetBIOSNameServer setup error:java.net.BindException: The address is already in use
E/WiFi IP ( 3769): 192.168.2.6
E/CifsServer( 3769): ++ServerStartup++
E/CifsServer( 3769): ServerStartup, Server name:server
E/CifsServer( 3769): ++ServerStartup++, after show notification
I/System.out( 3769): [SMB] CIFS Server DROID starting
I/System.out( 3769): [SMB] Version 5.0.0, Java VM 1.1.0, OS Linux, version 2.6.29-omap1
I/System.out( 3769): [SMB] Using authenticator org.alfresco.jlan.server.auth.LocalAuthenticator, mode=USER
I/System.out( 3769): [SMB] Server timezone offset = 0hrs
I/System.out( 3769): [SMB] Dialects enabled = [Core,CorePlus,DOS LANMAN 1.0,LANMAN1.0,DOS LANMAN 2.1,LM1.2X002,LANMAN2.1,NT LM 0.12]
I/System.out( 3769): [SMB] Shares:
I/System.out( 3769): [SMB] [mile,DISK,ACLs=1,[/sdcard]] [/sdcard]
E/CifsServer( 3769): ++ configurationChanged ++
E/CifsServer( 3769): Configure ID Change is: 131075
E/CifsServer( 3769): ServerError: java.net.BindException: The address is already in use
E/CifsServer( 3769): ServerActive
E/CifsServer( 3769): ++NetBIOSNameServer ServerShutdown++
E/CifsServer( 3769): ++ configurationChanged ++
E/CifsServer( 3769): Configure ID Change is: 131075
I/System.out( 3769): [SMB] Added NTServer flag to host announcement
I/System.out( 3769): [SMB] Server error : org.alfresco.jlan.server.config.InvalidConfigurationException: Error initializing TCP-IP SMB session handler, The address is already in use
I/System.out( 3769): org.alfresco.jlan.server.config.InvalidConfigurationException: Error initializing TCP-IP SMB session handler, The address is already in use
I/System.out( 3769): at org.alfresco.jlan.smb.server.nio.NIOCifsConnectionsHandler.initializeHandler(NIOCifsConnectionsHandler.java:256)
I/System.out( 3769): at org.alfresco.jlan.smb.server.SMBServer.run(SMBServer.java:513)
I/System.out( 3769): at java.lang.Thread.run(Thread.java:1096)
E/CifsServer( 3769): ServerError: org.alfresco.jlan.server.config.InvalidConfigurationException: Error initializing TCP-IP SMB session handler, The address is already in use
I/System.out( 3769): [SMB] SMB Server shutting down ...

Re: Urgent help! About samba server with alfresco-jlan

I attach my config file. Thanks.

<?xml version="1.0" standalone="no"?>









255.255.255.255

Core,LanMan,NT

Samba Server

192.168.0.100
-->




-->








1138
-->

-->





org.alfresco.jlan.server.auth.LocalAuthenticator
USER





21










org.alfresco.jlan.smb.server.disk.JavaFileDiskDriver
/sdcard






cryptix.jce.provider.CryptixCrypto

org.alfresco.jlan.server.auth.LocalAuthenticator
USER









org.alfresco.jlan.server.auth.acl.DefaultAccessControlManager

org.alfresco.jlan.server.auth.acl.UserAccessControlParser

-->



jlan
Administrator
System administrator

Re: Urgent help! About samba server with alfresco-jlan

Also some of my source code.

Start server thread:
if ( srvConfig.numberOfServers() > 0) {

// Clear the shutdown flag

m_shutdown = false;

// Start the servers

for ( int i = 0; i < srvConfig.numberOfServers(); i++) {

srvConfig.getServer(i).startServer();
}

// Wait for shutdown request

while ( m_shutdown == false) {
try {
Thread.sleep(250);
}
catch (Exception ex) {
}
}

Stop server thread;
m_shutdown = true;
// Check if the server list is valid

try{

if ( srvConfig.numberOfServers() > 0) {

// Shutdown the servers

for ( int i = 0; i < srvConfig.numberOfServers(); i++) {


srvConfig.getServer(i).shutdownServer(false);
}

}
}catch(Exception ex){
Log.e(TAG, "Shutdown error: " + ex);
}

forums index