Hi Endre, Thanks for your reply. I was not creating the actor system more than one time. However, I had some problems in my configurations, but now the communication is working fine, but I had a new problem. I am using Hibernate on this project and everytime I try to create the Session Factory I receive a java.lang.ClassNotFoundException org/hibernate/cfg/Configuration, but I have all libraries in the lib folder of the Microkernel. I thought it was a problem with Hibernate, and then I tried to use only JDBC, but the problem is still happening. Do you have any idea what is this problem? I can't understand it, since I have all necessary files under the lib folder.
Thanks again for your help! On Friday, June 20, 2014 6:26:06 PM UTC+10, Akka Team wrote: > > Hi Felipe, > > For some reason akka-remote is denied from binding to a listen port that > is why it fails starting. Since you posted this stacktrace: > > akka.remote.RemoteTransportException: Startup failed > at > akka.remote.Remoting.akka$remote$Remoting$$notifyError(Remoting.scala:128) > at akka.remote.Remoting.start(Remoting.scala:193) > at > akka.remote.RemoteActorRefProvider.init(RemoteActorRefProvider.scala:184) > at akka.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:617) > at akka.actor.ActorSystemImpl._start$lzycompute(ActorSystem.scala:615) > at akka.actor.ActorSystemImpl._start(ActorSystem.scala:615) > at akka.actor.ActorSystemImpl.start(ActorSystem.scala:632) > at akka.actor.ActorSystem$.apply(ActorSystem.scala:141) > at akka.actor.ActorSystem$.apply(ActorSystem.scala:108) > at akka.actor.ActorSystem$.create(ActorSystem.scala:56) > at akka.actor.ActorSystem.create(ActorSystem.scala) > at > Control.servletForwarderUserRegFirstStep.doPost(servletForwarderUserRegFirstStep.java:39) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) > > I assumed that you accidentally create multiple ActorSystems and they try > to bind to the same port, which will fail. If this is not the problem, then > you need to make sure that you have permissions to bind to the configured > port in your environment. > > -Endre > > > > On Fri, Jun 20, 2014 at 4:20 AM, Felipe Dezotti <[email protected] > <javascript:>> wrote: > >> Hello again, I did some changes, but I am still facing the same problem. >> As I am kind of new in Akka, maybe I am missing something. >> So, here is the current situation: >> >> -> Virtual machine 1: >> * Glassfish with my application deployed with this configuration file: >> >> akka >> { >> actor >> { >> provider = "akka.remote.RemoteActorRefProvider" >> } >> >> remote >> { >> enabled-transports = ["akka.remote.netty.tcp"] >> netty.tcp >> { >> hostname = "10.4.2.5" >> port = 2600 >> } >> } >> } >> >> -> Virtual machine 2: >> * I have an Akka microkernel with the libraries that I need (in the >> folder lib), the jar of a "dumb" application (in the folder deploy), and >> the configuration file (the same as the other virtual machine; It is in the >> folder config). >> * The code for the dumb application is: >> >> public class StartActors implements Bootable >> { >> final ActorSystem system = ActorSystem.create("auctionSystem"); >> >> @Override >> public void startup() >> { >> ActorRef actorUser = >> system.actorOf(Props.create(userHandler.actorUser.class), "actorUser"); >> ActorRef actorAuction = >> system.actorOf(Props.create(auctionHandler.actorAuction.class), >> "actorAuction"); >> ActorRef actorEmail = >> system.actorOf(Props.create(emailHandler.actorEmail.class), "actorEmail"); >> ActorRef actorDatabase = >> system.actorOf(Props.create(databaseHandler.actorDatabase.class), >> "actorDatabase"); >> System.out.println("Actors created"); >> } >> >> @Override >> public void shutdown() >> { >> system.shutdown(); >> } >> } >> >> This is what I am doing at the moment: >> I start Akka microkernel on my virtual machine 2. The actor system is >> created and it listens in the specified port. >> Then, I deploy my application on glassfish in the virtual machine 1. When >> the application tries to create the actor system with this command: >> >> actorSystem = ActorSystem.create("auctionSystem"); >> >> At the moment of the actor system creation I face the problem I told in >> the first post. Here is the log from glassfish: >> >> [2014-06-20T02:07:48.938+0000] [glassfish 4.0] [INFO] [] [] [tid: >> _ThreadID=460 _ThreadName=Thread-3] [timeMillis: 1403230068938] >> [levelValue: 800] [[ >> [INFO] [06/20/2014 02:07:48.938] [http-listener-1(5)] [Remoting] >> Starting remoting]] >> >> [2014-06-20T02:07:48.985+0000] [glassfish 4.0] [WARNING] [] >> [javax.enterprise.web] [tid: _ThreadID=104 _ThreadName=http-listener-1(5)] >> [timeMillis: 1403230068985] [levelValue: 900] [[ >> StandardWrapperValve[servletForwarderUserRegFirstStep]: >> Servlet.service() for servlet servletForwarderUserRegFirstStep threw >> exception >> org.jboss.netty.channel.ChannelException: Failed to bind to: / >> 10.4.2.5:2600 >> at >> org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) >> at >> akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:392) >> at >> akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:389) >> at scala.util.Success$$anonfun$map$1.apply(Try.scala:206) >> at scala.util.Try$.apply(Try.scala:161) >> at scala.util.Success.map(Try.scala:206) >> at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235) >> at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235) >> at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) >> at >> akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.processBatch$1(BatchingExecutor.scala:67) >> at >> akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:82) >> at >> akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59) >> at >> akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59) >> at >> scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72) >> at akka.dispatch.BatchingExecutor$Batch.run(BatchingExecutor.scala:58) >> at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41) >> at >> akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) >> at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) >> at >> scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) >> at >> scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) >> at >> scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) >> Caused by: java.net.BindException: Cannot assign requested address: bind >> at sun.nio.ch.Net.bind0(Native Method) >> at sun.nio.ch.Net.bind(Net.java:414) >> at sun.nio.ch.Net.bind(Net.java:406) >> at >> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214) >> at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) >> at >> org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193) >> at >> org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) >> at >> org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) >> at >> org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42) >> at >> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) >> at java.lang.Thread.run(Thread.java:745) >> ]] >> >> [2014-06-20T02:07:48.985+0000] [glassfish 4.0] [INFO] [] [] [tid: >> _ThreadID=467 _ThreadName=Thread-3] [timeMillis: 1403230068985] >> [levelValue: 800] [[ >> [ERROR] [06/20/2014 02:07:48.970] [http-listener-1(5)] [Remoting] >> Remoting error: [Startup failed] [ >> akka.remote.RemoteTransportException: Startup failed >> at >> akka.remote.Remoting.akka$remote$Remoting$$notifyError(Remoting.scala:128) >> at akka.remote.Remoting.start(Remoting.scala:193) >> at >> akka.remote.RemoteActorRefProvider.init(RemoteActorRefProvider.scala:184) >> at akka.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:617) >> at akka.actor.ActorSystemImpl._start$lzycompute(ActorSystem.scala:615) >> at akka.actor.ActorSystemImpl._start(ActorSystem.scala:615) >> at akka.actor.ActorSystemImpl.start(ActorSystem.scala:632) >> at akka.actor.ActorSystem$.apply(ActorSystem.scala:141) >> at akka.actor.ActorSystem$.apply(ActorSystem.scala:108) >> at akka.actor.ActorSystem$.create(ActorSystem.scala:56) >> at akka.actor.ActorSystem.create(ActorSystem.scala) >> at >> Control.servletForwarderUserRegFirstStep.doPost(servletForwarderUserRegFirstStep.java:39) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) >> at >> org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) >> at >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318) >> at >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160) >> at >> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734) >> at >> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673) >> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) >> at >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) >> at >> org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357) >> at >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260) >> at >> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188) >> at >> org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191) >> at >> org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168) >> at >> org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189) >> at >> org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) >> at >> org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288) >> at >> org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206) >> at >> org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136) >> at >> org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114) >> at >> org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) >> at >> org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838) >> at >> org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113) >> at >> org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) >> at >> org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) >> at >> org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) >> at >> org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564) >> at >> org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544) >> at java.lang.Thread.run(Thread.java:745) >> Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: / >> 10.4.2.5:2600 >> at >> org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) >> at >> akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:392) >> at >> akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:389) >> at scala.util.Success$$anonfun$map$1.apply(Try.scala:206) >> at scala.util.Try$.apply(Try.scala:161) >> at scala.util.Success.map(Try.scala:206) >> at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235) >> at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235) >> at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) >> at >> akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.processBatch$1(BatchingExecutor.scala:67) >> at >> akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:82) >> at >> akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59) >> at >> akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59) >> at >> scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72) >> at akka.dispatch.BatchingExecutor$Batch.run(BatchingExecutor.scala:58) >> at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41) >> at >> akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) >> at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) >> at >> scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) >> at >> scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) >> at >> scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) >> Caused by: java.net.BindException: Cannot assign requested address: bind >> at sun.nio.ch.Net.bind0(Native Method) >> at sun.nio.ch.Net.bind(Net.java:414) >> at sun.nio.ch.Net.bind(Net.java:406) >> at >> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214) >> at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) >> at >> org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193) >> at >> org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) >> at >> org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) >> at >> org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42) >> at >> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) >> at java.lang.Thread.run(Thread.java:745) >> ]]] >> >> [2014-06-20T02:07:49.048+0000] [glassfish 4.0] [INFO] [] [] [tid: >> _ThreadID=461 _ThreadName=Thread-3] [timeMillis: 1403230069048] >> [levelValue: 800] [[ >> [INFO] [06/20/2014 02:07:49.016] >> [auctionSystem-akka.remote.default-remote-dispatcher-10] >> [akka://auctionSystem/system/remoting-terminator] Shutting down remote >> daemon.]] >> >> [2014-06-20T02:07:49.048+0000] [glassfish 4.0] [INFO] [] [] [tid: >> _ThreadID=461 _ThreadName=Thread-3] [timeMillis: 1403230069048] >> [levelValue: 800] [[ >> [INFO] [06/20/2014 02:07:49.016] >> [auctionSystem-akka.remote.default-remote-dispatcher-10] >> [akka://auctionSystem/system/remoting-terminator] Remote daemon shut down; >> proceeding with flushing remote transports.]] >> >> [2014-06-20T02:07:49.048+0000] [glassfish 4.0] [INFO] [] [] [tid: >> _ThreadID=463 _ThreadName=Thread-3] [timeMillis: 1403230069048] >> [levelValue: 800] [[ >> [INFO] [06/20/2014 02:07:49.048] [ForkJoinPool-3-worker-3] [Remoting] >> Remoting shut down]] >> >> [2014-06-20T02:07:49.048+0000] [glassfish 4.0] [INFO] [] [] [tid: >> _ThreadID=461 _ThreadName=Thread-3] [timeMillis: 1403230069048] >> [levelValue: 800] [[ >> [INFO] [06/20/2014 02:07:49.048] >> [auctionSystem-akka.remote.default-remote-dispatcher-11] >> [akka://auctionSystem/system/remoting-terminator] Remoting shut down.]] >> >> >> Sorry if it is something simple to get it fixed, but I am pretty new in >> Akka. >> >> Cheers, >> >> >> >>>> >>> -- >> >>>>>>>>>> Read the docs: http://akka.io/docs/ >> >>>>>>>>>> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user >> --- >> You received this message because you are subscribed to the Google Groups >> "Akka User List" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Akka Team > Typesafe - The software stack for applications that scale > Blog: letitcrash.com > Twitter: @akkateam > -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
