cancel
Showing results for 
Search instead for 
Did you mean: 

FirstFoundationClient and BindException on port 50501

maxmil
Champ in-the-making
Champ in-the-making
I am having a go at setting up the Labs 3c SDK.

The first problem i ran into was the documented missing jlan.jar.

I copied alfresco-jlan-embedded from the alfresco webclient war to the SDK Alfresco embedded project and put it on the build path.

Now when i try to run the client i get the following error

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'avmRemoteService' defined in class path resource [alfresco/remote-services-context.xml]: Invocation of init method failed; nested exception is java.rmi.server.ExportException: Port already in use: 50501; nested exception is: 
   java.net.BindException: Address already in use
Caused by: java.rmi.server.ExportException: Port already in use: 50501; nested exception is:
   java.net.BindException: Address already in use

The process using port 50501 is my alfresco labs server.

Any recommendations on how to debug or solve this problem would be greatly appreciated.
5 REPLIES 5

maxmil
Champ in-the-making
Champ in-the-making
Smiley Surprisedops:

As the wiki says you must stop your alfresco server in order to run the FirstFoundationClient.

IMPORTANT NOTE - Alfresco CE tomcat can not be running at the same time as the samples. Shutdown tomcat and run the example. Then start Alfresco Tomcat again from programs menu, log in and you should see the results of the samples that ran. For instance, after running the FirstFoundationClient when you start Alfresco CE again and log in, under the Company Home space you will see the content created by the example.

toze
Champ in-the-making
Champ in-the-making
Its possible to change this?
to run the sample with alfresco running?

mrogers
Star Contributor
Star Contributor
http://wiki.alfresco.com/wiki/Port_numbers

Yes its possible.   You will need to change your alfresco-global.properties to set the properties that will clash,  these will be the tcp port numbers used by alfresco and also the 4 ports uses by tomcat (such as 8080). 
You will also need to change your database settings to have a separate database schema, one for each instance.  

After that you can have multiple instances of Alfresco on one box.

joe_l3
Confirmed Champ
Confirmed Champ
Alfresco 3.0   >>> change repositories.properties.
Alfresco 3.2+ >>> change alfresco-global.properties
Here an example:

# RMI service ports for the individual services.
# These seven services are available remotely.
#
# Assign individual ports for each service for best performance
# or run several services on the same port. You can even run everything on 50500 if needed.
#
# Select 0 to use a random unused port.
#
avm.rmi.service.port=50551
avmsync.rmi.service.port=50552
attribute.rmi.service.port=50553
authentication.rmi.service.port=50554
repo.rmi.service.port=50555
action.rmi.service.port=50556
wcm-deployment-receiver.rmi.service.port=50557

toze
Champ in-the-making
Champ in-the-making
Thanks for both replys