掲示板

Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

7年前 に Stefan J によって更新されました。

Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

New Member 投稿: 12 参加年月日: 16/05/19 最新の投稿
Hello,

I am new and I want to install Liferay on Ubuntu Server 16.04 LTS.

First, I installed mysql and created the database.
After that I installed Oracle jdk 1.8.0_92 in directory /opt/Oracle_Java/ and set the java alternatives.

Certainly Liferay do not start when I execute startup.sh

I will post the log output here, tomorrow.
Could it be a problem with the Java version? My idea was to take the latest version due to security.

Thank You
Stefan
thumbnail
7年前 に Olaf Kock によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
Stefan J:
I will post the log output here, tomorrow.
Could it be a problem with the Java version? My idea was to take the latest version due to security.


It could be anything - probably your log will show some reasons. You can alternatively also start with ./catalina.sh run (or catalina.bat run on windows) which will have tomcat run in the foreground instead of being sent to the background. It will display the log output right on the commandline where you start it.
7年前 に Stefan J によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

New Member 投稿: 12 参加年月日: 16/05/19 最新の投稿
Here is my log...

Greetings

添付ファイル:

thumbnail
7年前 に Olaf Kock によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
Did you look at your log? The very first error message that jumps to the eye:

20-May-2016 05:35:06.263 SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["http-nio-8080"]
 java.net.BindException: Die Adresse wird bereits verwendet
        at sun.nio.ch.Net.bind0(Native Method)


(and another one for 8009)

You have another tomcat or some other process running that occupies port 8080 and 8009. (it might be exactly the tomcat that you're trying to start again, or it might be another one). If it's the same: Stop it first. If it's another one: Open one of the conf/server.xml file and change tomcat's default ports for one of them. Search for occurrences of 8005, 8009 and 8080, those are the standard ports that tomcat occupies.

Naturally, you'll need to use that new port to access the tomcat that you've changed, e.g. http://localhost:7070
7年前 に Stefan J によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

New Member 投稿: 12 参加年月日: 16/05/19 最新の投稿
Thank you. You're right. I killed the process.

This error still exists and Liferay still doesn't start:

20-May-2016 07:28:15.401 INFO [Active Thread: Equinox Container: 40aa9b58-5c1e-0016-1cd8-c5816bce5c15] 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
7年前 に Olaf Kock によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
Stefan J:
Thank you. You're right. I killed the process.

This error still exists and Liferay still doesn't start:


The error message rather sounds like something from the shutdown process (that can be ignored). Make sure that all processes on port 8080 etc. are really stopped (shutting down an appserver can take a while) before restarting.
Earlier versions of Liferay couldn't be restarted (when the appserver kept running) but needed a full appserver restart. I haven't tried that yet with Liferay 7.
7年前 に Stefan J によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

New Member 投稿: 12 参加年月日: 16/05/19 最新の投稿
I checked all processes on port 8080, shutdown Liferay and killed all java processes.
After that I tried to start Liferay again and its the same. It doesn't start.

I've also tried other Java versions (7u79 and 8u91). Without success.

I am clueless at the moment.
thumbnail
7年前 に Olaf Kock によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
Stefan J:
It doesn't start.


Same error message? "It doesn't start" is hard to diagnose&fix from a distance. Could you post the full startup log?
7年前 に Stefan J によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

New Member 投稿: 12 参加年月日: 16/05/19 最新の投稿
Hi Olaf,
This is the full catalina log:

23-May-2016 05:20:47.363 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.32
23-May-2016 05:20:47.364 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Feb 2 2016 19:34:53 UTC
23-May-2016 05:20:47.365 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.32.0
23-May-2016 05:20:47.365 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
23-May-2016 05:20:47.365 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            4.4.0-22-generic
23-May-2016 05:20:47.365 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
23-May-2016 05:20:47.365 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /opt/Oracle_Java/jdk1.7.0_79/jre
23-May-2016 05:20:47.365 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.7.0_79-b15
23-May-2016 05:20:47.365 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
23-May-2016 05:20:47.365 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /opt/liferay-portal-7.0-ce-ga1/tomcat-8.0.32
23-May-2016 05:20:47.366 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /opt/liferay-portal-7.0-ce-ga1/tomcat-8.0.32
23-May-2016 05:20:47.366 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/liferay-portal-7.0-ce-ga1/tomcat-8.0.32/conf/logging.properties
23-May-2016 05:20:47.366 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
23-May-2016 05:20:47.366 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dfile.encoding=UTF8
23-May-2016 05:20:47.366 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.net.preferIPv4Stack=true
23-May-2016 05:20:47.366 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
23-May-2016 05:20:47.367 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Duser.timezone=GMT
23-May-2016 05:20:47.367 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024m
23-May-2016 05:20:47.367 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=384m
23-May-2016 05:20:47.367 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=/opt/liferay-portal-7.0-ce-ga1/tomcat-8.0.32/endorsed
23-May-2016 05:20:47.367 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/liferay-portal-7.0-ce-ga1/tomcat-8.0.32
23-May-2016 05:20:47.367 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/liferay-portal-7.0-ce-ga1/tomcat-8.0.32
23-May-2016 05:20:47.367 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/liferay-portal-7.0-ce-ga1/tomcat-8.0.32/temp
23-May-2016 05:20:47.367 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
23-May-2016 05:20:47.550 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
23-May-2016 05:20:47.566 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
23-May-2016 05:20:47.569 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
23-May-2016 05:20:47.585 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
23-May-2016 05:20:47.586 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 704 ms
23-May-2016 05:20:47.610 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
23-May-2016 05:20:47.610 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.32
23-May-2016 05:20:47.619 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor /opt/liferay-portal-7.0-ce-ga1/tomcat-8.0.32/conf/Catalina/localhost/ROOT.xml
23-May-2016 05:21:00.371 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
23-May-2016 05:21:00.377 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
23-May-2016 05:21:00.432 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor /opt/liferay-portal-7.0-ce-ga1/tomcat-8.0.32/conf/Catalina/localhost/ROOT.xml has finished in 12,814 ms
23-May-2016 05:21:00.434 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
23-May-2016 05:21:00.441 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
23-May-2016 05:21:00.442 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 12856 ms
23-May-2016 05:21:29.664 INFO [Active Thread: Equinox Container: e0017a22-a620-0016-11b1-efdf849f2bb3] 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.
        at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1328)
        at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1316)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1181)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:412)
	at com.liferay.portal.module.framework.ModuleFrameworkClassLoader.loadClass(ModuleFrameworkClassLoader.java:98)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at org.eclipse.osgi.container.ModuleDatabase$Persistence.writeMap(ModuleDatabase.java:1320)
        at org.eclipse.osgi.container.ModuleDatabase$Persistence.writeGenericInfo(ModuleDatabase.java:1272)
        at org.eclipse.osgi.container.ModuleDatabase$Persistence.writeModule(ModuleDatabase.java:1068)
        at org.eclipse.osgi.container.ModuleDatabase$Persistence.store(ModuleDatabase.java:972)
        at org.eclipse.osgi.container.ModuleDatabase.store(ModuleDatabase.java:853)
        at org.eclipse.osgi.storage.Storage.save0(Storage.java:1043)
        at org.eclipse.osgi.storage.Storage.save(Storage.java:1011)
        at org.eclipse.osgi.internal.framework.StorageSaver$StorageSaverTask.run(StorageSaver.java:28)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        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:745)


I expect a message "INFO: Server startup in NNN ms" and availability at URL address (http://localhost:8080)
thumbnail
7年前 に Olaf Kock によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
Stefan J:

23-May-2016 05:20:47.365 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /opt/Oracle_Java/jdk1.7.0_79/jre
23-May-2016 05:20:47.365 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.7.0_79-b15


I expect a message "INFO: Server startup in NNN ms" and availability at URL address (http://localhost:8080)


I've left one line that contradicts the thread title - you seem to be running on Java 7, not Java 8. Based on this I'm wondering if there are other configurations active that I don't see here.

I'm assuming that you have the Liferay/Tomcat bundle of 7.0 CE GA1 installed in /opt/liferay-portal-7.0-ce-ga1 - not some other version or a manually installed tomcat with the WAR and dependency-download installed on them. Please doublecheck or let me/us know if not.

Technically, Liferay7 requires Java8, but I've seen it running on Java7 because that compatibility change was one of the last steps before availability, so it largely has Java7 code. In other words: Should work, but as you have some difference between your description and actual configuration, it might be worth checking again.

Make sure that tomcat's temp/log/work directories as well as Liferay's data directory etc (osgi, document_library etc) are writeable to the OS-user that Liferay is running as.
7年前 に Stefan J によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

New Member 投稿: 12 参加年月日: 16/05/19 最新の投稿
Olaf Kock:
I've left one line that contradicts the thread title - you seem to be running on Java 7, not Java 8. Based on this I'm wondering if there are other configurations active that I don't see here.

I'm assuming that you have the Liferay/Tomcat bundle of 7.0 CE GA1 installed in /opt/liferay-portal-7.0-ce-ga1 - not some other version or a manually installed tomcat with the WAR and dependency-download installed on them. Please doublecheck or let me/us know if not.

Technically, Liferay7 requires Java8, but I've seen it running on Java7 because that compatibility change was one of the last steps before availability, so it largely has Java7 code. In other words: Should work, but as you have some difference between your description and actual configuration, it might be worth checking again.

Make sure that tomcat's temp/log/work directories as well as Liferay's data directory etc (osgi, document_library etc) are writeable to the OS-user that Liferay is running as.


Java 7 was my last attempt to solve the problem and to check differences. Before I used Java 8 in Version 92. See log I've posted above.

Yes right. I installed the Liferay/Tomcat bundle of 7.0 CE GA1.
No other version or manually installed tomcat. It was a blank Ubuntu Server system.

Next, I will switch to Java 8 again and check the directories whether they are writeable.
7年前 に Stefan J によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

New Member 投稿: 12 参加年月日: 16/05/19 最新の投稿
I switched back to Java 8 u92 and set the user rights to rwx.

The log file looks different now. See attached file.

By the way: How can I check whether Liferay is fully launched?
I can not access liferay with http://<ipaddress>:8080

添付ファイル:

thumbnail
7年前 に Juan Gonzalez によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

Liferay Legend 投稿: 3089 参加年月日: 08/10/28 最新の投稿
Stefan J:
I switched back to Java 8 u92 and set the user rights to rwx.

The log file looks different now. See attached file.

By the way: How can I check whether Liferay is fully launched?
I can not access liferay with http://<ipaddress>:8080



As you can see in logs:

Caused by: java.lang.ClassNotFoundException: com.
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1308)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1142)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at com.liferay.portal.dao.jdbc.DataSourceFactoryImpl.testDatabaseClass(DataSourceFactoryImpl.java:505)


seems you didn't specify the oracle jdbc driver classname right in portal-ext.properties.
7年前 に Stefan J によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

New Member 投稿: 12 参加年月日: 16/05/19 最新の投稿
Juan Gonzalez:

As you can see in logs:

Caused by: java.lang.ClassNotFoundException: com.
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1308)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1142)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at com.liferay.portal.dao.jdbc.DataSourceFactoryImpl.testDatabaseClass(DataSourceFactoryImpl.java:505)


seems you didn't specify the oracle jdbc driver classname right in portal-ext.properties.


My portal-ext.properties looks like this:

#
#
MySQL
#
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?
useUnicode=true&amp;characterEncoding=UTF-8&amp;useFastDateParsing=false
jdbc.default.username=<user>
jdbc.default.password=<pw>
</pw></user>
thumbnail
7年前 に Juan Gonzalez によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

Liferay Legend 投稿: 3089 参加年月日: 08/10/28 最新の投稿
Ok, then it's getting that config somewhere else.

Can you search for all the *.properties files existing in your Liferay directory?
7年前 に Stefan J によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

New Member 投稿: 12 参加年月日: 16/05/19 最新の投稿
Thank you very much Olaf and Juan!!
Liferay is running now.
I think the solution was editing the user rights and correcting a typing error in portal-ext.properties.
You've helped me very much.
thumbnail
7年前 に Juan Gonzalez によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

Liferay Legend 投稿: 3089 参加年月日: 08/10/28 最新の投稿
Glad you have it working emoticon.

Enjoy!
6年前 に Karunakaran Poraiyagounder によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

New Member 投稿: 2 参加年月日: 18/01/30 最新の投稿
Hi Stefan J, I do get the exact ERRORs while starting the server. It has been running on Java 8 so far and I didn't change anything. Guessing a security update on Java 8 could have changed the security settings. Could you pls. be specific on what exactly on you edited 'user rights'?

Thanks
Karan
5年前 に Karunakaran Poraiyagounder によって更新されました。

RE: Liferay 7.0 CE, Java 8 u92 on Ubuntu Server

New Member 投稿: 2 参加年月日: 18/01/30 最新の投稿
Issue was, another version of portal-ext.properties was in class path. Got resolved after moving that out!