Try to kill the process (ps -ef | grep RemoteCacheServerFactory) and then
start again. Add your application classes to the classpath and restart. It's
a long time since I messed around with RMI config, so I'm a bit rusty.

On 20 April 2010 14:33, gerald ternola <zerlite2...@yahoo.com> wrote:

> Hi Al,       Sorry for the first reply.      I accidentally modified the
> remote.cache.ccf, and notice that in the documentation the registry.port and
> remote.cache.service.port should be the same, with my case, it was causing a
> problem when this two value is the same. It was working at my test.
> Any idea with this????
> >>> sh ./startRemoteCache.sh /../conf/remote.cache.ccf
> 50000////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////#
> Registry used to register and provide the# IRemoteCacheService
> service.registry.host=peitlab01.dallab.design.ti.comregistry.port=50000#
> call back port to local caches.remote.cache.service.port=50005# rmi socket
> factory timeoutremote.cache.rmiSocketFactoryTimeoutMillis=5000# cluster
> settingremote.cluster.LocalClusterConsistency=trueremote.cluster.AllowClusterGet=true
> # sets the default aux value for any non configured
> cachesjcs.default=DC,RClusterjcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributesjcs.default.cacheattributes.MaxObjects=1000
> # CACHE REGIONS AVAILABLE# Regions preconfigured for caching# PRE-DEFINED
> CACHE
> REGIONSjcs.region.testCache2=DC,RClusterjcs.region.testCache2.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributesjcs.region.testCache2.cacheattributes.MaxObjects=1000jcs.region.testCache2.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCachejcs.region.testCache2.cacheattributes.UseMemoryShrinker=falsejcs.region.testCache2.cacheattributes.MaxMemoryIdleTimeSeconds=3600jcs.region.testCache2.cacheattributes.ShrinkerIntervalSeconds=60jcs.region.testCache2.cacheattributes.MaxSpoolPerRun=500jcs.region.testCache2.elementattributes=org.apache.jcs.engine.ElementAttributesjcs.region.testCache2.elementattributes.IsEternal=false
> # AUXILIARY CACHES AVAILABLE# Primary Disk Cache -- faster than the rest
> because of memory key
> storagejcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactoryjcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributesjcs.auxiliary.DC.attributes.DiskPath=/home/a0282562/JCS/remotecache1jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000000jcs.auxiliary.DC.attributes.MaxKeySize=1000000jcs.auxiliary.DC.attributes.MaxRecycleBinSize=5000jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=300000jcs.auxiliary.DC.attributes.ShutdownSpoolTimeLimit=60
> # ##############################################################
> ################# AUXILIARY CACHES AVAILABLE ################# server to
> update for clustering -- remote.cache1.ccf(1101)  and
> remote.cache3.ccf(1103)jcs.auxiliary.RCluster=org.apache.jcs.auxiliary.remote.RemoteCacheFactoryjcs.auxiliary.RCluster.attributes=org.apache.jcs.auxiliary.remote.RemoteCacheAttributesjcs.auxiliary.RCluster.attributes.RemoteTypeName=CLUSTERjcs.auxiliary.RCluster.attributes.RemoveUponRemotePut=falsejcs.auxiliary.RCluster.attributes.ClusterServers=peitlab01.dallab.design.ti.com:50001
> jcs.auxiliary.RCluster.attributes.GetOnly=falsejcs.auxiliary.RCluster.attributes.LocalClusterConsistency=true
>
> ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
>
> Sincerely,Gerald
> --- On Tue, 4/20/10, Al Forbes <forbes...@googlemail.com> wrote:
>
> From: Al Forbes <forbes...@googlemail.com>
> Subject: Re: Need help in setting up RMI Server as Standalone
> To: "JCS Users List" <jcs-users@jakarta.apache.org>
> Date: Tuesday, April 20, 2010, 8:23 PM
>
> This makes me think that the RMI servier is running correctly (you should
> be
> able to telnet to the port), and that the problem is with your classpath.
> Try adding the path to the data objects that you store in the cache to the
> classpath.
>
> Regards
> Al
>
> On 20 April 2010 13:19, gerald ternola <zerlite2...@yahoo.com> wrote:
>
> >
> > Hi Al,       when i run it again just now, it tells that the port is
> being
> > used,
> > peitlab01.dallab.design.ti.com[50]% sh ./startRemoteCache.sh
> > /../conf/remote.cache.ccf 50000Classpath =
> >
> .:./../conf:/usr/java/jcs/conf:/usr/java/jcs/conf/:./../lib/commons-logging-1.1.1.jar:./../lib/concurrent.jar:./../lib/jcs-1.3.jarStarting
> > the registry on port 50005-Xms128m -Xmx512m -verbose:gc
> > -XX:+PrintTenuringDistribution
> > -Djava.security.policy=./../conf/cache.policyApr 20, 2010 6:10:35 AM
> > org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory
> startupINFO:
> > ConfigFileName = [/../conf/remote.cache.ccf]Apr 20, 2010 6:10:35 AM
> > org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory
> startupINFO:
> > Creating server with these attributes  remoteHost = null remotePort =
> > 0 cacheName = null removeUponRemotePut = true getOnly =
> > false allowClusterGet = true localClusterConsistency =
> > true getConfigFileName = /../conf/remote.cache.ccfException in thread
> "main"
> > java.rmi.server.ExportException: Port already in use: 50005; nested
> > exception
> >  is:         java.net.BindException: Address already in use        at
> > sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:310)
> at
> > sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:218)
> >  at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:393)
> >    at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:129)        at
> > sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:190)
> >    at
> >
> java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:293)
> >      at
> >
> java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:235)
> >      at
> > java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:133)
> >    at
> >
> org.apache.jcs.auxiliary.remote.server.RemoteCacheServer.<init>(RemoteCacheServer.java:111)
> >      at
> >
> org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory.startup(RemoteCacheServerFactory.java:172)
> >      at
> >
> org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory.main(RemoteCacheServerFactory.java:342)Caused
> > by: java.net.BindException: Address already in use        at
> > java.net.PlainSocketImpl.socketBind(Native Method)        at
> > java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)        at
> > java.net.ServerSocket.bind(ServerSocket.java:319)        at
> > java.net.ServerSocket.<init>(ServerSocket.java:185)        at
> > java.net.ServerSocket.<init>(ServerSocket.java:97)        at
> >
> org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory$1.createServerSocket(RemoteCacheServerFactory.java:119)
> >      at
> > sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:649)
> >    at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:299)
> >  ... 10 more
> > --- On Tue, 4/20/10, Al Forbes <forbes...@googlemail.com> wrote:
> >
> > From: Al Forbes <forbes...@googlemail.com>
> > Subject: Re: Need help in setting up RMI Server as Standalone
> > To: "JCS Users List" <jcs-users@jakarta.apache.org>
> > Date: Tuesday, April 20, 2010, 6:57 PM
> >
> > Hi Gerald,
> >
> > I can't see too much wrong with that.
> >
> > Did you try with a simpler security file?
> >
> > grant {
> >     // Allow everything for now
> >     permission java.security.AllPermission;
> > };
> >
> > On 20 April 2010 09:15, gerald ternola <zerlite2...@yahoo.com> wrote:
> >
> > >
> > > Hi,
> > >
> > > We had already a running RMI Server running in a tomcat, but our
> Project
> > > Manager
> > > decline to use it because it will be run in a load sharing facility
> (LSF)
> > > and we
> > > can’t afford to run multiple tomcat in an LSF cluster, so we are trying
> > to
> > > configure a standalone RMI Server, but run in a trouble starting it
> > > up.
> > >
> > > I’m a newbie in JCS platform. We had a configuration below and the
> error
> > > that we
> > > got during starting up the server.
> > >
> > >
> > >
> > >
> > > Directory
> > > Structure
> > >
> > > conf
> > >
> > > remote.cache.ccf
> > >
> > > cache.policy
> > >
> > > lib
> > >
> > > commons-logging.1.1.1.jar
> > >
> > > concurrent.jar
> > >
> > > jcs-1.3.jar
> > >
> > > scripts
> > >
> > > startRemoteCache.sh
> > >
> > >
> > >
> > > remote.cache.ccf
> > > file
> > >
> > > # Registry used to register and
> > > provide the
> > > # IRemoteCacheService
> > > service.
> > > registry.host=peitlab01.dallab.design.ti.com
> > > registry.port=50005
> > > # call back port to local
> > > caches.
> > > remote.cache.service.port=50005
> > > # rmi socket factory
> > > timeout
> > > remote.cache.rmiSocketFactoryTimeoutMillis=5000
> > > # cluster
> > > setting
> > > remote.cluster.LocalClusterConsistency=true
> > > remote.cluster.AllowClusterGet=true
> > >
> > > # sets the default aux value for any
> > > non configured caches
> > > jcs.default=DC
> > >
> >
> jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
> > > jcs.default.cacheattributes.MaxObjects=1000
> > >
> > > # CACHE REGIONS
> > > AVAILABLE
> > > # Regions preconfigured for
> > > caching
> > > # PRE-DEFINED CACHE
> > > REGIONS
> > > jcs.region.testCache2=DC
> > >
> > >
> >
> jcs.region.testCache2.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
> > > jcs.region.testCache2.cacheattributes.MaxObjects=1000
> > >
> > >
> >
> jcs.region.testCache2.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
> > > jcs.region.testCache2.cacheattributes.UseMemoryShrinker=false
> > > jcs.region.testCache2.cacheattributes.MaxMemoryIdleTimeSeconds=3600
> > > jcs.region.testCache2.cacheattributes.ShrinkerIntervalSeconds=60
> > > jcs.region.testCache2.cacheattributes.MaxSpoolPerRun=500
> > >
> > >
> >
> jcs.region.testCache2.elementattributes=org.apache.jcs.engine.ElementAttributes
> > > jcs.region.testCache2.elementattributes.IsEternal=false
> > >
> > > # AUXILIARY CACHES
> > > AVAILABLE
> > > # Primary Disk Cache -- faster than
> > > the rest because of memory key storage
> > >
> > >
> >
> jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
> > >
> > >
> >
> jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
> > > jcs.auxiliary.DC.attributes.DiskPath=/home/a0282562/JCS
> > > jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000000
> > > jcs.auxiliary.DC.attributes.MaxKeySize=1000000
> > > jcs.auxiliary.DC.attributes.MaxRecycleBinSize=5000
> > > jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=300000
> > > jcs.auxiliary.DC.attributes.ShutdownSpoolTimeLimit=60
> > >
> > >
> > >
> > > cache.policy
> > >
> > > grant {
> > >     permission
> > > java.security.AllPermission;
> > > };
> > >
> > >
> > > grant codeBase
> > > "file:g:/dev/jakarta-turbine-jcs/target/classes/*"
> > > {
> > >     permission
> > > java.security.AllPermission;
> > > };
> > >
> > > grant codeBase
> > > "file:g:/dev/jakarta-turbine-jcs/src/conf/*" {
> > >     permission
> > > java.security.AllPermission;
> > > };
> > >
> > > grant codeBase
> > > "file:g:/dev/jakarta-turbine-jcs/src/conf/scripts/*"
> > > {
> > >     permission
> > > java.security.AllPermission;
> > > };
> > >
> > > grant codeBase
> > > "file:g:/dev/jakarta-turbine-jcs/*" {
> > >     permission
> > > java.security.AllPermission;
> > > };
> > >
> > > grant codeBase "file:/G:/*"
> > > {
> > >     permission
> > > java.security.AllPermission;
> > > };
> > >
> > >
> > >
> > > startRemote.sh
> > >
> > > # Licensed to the Apache Software
> > > Foundation (ASF) under one
> > > # or more contributor license
> > > agreements.  See the NOTICE file
> > > # distributed with this work for
> > > additional information
> > > # regarding copyright ownership.
> > > The ASF licenses this file
> > > # to you under the Apache License,
> > > Version 2.0 (the
> > > # "License"); you may not use this
> > > file except in compliance
> > > # with the License.  You may obtain
> > > a copy of the License at
> > > #
> > > #
> > > http://www.apache.org/licenses/LICENSE-2.0
> > > #
> > > # Unless required by applicable law
> > > or agreed to in writing,
> > > # software distributed under the
> > > License is distributed on an
> > > # "AS IS" BASIS, WITHOUT WARRANTIES
> > > OR CONDITIONS OF ANY
> > > # KIND, either express or implied.
> > > See the License for the
> > > # specific language governing
> > > permissions and limitations
> > > # under the
> > > License.
> > > # !
> > > /bin/sh
> > >
> > > export
> > > CLASSPATH=.
> > > export
> > > CLASSPATH=${CLASSPATH}:`dirname
> > > $0`/../conf:/usr/java/jcs/conf:/usr/java/jcs/conf/
> > >
> > > THISDIR=`dirname
> > > $0`
> > >
> > > for i in `find ${THISDIR}/../lib
> > > -name "*.jar" `
> > > do
> > >         export
> > > CLASSPATH=${CLASSPATH}:$i
> > > done
> > > echo "Classpath =
> > > ${CLASSPATH}"
> > >
> > > # START THE
> > > REGISTRY
> > > if [ "$2" != "" ];
> > > then
> > >   echo "Starting the registry on
> > > port $2"
> > >   rmiregistry $2
> > > &
> > > else
> > >   echo "Not starting registry, since
> > > no port was supplied."
> > > fi
> > >
> > > POLICY="-Djava.security.policy=`dirname
> > > $0`/../conf/cache.policy"
> > >
> > > HEAP="-Xms128m
> > > -Xmx512m"
> > >
> > > DEBUG="-verbose:gc
> > > -XX:+PrintTenuringDistribution"
> > >
> > > ARGS="$HEAP $DEBUG
> > > $POLICY"
> > >
> > > echo
> > > $ARGS
> > >
> > > java  $ARGS
> > > org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory
> > > "$1"
> > >
> > >
> > >
> > >
> > > Starting up the
> > > RMI server:
> > >
> > > testlab.com% sh ./startRemoteCache.sh /../conf/remote.cache.ccf
> > > 50000
> > >
> > > Classpath =
> > >
> > >
> >
> .:./../conf:/usr/java/jcs/conf:/usr/java/jcs/conf/:./../lib/commons-logging-1.1.1.jar:./../lib/concurrent.jar:./../lib/jcs-1.3.jar
> > > Starting the registry on port
> > > 50000
> > > -Xms128m -Xmx512m -verbose:gc
> > > -XX:+PrintTenuringDistribution
> > > -Djava.security.policy=./../conf/cache.policy
> > > Apr 15, 2010 10:07:30 PM
> > > org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory
> > > startup
> > > INFO: ConfigFileName =
> > > [/../conf/remote.cache.ccf]
> > > Apr 15, 2010 10:07:30 PM
> > > org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory
> > > startup
> > > INFO: Creating server with these
> > > attributes
> > >  remoteHost =
> > > null
> > >  remotePort =
> > > 0
> > >  cacheName =
> > > null
> > >  removeUponRemotePut =
> > > true
> > >  getOnly =
> > > false
> > >  allowClusterGet =
> > > true
> > >  localClusterConsistency =
> > > true
> > >  getConfigFileName =
> > > /../conf/remote.cache.ccf
> > > [GC
> > > Desired survivor size 5570560 bytes,
> > > new threshold 7 (max 15)
> > >  3277K->640K(125632K), 0.0032670
> > > secs]
> > > [Full GC 640K->448K(125632K),
> > > 0.0157800 secs]
> > > Apr 15, 2010 10:07:30 PM
> > > org.apache.jcs.engine.control.CompositeCacheManager
> > > getUnconfiguredInstance
> > > INFO: Instance is null, creating
> > > with provided config
> > > Apr 15, 2010 10:07:30 PM
> > > org.apache.jcs.engine.control.CompositeCacheManager
> > > configure
> > > INFO: Creating cache manager from
> > > config file: /../conf/remote.cache.ccf
> > > Apr 15, 2010 10:07:30 PM
> > > org.apache.jcs.utils.threadpool.ThreadPoolManager
> > > loadConfig
> > > INFO: thread_pool.default
> > > PoolConfiguration = useBoundary = [true] boundarySize = [2000]
> > > maximumPoolSize =
> > > [150] minimumPoolSize = [4] keepAliveTime = [300000] whenBlockedPolicy
> =
> > > [RUN]
> > > startUpSize = [4]
> > > Apr 15, 2010 10:07:30 PM
> > > org.apache.jcs.engine.control.CompositeCacheConfigurator
> > > setDefaultAuxValues
> > > INFO: Setting default auxiliaries to
> > > DC
> > > Apr 15, 2010 10:07:30 PM
> > > org.apache.jcs.engine.control.CompositeCacheConfigurator
> > > setDefaultCompositeCacheAttributes
> > > INFO: setting
> > > defaultCompositeCacheAttributes to [ useLateral = true, useRemote =
> true,
> > > useDisk = true, maxObjs = 1000, maxSpoolPerRun = -1, diskUsagePattern =
> 0
> > > ]
> > > Apr 15, 2010 10:07:30 PM
> > > org.apache.jcs.engine.control.CompositeCacheConfigurator
> > > parseElementAttributes
> > > INFO: No special ElementAttribute
> > > class defined for key [jcs.default.elementattributes], using default
> > > class.
> > > Apr 15, 2010 10:07:30 PM
> > > org.apache.jcs.engine.control.CompositeCacheConfigurator
> > > setDefaultElementAttributes
> > > INFO: setting
> > > defaultElementAttributes to [ IS_LATERAL = true, IS_SPOOL = true,
> > IS_REMOTE
> > > =
> > > true, IS_ETERNAL = true, MaxLifeSeconds = -1, IdleTime = -1, CreateTime
> =
> > > 1271387250988, LastAccessTime = 1271387250988, getTimeToLiveSeconds() =
> > -1,
> > > createTime = 1271387250988 ]
> > > Apr 15, 2010 10:07:31 PM
> > > org.apache.jcs.engine.memory.lru.LRUMemoryCache
> > > initialize
> > > INFO: initialized LRUMemoryCache for
> > > testCache2
> > > Apr 15, 2010 10:07:31 PM
> > > org.apache.jcs.engine.control.CompositeCache
> > > <init>
> > > INFO: Constructed cache with name
> > > [testCache2] and cache attributes [ useLateral = true, useRemote =
> true,
> > > useDisk
> > > = true, maxObjs = 1000, maxSpoolPerRun = 500, diskUsagePattern = 0
> > > ]
> > > Apr 15, 2010 10:07:31 PM
> > > org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache
> > > <init>
> > > INFO: Region [testCache2] Cache file
> > > root directory: /home/a0282562/JCS
> > > Apr 15, 2010 10:07:31 PM
> > > org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache
> > > initKeyMap
> > > INFO: Region [testCache2] Set
> > > maxKeySize to: '1000000'
> > > Apr 15, 2010 10:07:31 PM
> > > org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache
> > > <init>
> > > INFO: Region [testCache2] Indexed
> > > Disk Cache is alive.
> > > Apr 15, 2010 10:07:31 PM
> > > org.apache.jcs.engine.control.CompositeCacheConfigurator
> > > parseRegions
> > > INFO: Parsed regions
> > > [testCache2]
> > > Apr 15, 2010 10:07:31 PM
> > > org.apache.jcs.engine.control.CompositeCacheConfigurator
> > > doConfigure
> > > INFO: Finished configuration in 56
> > > ms.
> > > Apr 15, 2010 10:07:31 PM
> > > org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory
> > > startup
> > > INFO: Binding
> > > server to testlab.com:50005 with the name
> > > org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheService
> > > Exception in
> > > thread "main" java.rmi.NoSuchObjectException: no such object in
> > > table
> > >         at
> > >
> > >
> >
> sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
> > >         at
> > >
> sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
> > >         at
> > > sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
> > >         at
> > > sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown
> > > Source)
> > >         at
> > > java.rmi.Naming.rebind(Naming.java:160)
> > >         at
> > >
> > >
> >
> org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory.startup(RemoteCacheServerFactory.java:187)
> > >         at
> > >
> > >
> >
> org.apache.jcs.auxiliary.remote.server.RemoteCacheServerFactory.main(RemoteCacheServerFactory.java:342)
> > >
> > >
> > >
> > >
> > > Thanks in
> > > advance
> > >
> > >
> > > Sincerely,
> > > Gerald
> > > G. Ternola
> > > IT-Application
> > > Center of
> > > Excellence (ACE)
> > > PEIT-ACE
> > >
> > >
> > >
> >
> >
> >
> >
> >
>
>
>
>
>

Reply via email to