Re: Uyuni Master Java issues on CentOS 8
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. 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()); 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
Hello Uyuni Team, can you please share some ideas for me on how to debug the below issue (previously mentioned here)? Unfortunately, I was not able to progress at all on this one. 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) ... Steps taken on CentOS 8: service tomcat start Full logs: catalina.2020-12-24.log: https://pastebin.com/FTaVb9t4 localhost.2020-12-24.log: https://pastebin.com/mPkfxRr4 - Should I be looking at other logs (couldn't find any relevant ones). - Could this be a spacewalk-java build/packaging issue? The package was originally built without jaxb available. Then I would revisit the build process. Thank you and best wishes, Stefan ----- Ursprüngliche Mail ----- Von: "Stefan Bluhm" <opensuse.org@bluhm-de.com> An: "uyuni-devel" <uyuni-devel@opensuse.org> Gesendet: Donnerstag, 17. Dezember 2020 12:25:19 Betreff: Re: Uyuni Master Java issues on CentOS 8 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. 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()); 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
One step forward: I managed to hook up Eclipse with Tomcat and was able to inspect some variables. In the end spacewalk-java is trying to connect to "hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver". So it seems I really have to sort our the configuration file issue first. The line: "LOG.error("FATAL ERROR creating HibernateFactory", e);" does get fired but I do not see anything in the logs. Can you explain me (for dummies) how to enable logging properly? It seems that I am doing something wrong. Thank you and best wishes, Stefan ----- Ursprüngliche Mail ----- Von: "Stefan Bluhm" <opensuse.org@bluhm-de.com> An: "uyuni-devel" <uyuni-devel@opensuse.org> Gesendet: Donnerstag, 24. Dezember 2020 11:15:53 Betreff: Re: Uyuni Master Java issues on CentOS 8 Hello Uyuni Team, can you please share some ideas for me on how to debug the below issue (previously mentioned here)? Unfortunately, I was not able to progress at all on this one. 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) ... Steps taken on CentOS 8: service tomcat start Full logs: catalina.2020-12-24.log: https://pastebin.com/FTaVb9t4 localhost.2020-12-24.log: https://pastebin.com/mPkfxRr4 - Should I be looking at other logs (couldn't find any relevant ones). - Could this be a spacewalk-java build/packaging issue? The package was originally built without jaxb available. Then I would revisit the build process. Thank you and best wishes, Stefan ----- Ursprüngliche Mail ----- Von: "Stefan Bluhm" <opensuse.org@bluhm-de.com> An: "uyuni-devel" <uyuni-devel@opensuse.org> Gesendet: Donnerstag, 17. Dezember 2020 12:25:19 Betreff: Re: Uyuni Master Java issues on CentOS 8 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. 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()); 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
Hi please check your /etc/rhn/rhn.conf . You should have the following 3 lines: hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect hibernate.connection.driver_class=org.postgresql.Driver hibernate.connection.driver_proto=jdbc:postgresql I think this is set in spacewalk-setup . You can configure debug logging in /srv/tomcat/webapps/rhn/WEB-INF/classes/log4j.properties (maybe tomcat is installed at a different place in CentOS) log4j.logger.com.redhat.rhn.common.hibernate.HibernateFactory=DEBUG But errors should always be logged. See also https://github.com/uyuni-project/uyuni/wiki/Java-Logging Am Montag, 28. Dezember 2020, 09:30:49 CET schrieb Stefan Bluhm:
One step forward: I managed to hook up Eclipse with Tomcat and was able to inspect some variables.
In the end spacewalk-java is trying to connect to "hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver". So it seems I really have to sort our the configuration file issue first.
The line: "LOG.error("FATAL ERROR creating HibernateFactory", e);" does get fired but I do not see anything in the logs.
Can you explain me (for dummies) how to enable logging properly? It seems that I am doing something wrong.
Thank you and best wishes,
Stefan
----- Ursprüngliche Mail ----- Von: "Stefan Bluhm" <opensuse.org@bluhm-de.com> An: "uyuni-devel" <uyuni-devel@opensuse.org> Gesendet: Donnerstag, 24. Dezember 2020 11:15:53 Betreff: Re: Uyuni Master Java issues on CentOS 8
Hello Uyuni Team,
can you please share some ideas for me on how to debug the below issue (previously mentioned here)? Unfortunately, I was not able to progress at all on this one.
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(ConnectionMana ger.java:276) at com.redhat.rhn.common.hibernate.HibernateFactory.getSession(HibernateFactor y.java:352) at com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery(Hi bernateFactory.java:275) at com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery(Hi bernateFactory.java:220) at com.redhat.rhn.domain.reactor.SaltEventFactory.countSaltEvents(SaltEventFac tory.java:54) at com.suse.manager.reactor.PGEventStream.<init>(PGEventStream.java:102) at com.suse.manager.webui.services.impl.SaltService.createEventStream(SaltServ ice.java:536) at com.suse.manager.webui.services.impl.SaltService.createOrGetEventStream(Sal tService.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(RhnServletListe ner.java:131) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java :4678) ...
Steps taken on CentOS 8: service tomcat start
Full logs: catalina.2020-12-24.log: https://pastebin.com/FTaVb9t4 localhost.2020-12-24.log: https://pastebin.com/mPkfxRr4
- Should I be looking at other logs (couldn't find any relevant ones). - Could this be a spacewalk-java build/packaging issue? The package was originally built without jaxb available. Then I would revisit the build process.
Thank you and best wishes,
Stefan
----- Ursprüngliche Mail ----- Von: "Stefan Bluhm" <opensuse.org@bluhm-de.com> An: "uyuni-devel" <uyuni-devel@opensuse.org> Gesendet: Donnerstag, 17. Dezember 2020 12:25:19 Betreff: Re: Uyuni Master Java issues on CentOS 8
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.
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(ConnectionMana ger.java:276) 276: info = new SessionInfo(sessionFactory.openSession());
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(ConnectionMana ger.java:276) at com.redhat.rhn.common.hibernate.HibernateFactory.getSession(HibernateFactor y.java:352) at com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery(Hi bernateFactory.java:275) at com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery(Hi bernateFactory.java:220) at com.redhat.rhn.domain.reactor.SaltEventFactory.countSaltEvents(SaltEventFac tory.java:54) at com.suse.manager.reactor.PGEventStream.<init>(PGEventStream.java:102) at com.suse.manager.webui.services.impl.SaltService.createEventStream(SaltServ ice.java:536) at com.suse.manager.webui.services.impl.SaltService.createOrGetEventStream(Sal tService.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(RhnServletListe ner.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(RhnServletListen er.java:125)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/ rhn/webapp/RhnServletListener.java#L125
at
com.redhat.rhn.webapp.RhnServletListener.startHibernate(RhnServletListener.j ava:103)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/ rhn/webapp/RhnServletListener.java#L103
at
com.redhat.rhn.common.hibernate.HibernateFactory.createSessionFactory(Hibern ateFactory.java:108)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/ rhn/common/hibernate/HibernateFactory.java#L108
at
com.redhat.rhn.common.hibernate.ConnectionManager.initialize(ConnectionManag er.java:136)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/ rhn/common/hibernate/ConnectionManager.java#L136
at
com.redhat.rhn.common.hibernate.ConnectionManager.createSessionFactory(Conne ctionManager.java:168)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/ rhn/common/hibernate/ConnectionManager.java#L168
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 :).
https://github.com/uyuni-project/uyuni/blob/master/java/buildconf/test/rhn .conf.postgresql-example
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.co nf
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(ConnectionMana
ger.java:114)
at
com.redhat.rhn.common.hibernate.HibernateFactory.closeSessionFactory(H
ibernateFactory.java:92) at
com.redhat.rhn.webapp.RhnServletListener.stopHibernate(RhnServletListe
ner.java:108) at
com.redhat.rhn.webapp.RhnServletListener.contextDestroyed(RhnServletLi
stener.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.jav
a:631) at
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig
.java:1830) at java.base/
java.util.concurrent.Executors$RunnableAdapter.call(Executor
s.java:515) at java.base/
java.util.concurrent.FutureTask.run(FutureTask.java:264) at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExe
cutorService.java:75) at java.base/
java.util.concurrent.AbstractExecutorService.submit(Abstract
ExecutorService.java:118) at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.ja
va: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(LifecycleBas
e.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.jav
a: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.j
ava:1384) at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.j
ava:1374) at java.base/
java.util.concurrent.FutureTask.run(FutureTask.java:264) at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExe
cutorService.java:75) at java.base/
java.util.concurrent.AbstractExecutorService.submit(Abstract
ExecutorService.java:140) at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.jav
a:909) at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.j
ava: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.j
ava: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(NativeM
ethodAccessorImpl.java:62) at java.base/
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Del
egatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:
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(ConcurrentHash Map.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(Connectio
nManager.java:136) at
com.redhat.rhn.common.hibernate.HibernateFactory.createSessionFactory(
HibernateFactory.java:108) at
com.redhat.rhn.webapp.RhnServletListener.startHibernate(RhnServletList
ener.java:103) at
com.redhat.rhn.webapp.RhnServletListener.contextInitialized(RhnServlet
Listener.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.jav
a:631) at
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig
.java:1830) at java.base/
java.util.concurrent.Executors$RunnableAdapter.call(Executor
s.java:515) at java.base/
java.util.concurrent.FutureTask.run(FutureTask.java:264) at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExe
cutorService.java:75) at java.base/
java.util.concurrent.AbstractExecutorService.submit(Abstract
ExecutorService.java:118) at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.ja
va: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(LifecycleBas
e.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.jav
a: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.j
ava:1384) at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.j
ava:1374) at java.base/
java.util.concurrent.FutureTask.run(FutureTask.java:264) at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExe
cutorService.java:75) at java.base/
java.util.concurrent.AbstractExecutorService.submit(Abstract
ExecutorService.java:140) at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.jav
a:909) at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.j
ava: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.j
ava: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(NativeM
ethodAccessorImpl.java:62) at java.base/
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Del
egatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:
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 _______________________________________________ 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
Thank you Michael, it all boiled down to a permission issue, as Ricardo pointed out. This caused rhn.conf not to be read and the rhn logs not written. After fixing that and doing one more jaxb de-duplication, I was able to get a short glympse at "SUSE Manager". Tomcat started up, creating a user works, log into "SUSE Manager" (the first time only) and an empty dashboard is visible. Logging out doesnt show the sign-in screen anymore. Right direction but still quite a bit more work to do... - The setup routine does not complete successfully. - Some salt certificate issues. - Switching from "SUSE Manager" to "Uyuni". - Getting everything to show up. Have a good evening, Stefan ----- Ursprüngliche Mail ----- Von: "Michael Calmer" <mc@suse.de> An: devel@lists.uyuni-project.org Gesendet: Montag, 28. Dezember 2020 16:37:22 Betreff: Re: Uyuni Master Java issues on CentOS 8 Hi please check your /etc/rhn/rhn.conf . You should have the following 3 lines: hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect hibernate.connection.driver_class=org.postgresql.Driver hibernate.connection.driver_proto=jdbc:postgresql I think this is set in spacewalk-setup . You can configure debug logging in /srv/tomcat/webapps/rhn/WEB-INF/classes/log4j.properties (maybe tomcat is installed at a different place in CentOS) log4j.logger.com.redhat.rhn.common.hibernate.HibernateFactory=DEBUG But errors should always be logged. See also https://github.com/uyuni-project/uyuni/wiki/Java-Logging Am Montag, 28. Dezember 2020, 09:30:49 CET schrieb Stefan Bluhm:
One step forward: I managed to hook up Eclipse with Tomcat and was able to inspect some variables.
In the end spacewalk-java is trying to connect to "hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver". So it seems I really have to sort our the configuration file issue first.
The line: "LOG.error("FATAL ERROR creating HibernateFactory", e);" does get fired but I do not see anything in the logs.
Can you explain me (for dummies) how to enable logging properly? It seems that I am doing something wrong.
Thank you and best wishes,
Stefan
----- Ursprüngliche Mail ----- Von: "Stefan Bluhm" <opensuse.org@bluhm-de.com> An: "uyuni-devel" <uyuni-devel@opensuse.org> Gesendet: Donnerstag, 24. Dezember 2020 11:15:53 Betreff: Re: Uyuni Master Java issues on CentOS 8
Hello Uyuni Team,
can you please share some ideas for me on how to debug the below issue (previously mentioned here)? Unfortunately, I was not able to progress at all on this one.
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(ConnectionMana ger.java:276) at com.redhat.rhn.common.hibernate.HibernateFactory.getSession(HibernateFactor y.java:352) at com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery(Hi bernateFactory.java:275) at com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery(Hi bernateFactory.java:220) at com.redhat.rhn.domain.reactor.SaltEventFactory.countSaltEvents(SaltEventFac tory.java:54) at com.suse.manager.reactor.PGEventStream.<init>(PGEventStream.java:102) at com.suse.manager.webui.services.impl.SaltService.createEventStream(SaltServ ice.java:536) at com.suse.manager.webui.services.impl.SaltService.createOrGetEventStream(Sal tService.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(RhnServletListe ner.java:131) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java :4678) ...
Steps taken on CentOS 8: service tomcat start
Full logs: catalina.2020-12-24.log: https://pastebin.com/FTaVb9t4 localhost.2020-12-24.log: https://pastebin.com/mPkfxRr4
- Should I be looking at other logs (couldn't find any relevant ones). - Could this be a spacewalk-java build/packaging issue? The package was originally built without jaxb available. Then I would revisit the build process.
Thank you and best wishes,
Stefan
----- Ursprüngliche Mail ----- Von: "Stefan Bluhm" <opensuse.org@bluhm-de.com> An: "uyuni-devel" <uyuni-devel@opensuse.org> Gesendet: Donnerstag, 17. Dezember 2020 12:25:19 Betreff: Re: Uyuni Master Java issues on CentOS 8
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.
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(ConnectionMana ger.java:276) 276: info = new SessionInfo(sessionFactory.openSession());
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(ConnectionMana ger.java:276) at com.redhat.rhn.common.hibernate.HibernateFactory.getSession(HibernateFactor y.java:352) at com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery(Hi bernateFactory.java:275) at com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery(Hi bernateFactory.java:220) at com.redhat.rhn.domain.reactor.SaltEventFactory.countSaltEvents(SaltEventFac tory.java:54) at com.suse.manager.reactor.PGEventStream.<init>(PGEventStream.java:102) at com.suse.manager.webui.services.impl.SaltService.createEventStream(SaltServ ice.java:536) at com.suse.manager.webui.services.impl.SaltService.createOrGetEventStream(Sal tService.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(RhnServletListe ner.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(RhnServletListen er.java:125)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/ rhn/webapp/RhnServletListener.java#L125
at
com.redhat.rhn.webapp.RhnServletListener.startHibernate(RhnServletListener.j ava:103)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/ rhn/webapp/RhnServletListener.java#L103
at
com.redhat.rhn.common.hibernate.HibernateFactory.createSessionFactory(Hibern ateFactory.java:108)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/ rhn/common/hibernate/HibernateFactory.java#L108
at
com.redhat.rhn.common.hibernate.ConnectionManager.initialize(ConnectionManag er.java:136)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/ rhn/common/hibernate/ConnectionManager.java#L136
at
com.redhat.rhn.common.hibernate.ConnectionManager.createSessionFactory(Conne ctionManager.java:168)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/ rhn/common/hibernate/ConnectionManager.java#L168
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 :).
https://github.com/uyuni-project/uyuni/blob/master/java/buildconf/test/rhn .conf.postgresql-example
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.co nf
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 _______________________________________________ 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
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(ConnectionMana
ger.java:114)
at
com.redhat.rhn.common.hibernate.HibernateFactory.closeSessionFactory(H
ibernateFactory.java:92) at
com.redhat.rhn.webapp.RhnServletListener.stopHibernate(RhnServletListe
ner.java:108) at
com.redhat.rhn.webapp.RhnServletListener.contextDestroyed(RhnServletLi
stener.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.jav
a:631) at
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig
.java:1830) at java.base/
java.util.concurrent.Executors$RunnableAdapter.call(Executor
s.java:515) at java.base/
java.util.concurrent.FutureTask.run(FutureTask.java:264) at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExe
cutorService.java:75) at java.base/
java.util.concurrent.AbstractExecutorService.submit(Abstract
ExecutorService.java:118) at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.ja
va: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(LifecycleBas
e.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.jav
a: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.j
ava:1384) at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.j
ava:1374) at java.base/
java.util.concurrent.FutureTask.run(FutureTask.java:264) at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExe
cutorService.java:75) at java.base/
java.util.concurrent.AbstractExecutorService.submit(Abstract
ExecutorService.java:140) at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.jav
a:909) at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.j
ava: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.j
ava: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(NativeM
ethodAccessorImpl.java:62) at java.base/
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Del
egatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:
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(ConcurrentHash Map.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(Connectio
nManager.java:136) at
com.redhat.rhn.common.hibernate.HibernateFactory.createSessionFactory(
HibernateFactory.java:108) at
com.redhat.rhn.webapp.RhnServletListener.startHibernate(RhnServletList
ener.java:103) at
com.redhat.rhn.webapp.RhnServletListener.contextInitialized(RhnServlet
Listener.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.jav
a:631) at
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig
.java:1830) at java.base/
java.util.concurrent.Executors$RunnableAdapter.call(Executor
s.java:515) at java.base/
java.util.concurrent.FutureTask.run(FutureTask.java:264) at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExe
cutorService.java:75) at java.base/
java.util.concurrent.AbstractExecutorService.submit(Abstract
ExecutorService.java:118) at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.ja
va: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(LifecycleBas
e.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.jav
a: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.j
ava:1384) at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.j
ava:1374) at java.base/
java.util.concurrent.FutureTask.run(FutureTask.java:264) at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExe
cutorService.java:75) at java.base/
java.util.concurrent.AbstractExecutorService.submit(Abstract
ExecutorService.java:140) at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.jav
a:909) at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.j
ava: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.j
ava: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(NativeM
ethodAccessorImpl.java:62) at java.base/
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Del
egatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:
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
Those are great news Stefan, You are almost there. Some small comment in line. Have a good evening. On 12/28/20 9:09 PM, Stefan Bluhm wrote:
Thank you Michael,
it all boiled down to a permission issue, as Ricardo pointed out. This caused rhn.conf not to be read and the rhn logs not written. After fixing that and doing one more jaxb de-duplication, I was able to get a short glympse at "SUSE Manager". Tomcat started up, creating a user works, log into "SUSE Manager" (the first time only) and an empty dashboard is visible. Logging out doesnt show the sign-in screen anymore.
Right direction but still quite a bit more work to do... - The setup routine does not complete successfully.
Do you have any errors?
- Some salt certificate issues. - Switching from "SUSE Manager" to "Uyuni" Are you using the UYUNi codebase to produce the package? IIRC this should be a really easy fix.
- Getting everything to show up.
Looking foward for it
Have a good evening,
Stefan
----- Ursprüngliche Mail ----- Von: "Michael Calmer" <mc@suse.de> An: devel@lists.uyuni-project.org Gesendet: Montag, 28. Dezember 2020 16:37:22 Betreff: Re: Uyuni Master Java issues on CentOS 8
Hi
please check your /etc/rhn/rhn.conf . You should have the following 3 lines:
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect hibernate.connection.driver_class=org.postgresql.Driver hibernate.connection.driver_proto=jdbc:postgresql
I think this is set in spacewalk-setup .
You can configure debug logging in
/srv/tomcat/webapps/rhn/WEB-INF/classes/log4j.properties
(maybe tomcat is installed at a different place in CentOS)
log4j.logger.com.redhat.rhn.common.hibernate.HibernateFactory=DEBUG
But errors should always be logged.
See also https://github.com/uyuni-project/uyuni/wiki/Java-Logging
Am Montag, 28. Dezember 2020, 09:30:49 CET schrieb Stefan Bluhm:
One step forward: I managed to hook up Eclipse with Tomcat and was able to inspect some variables.
In the end spacewalk-java is trying to connect to "hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver". So it seems I really have to sort our the configuration file issue first.
The line: "LOG.error("FATAL ERROR creating HibernateFactory", e);" does get fired but I do not see anything in the logs.
Can you explain me (for dummies) how to enable logging properly? It seems that I am doing something wrong.
Thank you and best wishes,
Stefan
----- Ursprüngliche Mail ----- Von: "Stefan Bluhm" <opensuse.org@bluhm-de.com> An: "uyuni-devel" <uyuni-devel@opensuse.org> Gesendet: Donnerstag, 24. Dezember 2020 11:15:53 Betreff: Re: Uyuni Master Java issues on CentOS 8
Hello Uyuni Team,
can you please share some ideas for me on how to debug the below issue (previously mentioned here)? Unfortunately, I was not able to progress at all on this one.
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(ConnectionMana ger.java:276) at com.redhat.rhn.common.hibernate.HibernateFactory.getSession(HibernateFactor y.java:352) at com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery(Hi bernateFactory.java:275) at com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery(Hi bernateFactory.java:220) at com.redhat.rhn.domain.reactor.SaltEventFactory.countSaltEvents(SaltEventFac tory.java:54) at com.suse.manager.reactor.PGEventStream.<init>(PGEventStream.java:102) at com.suse.manager.webui.services.impl.SaltService.createEventStream(SaltServ ice.java:536) at com.suse.manager.webui.services.impl.SaltService.createOrGetEventStream(Sal tService.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(RhnServletListe ner.java:131) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java :4678) ...
Steps taken on CentOS 8: service tomcat start
Full logs: catalina.2020-12-24.log: https://pastebin.com/FTaVb9t4 localhost.2020-12-24.log: https://pastebin.com/mPkfxRr4
- Should I be looking at other logs (couldn't find any relevant ones). - Could this be a spacewalk-java build/packaging issue? The package was originally built without jaxb available. Then I would revisit the build process.
Thank you and best wishes,
Stefan
----- Ursprüngliche Mail ----- Von: "Stefan Bluhm" <opensuse.org@bluhm-de.com> An: "uyuni-devel" <uyuni-devel@opensuse.org> Gesendet: Donnerstag, 17. Dezember 2020 12:25:19 Betreff: Re: Uyuni Master Java issues on CentOS 8
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.
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(ConnectionMana ger.java:276) 276: info = new SessionInfo(sessionFactory.openSession());
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(ConnectionMana ger.java:276) at com.redhat.rhn.common.hibernate.HibernateFactory.getSession(HibernateFactor y.java:352) at com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery(Hi bernateFactory.java:275) at com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery(Hi bernateFactory.java:220) at com.redhat.rhn.domain.reactor.SaltEventFactory.countSaltEvents(SaltEventFac tory.java:54) at com.suse.manager.reactor.PGEventStream.<init>(PGEventStream.java:102) at com.suse.manager.webui.services.impl.SaltService.createEventStream(SaltServ ice.java:536) at com.suse.manager.webui.services.impl.SaltService.createOrGetEventStream(Sal tService.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(RhnServletListe ner.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(RhnServletListen er.java:125)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/ rhn/webapp/RhnServletListener.java#L125
at
com.redhat.rhn.webapp.RhnServletListener.startHibernate(RhnServletListener.j ava:103)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/ rhn/webapp/RhnServletListener.java#L103
at
com.redhat.rhn.common.hibernate.HibernateFactory.createSessionFactory(Hibern ateFactory.java:108)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/ rhn/common/hibernate/HibernateFactory.java#L108
at
com.redhat.rhn.common.hibernate.ConnectionManager.initialize(ConnectionManag er.java:136)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/ rhn/common/hibernate/ConnectionManager.java#L136
at
com.redhat.rhn.common.hibernate.ConnectionManager.createSessionFactory(Conne ctionManager.java:168)
https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redhat/ rhn/common/hibernate/ConnectionManager.java#L168
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 :).
https://github.com/uyuni-project/uyuni/blob/master/java/buildconf/test/rhn .conf.postgresql-example
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.co nf
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 _______________________________________________ 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
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(ConnectionMana
ger.java:114)
at
com.redhat.rhn.common.hibernate.HibernateFactory.closeSessionFactory(H
ibernateFactory.java:92) at
com.redhat.rhn.webapp.RhnServletListener.stopHibernate(RhnServletListe
ner.java:108) at
com.redhat.rhn.webapp.RhnServletListener.contextDestroyed(RhnServletLi
stener.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.jav
a:631) at
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig
.java:1830) at java.base/
java.util.concurrent.Executors$RunnableAdapter.call(Executor
s.java:515) at java.base/
java.util.concurrent.FutureTask.run(FutureTask.java:264) at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExe
cutorService.java:75) at java.base/
java.util.concurrent.AbstractExecutorService.submit(Abstract
ExecutorService.java:118) at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.ja
va: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(LifecycleBas
e.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.jav
a: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.j
ava:1384) at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.j
ava:1374) at java.base/
java.util.concurrent.FutureTask.run(FutureTask.java:264) at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExe
cutorService.java:75) at java.base/
java.util.concurrent.AbstractExecutorService.submit(Abstract
ExecutorService.java:140) at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.jav
a:909) at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.j
ava: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.j
ava: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(NativeM
ethodAccessorImpl.java:62) at java.base/
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Del
egatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:
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(ConcurrentHash Map.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(Connectio
nManager.java:136) at
com.redhat.rhn.common.hibernate.HibernateFactory.createSessionFactory(
HibernateFactory.java:108) at
com.redhat.rhn.webapp.RhnServletListener.startHibernate(RhnServletList
ener.java:103) at
com.redhat.rhn.webapp.RhnServletListener.contextInitialized(RhnServlet
Listener.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.jav
a:631) at
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig
.java:1830) at java.base/
java.util.concurrent.Executors$RunnableAdapter.call(Executor
s.java:515) at java.base/
java.util.concurrent.FutureTask.run(FutureTask.java:264) at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExe
cutorService.java:75) at java.base/
java.util.concurrent.AbstractExecutorService.submit(Abstract
ExecutorService.java:118) at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.ja
va: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(LifecycleBas
e.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.jav
a: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.j
ava:1384) at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.j
ava:1374) at java.base/
java.util.concurrent.FutureTask.run(FutureTask.java:264) at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExe
cutorService.java:75) at java.base/
java.util.concurrent.AbstractExecutorService.submit(Abstract
ExecutorService.java:140) at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.jav
a:909) at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.j
ava: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.j
ava: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(NativeM
ethodAccessorImpl.java:62) at java.base/
jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Del
egatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:
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 _______________________________________________ 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
Hi Am Montag, 28. Dezember 2020, 22:54:19 CET schrieb Ricardo Mateus: > Those are great news Stefan, yes, great. > You are almost there. > Some small comment in line. > > Have a good evening. > > On 12/28/20 9:09 PM, Stefan Bluhm wrote: > > > Thank you Michael, > > > > it all boiled down to a permission issue, as Ricardo pointed out. This > > caused rhn.conf not to be read and the rhn logs not written. After > > fixing that and doing one more jaxb de-duplication, I was able to get a > > short glympse at "SUSE Manager". Tomcat started up, creating a user > > works, log into "SUSE Manager" (the first time only) and an empty > > dashboard is visible. Logging out doesnt show the sign-in screen anymore. > > > > Right direction but still quite a bit more work to do... > > - The setup routine does not complete successfully. > > > Do you have any errors? > > > > - Some salt certificate issues. Maybe a difference in the path where things needs to be stored? > > - Switching from "SUSE Manager" to "Uyuni" Ahhh, check spacewalk-java.spec. There is an %if which should do the trick. I think it just check for "is_opensuse". > Are you using the UYUNi codebase to produce the package? IIRC this > should be a really easy fix. > > > > - Getting everything to show up. > > > Looking foward for it > > > > > > Have a good evening, > > > > Stefan > > > > ----- Ursprüngliche Mail ----- > > Von: "Michael Calmer" <mc@suse.de> > > An: devel@lists.uyuni-project.org > > Gesendet: Montag, 28. Dezember 2020 16:37:22 > > Betreff: Re: Uyuni Master Java issues on CentOS 8 > > > > Hi > > > > please check your /etc/rhn/rhn.conf . You should have the following 3 > > lines: > > hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect > > hibernate.connection.driver_class=org.postgresql.Driver > > hibernate.connection.driver_proto=jdbc:postgresql > > > > I think this is set in spacewalk-setup . > > > > You can configure debug logging in > > > > > > /srv/tomcat/webapps/rhn/WEB-INF/classes/log4j.properties > > > > > > (maybe tomcat is installed at a different place in CentOS) > > > > log4j.logger.com.redhat.rhn.common.hibernate.HibernateFactory=DEBUG > > > > But errors should always be logged. > > > > See also https://github.com/uyuni-project/uyuni/wiki/Java-Logging > > > > Am Montag, 28. Dezember 2020, 09:30:49 CET schrieb Stefan Bluhm: > > > >> One step forward: I managed to hook up Eclipse with Tomcat and was able > >> to > >> inspect some variables. > >> > > > >> > >> In the end spacewalk-java is trying to connect to > >> "hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver". So > >> it > >> seems I really have to sort our the configuration file issue first. > >> > > > >> > >> The line: "LOG.error("FATAL ERROR creating HibernateFactory", e);" does > >> get fired but I do not see anything in the logs. > >> > > > >> > >> Can you explain me (for dummies) how to enable logging properly? It > >> seems > >> that I am doing something wrong. > >> > > > >> > >> Thank you and best wishes, > >> > >> > >> > >> Stefan > >> > >> > >> > >> > >> ----- Ursprüngliche Mail ----- > >> Von: "Stefan Bluhm" <opensuse.org@bluhm-de.com> > >> An: "uyuni-devel" <uyuni-devel@opensuse.org> > >> Gesendet: Donnerstag, 24. Dezember 2020 11:15:53 > >> Betreff: Re: Uyuni Master Java issues on CentOS 8 > >> > >> > >> > >> Hello Uyuni Team, > >> > >> > >> > >> can you please share some ideas for me on how to debug the below issue > >> (previously mentioned here)? Unfortunately, I was not able to progress > >> at > >> all on this one. > >> > > > >> > >> 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(ConnectionMa > >> na ger.java:276) > >> > > at > >> > >> com.redhat.rhn.common.hibernate.HibernateFactory.getSession(HibernateFact > >> or y.java:352) at > >> com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery( > >> Hi bernateFactory.java:275) at > >> com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery( > >> Hi bernateFactory.java:220) at > >> com.redhat.rhn.domain.reactor.SaltEventFactory.countSaltEvents(SaltEventF > >> ac tory.java:54) at > >> com.suse.manager.reactor.PGEventStream.<init>(PGEventStream.java:102) at > >> com.suse.manager.webui.services.impl.SaltService.createEventStream(SaltSe > >> rv ice.java:536) at > >> com.suse.manager.webui.services.impl.SaltService.createOrGetEventStream(S > >> al tService.java:488) at > >> com.suse.manager.webui.services.impl.SaltService.getEventStream(SaltServi > >> ce .java:546) at > >> com.suse.manager.reactor.SaltReactor.connectToEventStream(SaltReactor.jav > >> a: 184) at > >> com.suse.manager.reactor.SaltReactor.start(SaltReactor.java:155) at > >> com.redhat.rhn.webapp.RhnServletListener.contextInitialized(RhnServletLi > >> ste ner.java:131) at > >> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.ja > >> va >> > >> :4678) ... > >> > >> > >> > >> Steps taken on CentOS 8: > >> service tomcat start > >> > >> > >> > >> Full logs: > >> catalina.2020-12-24.log: https://pastebin.com/FTaVb9t4 > >> localhost.2020-12-24.log: https://pastebin.com/mPkfxRr4 > >> > >> > >> > >> - Should I be looking at other logs (couldn't find any relevant ones). > >> - Could this be a spacewalk-java build/packaging issue? The package was > >> originally built without jaxb available. Then I would revisit the build > >> process. > >> > > > >> > >> Thank you and best wishes, > >> > >> > >> > >> Stefan > >> > >> > >> > >> > >> > >> ----- Ursprüngliche Mail ----- > >> Von: "Stefan Bluhm" <opensuse.org@bluhm-de.com> > >> An: "uyuni-devel" <uyuni-devel@opensuse.org> > >> Gesendet: Donnerstag, 17. Dezember 2020 12:25:19 > >> Betreff: Re: Uyuni Master Java issues on CentOS 8 > >> > >> > >> > >> 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. > >> > > > >> > >> 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(ConnectionMa > >> na ger.java:276) 276: info = new > >> SessionInfo(sessionFactory.openSession()); > >> > >> > >> > >> > >> 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(ConnectionMa > >> na ger.java:276) > >> > > at > >> > >> com.redhat.rhn.common.hibernate.HibernateFactory.getSession(HibernateFact > >> or y.java:352) at > >> com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery( > >> Hi bernateFactory.java:275) at > >> com.redhat.rhn.common.hibernate.HibernateFactory.listObjectsByNamedQuery( > >> Hi bernateFactory.java:220) at > >> com.redhat.rhn.domain.reactor.SaltEventFactory.countSaltEvents(SaltEventF > >> ac tory.java:54) at > >> com.suse.manager.reactor.PGEventStream.<init>(PGEventStream.java:102) at > >> com.suse.manager.webui.services.impl.SaltService.createEventStream(SaltSe > >> rv ice.java:536) at > >> com.suse.manager.webui.services.impl.SaltService.createOrGetEventStream(S > >> al tService.java:488) at > >> com.suse.manager.webui.services.impl.SaltService.getEventStream(SaltServi > >> ce .java:546) at > >> com.suse.manager.reactor.SaltReactor.connectToEventStream(SaltReactor.jav > >> a: 184) at > >> com.suse.manager.reactor.SaltReactor.start(SaltReactor.java:155) at > >> com.redhat.rhn.webapp.RhnServletListener.contextInitialized(RhnServletLi > >> ste ner.java:131) at > >> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.ja > >> va >> > >> :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(RhnServletLis > >> ten er.java:125) > >> > > > >> > >> https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redh > >> at/ rhn/webapp/RhnServletListener.java#L125 > >> > > > >> > >> > >> > >> > at > >> > >> > >> > >> com.redhat.rhn.webapp.RhnServletListener.startHibernate(RhnServletListene > >> r.j ava:103) > >> > > > >> > >> https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redh > >> at/ rhn/webapp/RhnServletListener.java#L103 > >> > > > >> > >> > >> > >> > at > >> > >> > >> > >> com.redhat.rhn.common.hibernate.HibernateFactory.createSessionFactory(Hib > >> ern ateFactory.java:108) > >> > > > >> > >> https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redh > >> at/ rhn/common/hibernate/HibernateFactory.java#L108 > >> > > > >> > >> > >> > >> > at > >> > >> > >> > >> com.redhat.rhn.common.hibernate.ConnectionManager.initialize(ConnectionMa > >> nag er.java:136) > >> > > > >> > >> https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redh > >> at/ rhn/common/hibernate/ConnectionManager.java#L136 > >> > > > >> > >> > >> > >> > at > >> > >> > >> > >> com.redhat.rhn.common.hibernate.ConnectionManager.createSessionFactory(Co > >> nne ctionManager.java:168) > >> > > > >> > >> https://github.com/uyuni-project/uyuni/blob/master/java/code/src/com/redh > >> at/ rhn/common/hibernate/ConnectionManager.java#L168 > >> > > > >> > >> > >> > >> 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. > >>> co > >>> nf > >>> > > - > > > >>> https://github.com/uyuni-project/uyuni/blob/master/java/buildconf/test/r > >>> hn > >>> .conf.postgresql-example > >>> > > > > > >>> 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(ConcurrentHash > > > >>>> Map.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(Connectio > > > >>>> nManager.java:136) at > >>>> > > > > com.redhat.rhn.common.hibernate.HibernateFactory.createSessionFactory( > > > >>>> HibernateFactory.java:108) at > >>>> > > > > com.redhat.rhn.webapp.RhnServletListener.startHibernate(RhnServletList > > > >>>> ener.java:103) at > >>>> > > > > com.redhat.rhn.webapp.RhnServletListener.contextInitialized(RhnServlet > > > >>>> Listener.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.jav > > > >>>> a:631) at > >>>> > > > > org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig > > > >>>> .java:1830) at > >>>> java.base/ > > > > java.util.concurrent.Executors$RunnableAdapter.call(Executor > > > >>>> s.java:515) at > >>>> java.base/ > > > > java.util.concurrent.FutureTask.run(FutureTask.java:264) at > > > >>>> > > > > org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExe > > > >>>> cutorService.java:75) at > >>>> java.base/ > > > > java.util.concurrent.AbstractExecutorService.submit(Abstract > > > >>>> ExecutorService.java:118) at > >>>> > > > > org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.ja > > > >>>> va: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(LifecycleBas > > > >>>> e.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.jav > > > >>>> a: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.j > > > >>>> ava:1384) at > >>>> > > > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.j > > > >>>> ava:1374) at > >>>> java.base/ > > > > java.util.concurrent.FutureTask.run(FutureTask.java:264) at > > > >>>> > > > > org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExe > > > >>>> cutorService.java:75) at > >>>> java.base/ > > > > java.util.concurrent.AbstractExecutorService.submit(Abstract > > > >>>> ExecutorService.java:140) at > >>>> > > > > org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.jav > > > >>>> a:909) at > >>>> > > > > org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.j > > > >>>> ava: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.j > > > >>>> ava: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(NativeM > > > >>>> ethodAccessorImpl.java:62) at > >>>> java.base/ > > > > jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Del > > > >>>> egatingMethodAccessorImpl.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(ConnectionMana > > > >>>> ger.java:114) > > > > at > > > >>>> > > > > com.redhat.rhn.common.hibernate.HibernateFactory.closeSessionFactory(H > > > >>>> ibernateFactory.java:92) at > >>>> > > > > com.redhat.rhn.webapp.RhnServletListener.stopHibernate(RhnServletListe > > > >>>> ner.java:108) at > >>>> > > > > com.redhat.rhn.webapp.RhnServletListener.contextDestroyed(RhnServletLi > > > >>>> stener.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.jav > > > >>>> a:631) at > >>>> > > > > org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig > > > >>>> .java:1830) at > >>>> java.base/ > > > > java.util.concurrent.Executors$RunnableAdapter.call(Executor > > > >>>> s.java:515) at > >>>> java.base/ > > > > java.util.concurrent.FutureTask.run(FutureTask.java:264) at > > > >>>> > > > > org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExe > > > >>>> cutorService.java:75) at > >>>> java.base/ > > > > java.util.concurrent.AbstractExecutorService.submit(Abstract > > > >>>> ExecutorService.java:118) at > >>>> > > > > org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.ja > > > >>>> va: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(LifecycleBas > > > >>>> e.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.jav > > > >>>> a: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.j > > > >>>> ava:1384) at > >>>> > > > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.j > > > >>>> ava:1374) at > >>>> java.base/ > > > > java.util.concurrent.FutureTask.run(FutureTask.java:264) at > > > >>>> > > > > org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExe > > > >>>> cutorService.java:75) at > >>>> java.base/ > > > > java.util.concurrent.AbstractExecutorService.submit(Abstract > > > >>>> ExecutorService.java:140) at > >>>> > > > > org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.jav > > > >>>> a:909) at > >>>> > > > > org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.j > > > >>>> ava: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.j > > > >>>> ava: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(NativeM > > > >>>> ethodAccessorImpl.java:62) at > >>>> java.base/ > > > > jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Del > > > >>>> egatingMethodAccessorImpl.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 > >> _______________________________________________ > >> 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 > > > > _______________________________________________ > > 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 > > _______________________________________________ > > 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 > _______________________________________________ > 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
- The setup routine does not complete successfully. Do you have any errors?
It is now completing successfully. There will be a few code changes needed. Only think I couldn't get figured out yet is smdba not working. I will leave that for later.
- Some salt certificate issues. Maybe a difference in the path where things needs to be stored?
Yes that is the issue. Will also look at that later.
- Switching from "SUSE Manager" to "Uyuni" Ahhh, check spacewalk-java.spec. There is an %if which should do the trick. I think it just check for "is_opensuse".
This is where I need some direction on. I am running SUSE Manager which is looking for js scripts that do not exist. That explains the empty dash board or the empty login page. I rebuild spacewalk-java.spec with the "is_opensuse" logic and re-installed spacewalk-java-*.rpm. I also took the Uyuni Master spacewalk-java-libs.rpm directly and re-installed it. The interface did not jump to Uyuni. Any hint what needs to be replaced (quick and dirty... And yes, I did restart Tomcat and mgr-setup)? It should only be the rhn.jar, right? Ideally, I would like to avoid rebuilding my current dev system from scratch until I have the changes recorded. (too many dirty workarounds everywhere atm). It would be great to send you all a screenshot of Uyuni on a C8 box before the end of the year :) Best wishes, Stefan
Hi Am Dienstag, 29. Dezember 2020, 21:44:57 CET schrieb Stefan Bluhm:
- The setup routine does not complete successfully. [...] Ahhh, check spacewalk-java.spec. There is an %if which should do the trick. I think it just check for "is_opensuse".
This is where I need some direction on. I am running SUSE Manager which is looking for js scripts that do not exist. That explains the empty dash board or the empty login page.
I rebuild spacewalk-java.spec with the "is_opensuse" logic and re-installed spacewalk-java-*.rpm. I also took the Uyuni Master spacewalk-java-libs.rpm directly and re-installed it. The interface did not jump to Uyuni. Any hint what needs to be replaced (quick and dirty... And yes, I did restart Tomcat and mgr-setup)? It should only be the rhn.jar, right?
Ideally, I would like to avoid rebuilding my current dev system from scratch until I have the changes recorded. (too many dirty workarounds everywhere atm).
It would be great to send you all a screenshot of Uyuni on a C8 box before the end of the year :)
In the end it is just a configuration thingy. uyuni-master-srv:/usr/share/rhn/config-defaults # grep -i uyuni * rhn.conf:product_name = Uyuni rhn_java.conf:java.product_tree_tag = Uyuni rhn_web.conf:web.theme_default = uyuni The first one where we set "product_name" is mostly used in the UI and code when we want to diffentiate between SUSE Manager and Uyuni. The second one is important for product syncing in case you have SCC access but no SUSE Manager Subscription. The last one is only the default theme . Best wishes Michael
Thank you all! The activity list grew but I finally have my screenshot :) The screens all seem to load and navigation is possible. https://www.bluhm-de.com/content/os-tools/en/applications/uyuni/installing-u... Best wishes, Stefan
participants (3)
-
Michael Calmer
-
Ricardo Mateus
-
Stefan Bluhm