Re: Uyuni Master Java issues on CentOS 8
Hello Ricardo, No other errors in the logs. I believe I sent you the full logs which don't say much more: /var/log/tomcat/catalina.*.log /var/log/tomcat/localhost.*.log /var/log/rhn/* is empty. I tried to enable more logging via /usr/share/tomcat/webapps/rhn/WEB-INF/classes/log4j.properties. But this actually did not change anything. So I guess I did not do it properly. Listing the hibernate*.jar packages in the folder /usr/share/java on Leap and CentOS show exactly the same files. So At least this does not seem to be a hibernate version issue. Next, I will try is to run the setup again. Maybe it helps at this step. Best wishes, Stefan ----- Ursprüngliche Mail ----- Von: "Ricardo Mateus" <rdiasmateus@suse.de> An: "Stefan Bluhm" <opensuse.org@bluhm-de.com> Gesendet: Donnerstag, 17. Dezember 2020 15:13:42 Betreff: Re: Uyuni Master Java issues on CentOS 8 On 12/17/20 11:24 AM, Stefan Bluhm wrote:
Hello Ricardo,
when I filled out the DB fields in /usr/share/rhn/config-defaults/rhn.conf, I was able to progress two steps. Item on my todo list is now to check out why the /etc/rhn/ file is not being picked up.
1) file and all path are acessible by the user which is starting tomcat? 2) In any start script, the the system propertie `rhn.config.dir` are being set? This property overwrites the default config file location.
After adding istacks-commons-runtime.jar to the Tomcat classpath, Tomcat progresses to the error message below. I tried following your advice.
From what i can tell, the process is now actually stuck at org.hibernate.SessionFactory itself. Can you confirm this? com.redhat.rhn.common.hibernate.ConnectionManager.getSession(ConnectionManager.java:276) 276: info = new SessionInfo(sessionFactory.openSession());
Regardin this error, do you see any other message on the logs before this error, specially containing the following message: 'FATAL ERROR creating HibernateFactory'
Part of the stack trace (full stack trace in links below) 17-Dec-2020 12:01:21.779 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [com.redhat.rhn.webapp.RhnServletListener] java.lang.NullPointerException at com.redhat.rhn.common.hibernate.ConnectionManager.getSession(ConnectionManager.java:276) at com.redhat.rhn.common.hibernate.HibernateFactory.getSession(HibernateFactory.java:352) at com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery(HibernateFactory.java:275) at com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery(HibernateFactory.java:220) at com.redhat.rhn.domain.reactor.SaltEventFactory.countSaltEvents(SaltEventFactory.java:54) at com.suse.manager.reactor.PGEventStream.<init>(PGEventStream.java:102) at com.suse.manager.webui.services.impl.SaltService.createEventStream(SaltService.java:536) at com.suse.manager.webui.services.impl.SaltService.createOrGetEventStream(SaltService.java:488) at com.suse.manager.webui.services.impl.SaltService.getEventStream(SaltService.java:546) at com.suse.manager.reactor.SaltReactor.connectToEventStream(SaltReactor.java:184) at com.suse.manager.reactor.SaltReactor.start(SaltReactor.java:155) at com.redhat.rhn.webapp.RhnServletListener.contextInitialized(RhnServletListener.java:131) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4678) ...
Full stack trace: https://pastebin.com/S7R6864y
Best wishes,
Stefan
----- Ursprüngliche Mail ----- Von: "Ricardo Mateus" <rdiasmateus@suse.de> An: "Stefan Bluhm" <opensuse.org@bluhm-de.com>, "uyuni-devel" <uyuni-devel@opensuse.org> Gesendet: Mittwoch, 16. Dezember 2020 11:41:27 Betreff: Re: Uyuni Master Java issues on CentOS 8
Hey Stefan,
Regarding NPE yo can analyze stack trace, and check the code base in reverse order, starting from one class that is part of package *.rhn.* Java codebase is placed on https://github.com/uyuni-project/uyuni/tree/master/java/code/src
For example:
at com.redhat.rhn.webapp.RhnServletListener.contextInitialized(RhnServletListener.java:125)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/...
at com.redhat.rhn.webapp.RhnServletListener.startHibernate(RhnServletListener.java:103)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/...
at com.redhat.rhn.common.hibernate.HibernateFactory.createSessionFactory(HibernateFactory.java:108)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/...
at com.redhat.rhn.common.hibernate.ConnectionManager.initialize(ConnectionManager.java:136)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/...
at com.redhat.rhn.common.hibernate.ConnectionManager.createSessionFactory(ConnectionManager.java:168)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/...
First argument in the map is a static string, so the problem is that secound argument is returning null, and that is the configuration value for the database user name.
I will try to investigate a bit more about the problem latter.
Cheers, Ricardo
On 12/16/20 9:52 AM, Stefan Bluhm wrote:
Thank you Ricardo,
I indeed forgot to re-run mgr-setup. But the file is actually there and filled out. I also made sure it is readable by everyone. Here the configuration: https://pastebin.com/vfdrrCkC (I also tried setting db_ssl_enabled = 0).
Just now, I also noticed this line in the main catalina log seconds before (and not after) the stack trace. Is this directly impacting the error? 16-Dec-2020 10:25:50.873 WARNING [main] org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute with value [/rhn] in deployment descriptor [/etc/tomcat/Catalina/localhost/rhn.xml] has been ignored Full trace of catalina.2020-12-16.log: https://pastebin.com/jSpX0pNc Full trace of localhost.2020-12-16.log: https://pastebin.com/Qd7mgWqT (unchanged as far as I can tell)
How did you pinpoint the property "db_user"? If you guide me, I might be able to understand more of those stack traces. At the moment, I only understand the plain text and NPE :).
Thanks and best wishes,
Stefan
----- Ursprüngliche Mail ----- Von: "Ricardo Mateus" <rdiasmateus@suse.de> An: "Stefan Bluhm" <opensuse.org@bluhm-de.com>, "uyuni-devel" <uyuni-devel@opensuse.org> Gesendet: Dienstag, 15. Dezember 2020 23:27:12 Betreff: Re: Uyuni Master Java issues on CentOS 8
Hello Stefan,
This error is happening because the configuration property for `db_user` is not set on the rhn.config. I was able to reproduce the same error by commenting this property in my local server.
Default location for this file is `/etc/rhn/rhn.conf`. Do you have this file on your instalation? Does this file have all the needed properties?
You can check some examples in: - https://github.com/uyuni-project/uyuni/blob/master/backend/rhn-conf/rhn.conf - https://github.com/uyuni-project/uyuni/blob/master/java/buildconf/test/rhn.c...
Cheers, Ricardo
On 12/15/20 8:42 PM, Stefan Bluhm wrote:
Hello Java Experts,
I am back at trying to get "rhn" to start on Tomcat/CentOS 8. Brief history:
OpenSUSE Leap 15.2 comes with a non-standard Java 11 OpenJDK version that integrates com.sun.xml.bind and allows usage by starting Java with the flag "--add-modules java.annotation,com.sun.xml.bind". As CentOS does not have these modules, the following packages need to be added: glassfish-jaxb-api, glassfish-jaxb-core, jaf, istack-commons-runtime. Using the same jars on Leap allows the removal of the module flag and the system starts up without any issues (that I noticed).
CentOS also does not show any "class not found" exceptions anymore so it sounds from that perspective, I am good.
Unfortunately, now the stack trace below is thrown. I guess this might have something to do with bundle/class version requirements. Can you please give me some suggestions how to best approach the issue resolutions? I am currently testing on a Uyuni installation itself, trying to get it to start.
Also any ad-hoc ideas where to focus the issue identification on the stack trace?
Thank you and best wishes,
Stefan
15-Dec-2020 21:08:25.119 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [com.redhat.rhn.webapp.RhnServletListener] java.lang.NullPointerException at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011) at java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006) at java.base/java.util.Properties.put(Properties.java:1337) at com.redhat.rhn.common.hibernate.ConnectionManager.createSessionFactory(ConnectionManager.java:168) at com.redhat.rhn.common.hibernate.ConnectionManager.initialize(ConnectionManager.java:136) at com.redhat.rhn.common.hibernate.HibernateFactory.createSessionFactory(HibernateFactory.java:108) at com.redhat.rhn.webapp.RhnServletListener.startHibernate(RhnServletListener.java:103) at com.redhat.rhn.webapp.RhnServletListener.contextInitialized(RhnServletListener.java:125) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4678) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5139) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:631) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1830) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:526) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:425) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423) at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:772) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473) 15-Dec-2020 21:08:25.182 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStop Exception sending context destroyed event to listener instance of class [com.redhat.rhn.webapp.RhnServletListener] java.lang.NullPointerException at com.redhat.rhn.common.hibernate.ConnectionManager.close(ConnectionManager.java:114) at com.redhat.rhn.common.hibernate.HibernateFactory.closeSessionFactory(HibernateFactory.java:92) at com.redhat.rhn.webapp.RhnServletListener.stopHibernate(RhnServletListener.java:108) at com.redhat.rhn.webapp.RhnServletListener.contextDestroyed(RhnServletListener.java:165) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4724) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5395) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:187) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:631) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1830) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:526) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:425) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423) at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:772) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473) _______________________________________________ Uyuni Development mailing list -- devel@lists.uyuni-project.org To unsubscribe, email devel-leave@lists.uyuni-project.org List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/devel@lists.uyuni-project.org
-- Ricard Mateus SUSE Manager Development Team
participants (1)
-
Stefan Bluhm