title: Port already in use: 0
body: <p>I am installing Liferay on OpenShift. In OpenShift, I can access only a certain range of ports. When I start Liferay, I get this Exception:</p>
  
  <pre><code>java.lang.ExceptionInInitializerError
      at com.liferay.portal.kernel.resiliency.mpi.MPIHelperUtil.&lt;clinit&gt;(MPIHelperUtil.java:471)
      at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:96)
      at com.liferay.portal.events.StartupAction.run(StartupAction.java:68)
      at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1238)
      at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:206)
      at javax.servlet.GenericServlet.init(GenericServlet.java:160)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
      at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1113)
      at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1671)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:744)
  Caused by: java.rmi.server.ExportException: Port already in use: 0; nested exception is: 
      java.net.BindException: Permission denied
      at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:329)
      at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:237)
      at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:411)
      at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:147)
      at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:207)
      at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:310)
      at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:252)
      at com.liferay.portal.kernel.resiliency.mpi.MPIHelperUtil.&lt;clinit&gt;(MPIHelperUtil.java:468)
      ... 21 more
  Caused by: java.net.BindException: Permission denied
      at java.net.PlainSocketImpl.socketBind(Native Method)
      at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
      at java.net.ServerSocket.bind(ServerSocket.java:376)
      at java.net.ServerSocket.&lt;init&gt;(ServerSocket.java:237)
      at java.net.ServerSocket.&lt;init&gt;(ServerSocket.java:128)
      at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:45)
      at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:344)
      at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:666)
      at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:318)
      ... 28 more
  </code></pre>
  
  <p>It tries to bind to an ephemeral port that is out of my accessible port range (that is what I guess anyway). Is there a property of some other configuration that I can do to set the RMI port? I can't get Liferay running because of that.</p>