Foros de discusión

can't startup Liferay

Alex Garland, modificado hace 6 años.

can't startup Liferay

New Member Mensajes: 6 Fecha de incorporación: 18/05/17 Mensajes recientes
Hello,

i am very new to liferay. So for starters, i chose to unpack a fresh tomcat liferay 7 bundle on my linux server. the only thing i changed was the port in server.xml from 8080 to 8081 and manually added a java-home path and then tried to run the startup script with no results. The webpage where i expected a liferay overlay stays blank. i checked the catalina logs, but they seem a little bit cryptic to me. I also played with the java version and installed Java SDK 7 as well as 8, but no differences. I can provide the logs but I really don't understand the meaning behind "failing to start listeners." I searched online for a solution but all recommendations i tried didn,t work.

edit: got the same error on windows.

18-May-2017 11:22:27.007 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.32
18-May-2017 11:22:27.009 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Feb 2 2016 19:34:53 UTC
18-May-2017 11:22:27.009 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.32.0
18-May-2017 11:22:27.009 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
18-May-2017 11:22:27.009 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 3.10.0-327.36.1.el7.x86_64
18-May-2017 11:22:27.009 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
18-May-2017 11:22:27.010 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /opt/jdk1.7.0_80/jre
18-May-2017 11:22:27.010 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.7.0_80-b15
18-May-2017 11:22:27.010 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
18-May-2017 11:22:27.010 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /opt/liferay-ce-portal-7.0-ga3/tomcat-8.0.32
18-May-2017 11:22:27.010 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/liferay-ce-portal-7.0-ga3/tomcat-8.0.32
18-May-2017 11:22:27.010 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/liferay-ce-portal-7.0-ga3/tomcat-8.0.32/conf/logging.properties
18-May-2017 11:22:27.011 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
18-May-2017 11:22:27.011 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dfile.encoding=UTF8
18-May-2017 11:22:27.011 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.net.preferIPv4Stack=true
18-May-2017 11:22:27.011 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
18-May-2017 11:22:27.011 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Duser.timezone=GMT
18-May-2017 11:22:27.011 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024m
18-May-2017 11:22:27.011 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=384m
18-May-2017 11:22:27.012 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=/opt/liferay-ce-portal-7.0-ga3/tomcat-8.0.32/endorsed
18-May-2017 11:22:27.012 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/liferay-ce-portal-7.0-ga3/tomcat-8.0.32
18-May-2017 11:22:27.012 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/liferay-ce-portal-7.0-ga3/tomcat-8.0.32
18-May-2017 11:22:27.012 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/liferay-ce-portal-7.0-ga3/tomcat-8.0.32/temp
18-May-2017 11:22:27.012 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
18-May-2017 11:22:27.193 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8081"]
18-May-2017 11:22:27.211 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
18-May-2017 11:22:27.214 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
18-May-2017 11:22:27.217 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
18-May-2017 11:22:27.217 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 757 ms
18-May-2017 11:22:27.244 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
18-May-2017 11:22:27.244 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.32
18-May-2017 11:22:27.256 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor /opt/liferay-ce-portal-7.0-ga3/tomcat-8.0.32/conf/Catalina/localhost/ROOT.xml
18-May-2017 11:22:38.847 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
18-May-2017 11:22:38.853 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
18-May-2017 11:22:38.883 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor /opt/liferay-ce-portal-7.0-ga3/tomcat-8.0.32/conf/Catalina/localhost/ROOT.xml has finished in 11,627 ms
18-May-2017 11:22:38.886 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8081"]
18-May-2017 11:22:38.892 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
18-May-2017 11:22:38.893 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 11675 ms
thumbnail
Christoph Rabel, modificado hace 6 años.

RE: can't startup Liferay

Liferay Legend Mensajes: 1554 Fecha de incorporación: 24/09/09 Mensajes recientes
"failing to start listeners." means that Tomcat cannot use at least one of the specified ports. Tomcat usually uses three ports:
8005 <- Shutdown "service"
8009 <- AJP Port (used with reverse proxies)
8080 <- Standard http listener

Since you have changed the port 8080 to 8081, I guess you already have a tomcat started on the same server? If so, you need to change all three ports to a free port. If you don't use a reverse proxy in front of tomcat, I recommend to disable 8009.

hth
Alex Garland, modificado hace 6 años.

RE: can't startup Liferay

New Member Mensajes: 6 Fecha de incorporación: 18/05/17 Mensajes recientes
8080 is already used, yes. But not from a tomcat server. I checked ports with netstat and 8009 and 8005 should be free. I still tried to change them as well (8010, 8006), but the issue remains.

Also on my windows machine i got the same error message. Here i didn't have to change ports, because 8080 is definitely free.
Alex Garland, modificado hace 6 años.

RE: can't startup Liferay

New Member Mensajes: 6 Fecha de incorporación: 18/05/17 Mensajes recientes
I managed to start tomcat on my windows machine, by setting all of the JAVA_HOME, JRE_HOME and JDK_HOME Variables in setenv to my local jdk 8 path.
I've done the same on my linux server, but it didn't work:

JAVA_HOME="/opt/jdk1.8.0_131"
JRE_HOME="/opt/jdk1.8.0_131/jre"
JDK_HOME="/opt/jdk1.8.0_131"

Probably i have to check java console output to see if there is an error, but how can i set the logger? I have only a puTTy connection and on my local machine i had at least a java console.
thumbnail
Fernando Fernandez, modificado hace 6 años.

RE: can't startup Liferay

Expert Mensajes: 396 Fecha de incorporación: 22/08/07 Mensajes recientes
Hi Alex,

In Linux, the java console will normally output on your putty screen. Or on the log files.

I suggest you focus on the message saying to look at the details on the container logfiles. In 6.2 this would be the catalina.out in tomcat.../logs - not sure it's the same in 7.

HTH

Fernando
Alex Garland, modificado hace 6 años.

RE: can't startup Liferay

New Member Mensajes: 6 Fecha de incorporación: 18/05/17 Mensajes recientes
Hi,

thank you. I didn't noticed the catalina.out file first. I thought all logs were saved in in catalina.currentdate.logs

So, i checked the catalina.out outputs but there are pretty unclear to me. seems the error i am looking for is a BeanCreationException. but i am not sure if the other exception are also relevant to me.

07:07:09,908 ERROR [localhost-startStop-1][DialectDetector:137] java.sql.SQLException: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@9f6915db[file =/opt/liferay-ce-portal-7.0-ga3/data/hypersonic/lportal.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2017-05-22 07:07:08 heartbeat - read: -9530 ms.
java.sql.SQLException: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@9f6915db[file =/opt/liferay-ce-portal-7.0-ga3/data/hypersonic/lportal.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2017-05-22 07:07:08 heartbeat - read: -9530 ms.
...
22-May-2017 07:07:09.917 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class com.liferay.portal.spring.context.PortalContextLoaderListener
java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'counterHibernateSessionFactory' defined in class path resource [META-INF/hibernate-spring.xml]: Cannot resolve reference to bean 'counterDataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'counterDataSource' defined in class path resource [META-INF/counter-infrastructure-spring.xml]: Cannot resolve reference to bean 'counterDataSourceImpl' while setting bean property 'targetDataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'counterDataSourceImpl' defined in class path resource [META-INF/counter-infrastructure-spring.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: No dialect found
...
22-May-2017 07:07:09.918 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
22-May-2017 07:07:09.928 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors

07:07:09,946 ERROR [localhost-startStop-1][PortalContextLoaderListener:114] java.lang.NullPointerException
java.lang.NullPointerException
at com.liferay.portal.kernel.servlet.DirectServletRegistryUtil.clearServlets(DirectServletRegistryUtil.java:27)
...
07:07:09,947 ERROR [localhost-startStop-1][PortalContextLoaderListener:114] java.lang.NullPointerException
java.lang.NullPointerException
...
07:07:09,963 ERROR [localhost-startStop-1][PortalContextLoaderListener:114] java.lang.IllegalStateException: The system has not be activated yet.
java.lang.IllegalStateException: The system has not be activated yet.
...
07:07:09,964 ERROR [localhost-startStop-1][PortalBeanLocatorUtil:109] BeanLocator is null
22-May-2017 07:07:09.965 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStop Exception sending context destroyed event to listener instance of class com.liferay.portal.spring.context.PortalContextLoaderListener
com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator is not set
...
22-May-2017 07:07:28.746 INFO [Active Thread: Equinox Container: 609c253f-bd3e-0017-164f-dc9f61628020] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [java.net.URI]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [java.net.URI]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
thumbnail
Christoph Rabel, modificado hace 6 años.

RE: can't startup Liferay

Liferay Legend Mensajes: 1554 Fecha de incorporación: 24/09/09 Mensajes recientes
Take a look at the following file, who owns it and who has access.
/opt/liferay-ce-portal-7.0-ga3/data/hypersonic/lportal.lck

Maybe you started the server as root once and the current user hasn't sufficient permissions?

"chown -R <liferayuser:liferayusergroup> liferay-ce-portal-7.0-ga3" could help. You could also try to start the server as root, maybe it makes a diffference. But if you do, you absolutely need to chown the files later to the current user.
Alex Garland, modificado hace 6 años.

RE: can't startup Liferay

New Member Mensajes: 6 Fecha de incorporación: 18/05/17 Mensajes recientes
I remember I started the server first time as a root but i already did an chown and chmod for the liferay path. Once again, I tried it with root but with the same effect. Then I deleted lportal.lck and tried it again. The startup process goes a little bit further but still with an error message.

So I did a rather radical measure and deleted the whole liferay path, killed all pids which were related to liferay (I think all the Bootstrap processes for each start stayed alive for some reasons, because there were so many of them) and unzipped it all over again, did a chown and a chmod 755 and just altered the java paths like above and changed the port to 8081 like the first time.

Then i tried to run it get this same error message like before:

22-May-2017 13:24:43.079 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class com.liferay.portal.spring.context.PortalContextLoaderListener
java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.liferay.portal.kernel.process.TerminationProcessException: Subprocess terminated with exit code 1

Another strange thing is after i started it once (and lportal.lck is created again) i get the same Database lock acquisition failure about the lockfile again. This time i used only my non-root user to startup and shutdown the server.
Alex Garland, modificado hace 6 años.

RE: can't startup Liferay

New Member Mensajes: 6 Fecha de incorporación: 18/05/17 Mensajes recientes
I deleted liferay 7 and installed 6.2. It works like a charm with jdk 1.7.0 so i really don't know what was the issue with liferay 7. for me it is fine to work on an older version and my problem is resolved. Thank you for your support.
Arwin Fernandes, modificado hace 4 años.

RE: can't startup Liferay

New Member Mensaje: 1 Fecha de incorporación: 10/02/20 Mensajes recientes
Hi ,Please help me on this. I downloaded Liferay bundle(liferay-dxp-7.2.10.1-sp1) and Eclipse as well. I followed below steps to start the server:
1. Used jdk 1.8 2. Used Liferay 7 in server option.
3. All basic settings.
Then when I started the server from eclipse, it is throwing below errors.
To solve below error I changed below settings as well:CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8999" CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
Still it didn' work. Kindly help.

Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 8099; nested exception is: 
    java.net.BindException: Address already in use: JVM_Bind
sun.management.AgentConfigurationError: java.rmi.server.ExportException: Port already in use: 8099; nested exception is: 
    java.net.BindException: Address already in use: JVM_Bind
    at sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:480)
    at sun.management.Agent.startAgent(Agent.java:262)
    at sun.management.Agent.startAgent(Agent.java:452)
Caused by: java.rmi.server.ExportException: Port already in use: 8099; nested exception is: 
    java.net.BindException: Address already in use: JVM_Bind
    at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:346)
    at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:254)
    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:237)
    at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:213)
    at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:173)
    at sun.management.jmxremote.SingleEntryRegistry.<init>(SingleEntryRegistry.java:49)
    at sun.management.jmxremote.ConnectorBootstrap.exportMBeanServer(ConnectorBootstrap.java:816)
    at sun.management.jmxremote.ConnectorBootstrap.startRemoteConnectorServer(ConnectorBootstrap.java:468)
    ... 2 more
Caused by: java.net.BindException: Address already in use: JVM_Bind
    at java.net.TwoStacksPlainSocketImpl.socketBind(Native Method)
    at java.net.TwoStacksPlainSocketImpl.socketBind(TwoStacksPlainSocketImpl.java:137)
    at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
    at java.net.TwoStacksPlainSocketImpl.bind(TwoStacksPlainSocketImpl.java:110)
    at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:190)
    at java.net.ServerSocket.bind(ServerSocket.java:375)
    at java.net.ServerSocket.<init>(ServerSocket.java:237)
    at java.net.ServerSocket.<init>(ServerSocket.java:128)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:45)
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:345)
    at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:666)
    at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:335)
    ... 11 more
thumbnail
Christoph Rabel, modificado hace 4 años.

RE: can't startup Liferay

Liferay Legend Mensajes: 1554 Fecha de incorporación: 24/09/09 Mensajes recientes
By default, Liferay needs three ports to run, 8080, 8005 and 8009.
On your system, 8009 is already used and therefore cannot be used by Liferay. You need to either shut down whatever service uses the port 8009 already or configure Liferay to use a different port. You can do this by editing tomcat/conf/server.xml.
Find the Connector with the port 8009 and change it to e.g. 8010. Then try to start the server again.