1 2 Previous Next 21 Replies Latest reply on May 19, 2009 12:37 PM by dhartford

    Create new WAR resource issue

    dhartford

      hey all,
      First time trying out Jopr, and looks very promising!

      I've been able to install jopr-server-2.2.0 and a local postgresql (via quick-click installer) with database/username/password all fine. On that local install I can create a WAR resource fine.

      However, after I install the agent on a remote server that is running jboss 4.2.2, I get the inventory information and everything looks good -- until I try to create a WAR resource. Then I get:

      Failed to send create resource request to agent. Cause: javax.ejb.EJBException:javax.persistence.PersistenceException: org.hibernate.PersistentObjectException: detached entity passed to persist: org.rhq.core.domain.configuration.Configuration -> javax.persistence.PersistenceException:org.hibernate.PersistentObjectException: detached entity passed to persist: org.rhq.core.domain.configuration.Configuration -> org.hibernate.PersistentObjectException:detached entity passed to persist: org.rhq.core.domain.configuration.Configuration
      


      I tried to look for some logs, but in the jopr server, the /log/rt/* doesn't seem to have much information. Could someone help me to move forward please?

      thanks!
      -D

        • 1. Re: Create new WAR resource issue
          dhartford

          If it is relevant, the local jopr install I see jboss app server with a lot of children in the tree (Applications, applications:War resources, Jboss AS JVM, etc), but the remote server does not have any children when viewed through Jopr.

          • 2. Re: Create new WAR resource issue
            mazz

            Can you post the full stack trace for that exception? That looks really bad. Usually some bad EJB3 JPA code causes that. Look in <server-install-dir>/logs/rhq-server-log4j.xml

            • 3. Re: Create new WAR resource issue
              mazz

              Although it seems odd that your remote JBossAS 4.2 server isn't showing any children. Its as if it wasn't fully imported yet.

              I assume you imported your JBossAS 4.2 server into inventory. What if you go to the Inventory>Connections subtab - does your connection properties look correct? Do you need credentials to connect to your JBossAS 4.2 JNP connector and if so are the credentials in this UI page correct?

              • 4. Re: Create new WAR resource issue
                dhartford

                 

                "mazz" wrote:
                Although it seems odd that your remote JBossAS 4.2 server isn't showing any children. Its as if it wasn't fully imported yet.

                I assume you imported your JBossAS 4.2 server into inventory. What if you go to the Inventory>Connections subtab - does your connection properties look correct? Do you need credentials to connect to your JBossAS 4.2 JNP connector and if so are the credentials in this UI page correct?


                To my knowledge, it's "fully imported". If there is asome directions I could follow to be more definitive, I will gladly do so.

                Inventory->Connections subtab (on my RHQ Server, listing the remote server directly) only lists:

                *Enable Content Discovery=no (read only)
                *Yum server port
                *Metadata Cache timeout

                ok...that was wierd. After about 30 seconds or so on that page, the 'enable content discovery' became modifiable. I changed that to 'yes' to see if that might help.

                Listing the remote Jboss 4.2.2 server Inventory->Connections:

                *Naming provider URL: 127.0.0.1:1099 (should that be different?)
                *binding address: 0.0.0.0 (should that be different? Wouldn't think so for default install)

                no credentials, default jboss zip install.
                *dir/paths look correct, correct configuration server.



                • 5. Re: Create new WAR resource issue
                  dhartford

                  log - in the root of the jopr-server-2.2.0 install is a /log directory, I was looking under the jbossas/** location :-P

                  watching the rhq-server-log4j.log with default config while attempting to create the WAR resource did not show any errors or warnings.

                  SIDENOTE: In the /jbossas/server/default/conf there is a logging.properties file, which says it should log an rhq-server-jdklog.log (i.e. it's a commons/jdk logging). May be confusing for someone who doesn't see the jboss-log4j.xml file.


                  The log4j default config looks like it should catch any hibernate warning/errors, but yet nothing in the logs.


                  • 6. Re: Create new WAR resource issue
                    mazz

                     

                    "hartfordd" wrote:
                    Inventory->Connections subtab (on my RHQ Server, listing the remote server directly) only lists:

                    *Enable Content Discovery=no (read only)
                    *Yum server port
                    *Metadata Cache timeout


                    That's not the JBossAS resource - you were looking at the platform resource. Those are the Linux Platform resource type connection properties (look at the breadcrumbs at the top , it'll tell you what resource you are looking at - the tree nav on the left will also show you what is selected).

                    • 7. Re: Create new WAR resource issue
                      mazz

                       

                      SIDENOTE: In the /jbossas/server/default/conf there is a logging.properties file, which says it should log an rhq-server-jdklog.log (i.e. it's a commons/jdk logging). May be confusing for someone who doesn't see the jboss-log4j.xml file.


                      We emit logs using log4j - but some third party libraries log using JDK logging - so we just configure it to write the logs in the same place as the other log files - so you only have to go to one place (<server-install-dir>/logs) to see all relevent log files.

                      • 8. Re: Create new WAR resource issue
                        mazz

                        You might want to read through these docs to get familiar with some parts of the UI:

                        http://www.redhat.com/docs/en-US/JBoss_ON/2.2/html/Feature_Guide/index.html

                        • 9. Re: Create new WAR resource issue
                          dhartford

                           

                          "mazz" wrote:

                          That's not the JBossAS resource - you were looking at the platform resource. Those are the Linux Platform resource type connection properties (look at the breadcrumbs at the top , it'll tell you what resource you are looking at - the tree nav on the left will also show you what is selected).



                          Listing the remote Jboss 4.2.2 server Inventory->Connections:

                          *Naming provider URL: 127.0.0.1:1099 (should that be different?)
                          *binding address: 0.0.0.0 (should that be different? Wouldn't think so for default install)

                          no credentials, default jboss zip install.
                          *dir/paths look correct, correct configuration server.


                          I was just doing full disclosure of both the platform and the jbossas specific inventory connections.

                          • 10. Re: Create new WAR resource issue
                            dhartford

                            Just to make sure I didn't miss anything:

                            *Installed postgresql
                            *created rhq database with rhqadmin user/password. Used psql to connect, everything working as expected.
                            *Installed jopr-server-2.2.0
                            *went to localhost:7080, finished configuration, brought up jopr fine.
                            *See local RHQ Server jbossas resource, see children in tree, and can add WAR resources to the RHQ server jbossas resource fine.

                            ----
                            *Downloaded from :7080/agentupdate/download, got 'rhq-enterprise-agent-1.2.0.jar'.
                            *copied agent jar to remote server that has a fresh jboss 4.2.2 zip install running as-is.
                            *java -jar <agent.jar> --install
                            *followed directions, pointed to RHQ server address.
                            *did 'discovery' and 'inventory' through agent.
                            ----

                            *On JOPR server web interface, see in the dashboard under 'Auto-Discovery' the remote server. 'Import All'. Now visible as a recently added resource.

                            *Drilling down to that resource, all the way to jbossas, I see the jbossas install, but no children in the tree. Unable to create WAR resource, exception is in red from the web interface (see top of this thread).

                            Maybe I missed a step somewhere?

                            • 11. Re: Create new WAR resource issue
                              mazz

                              If you do not see any children under your remote JBossAS resource, it probably means the agent is not able to connect to your JBossAS resource.

                              If you are using later release of JBossAS, they changed it such that the remote JNP connector is secured by default - you need credentials of "admin/admin" to connect to it, by default.

                              What happens if you traverse to your JBossAS resource in the UI? Do you get an yellow error message saying something about "cannot connect to the JBossAS server"?

                              To test things out, go to your remote box where your JbossAS instance is running. And try to connect to it via twiddle (twiddle.sh is located in your JBossAS instance's /bin directory)

                              twiddle --server=jnp://127.0.0.1:1099 query *:*


                              This will attempt to connect to your JNP endpoint of your server and query the MBeans. If this fails, then the agent will also fail to monitor your app server. See if you need credentials to connect - by default, JBossAS requires admin/admin creds:

                              twiddle --server=jnp://127.0.0.1:1099 --user=admin --password=admin query *:*




                              • 12. Re: Create new WAR resource issue
                                dhartford

                                excellent cross-check

                                twiddle --server=jnp://127.0.0.1:1099 query *:*


                                Unfortunately, that worked without credentials, so I'm still stuck.

                                Looking at the older jopr instances, they had separate agents that had versions similar to the jopr version.

                                rhq-enterprise-agent-1.2.0.jar -- maybe should be using something different with jopr 2.2.0?

                                Manifest of the agent says build 3872, maven pom says 1.2.0.

                                • 13. Re: Create new WAR resource issue
                                  dhartford

                                  Drilling down does not bring up a yellow box/cannot connect. It's a 'closed' suitcase looking icon (same as RHQ Agent, and other services, none of which can drill down).

                                  Attempting to use the operation->restart ended in failure, says "PluginContainerException: Component does not exist for resource"





                                  • 14. Re: Create new WAR resource issue
                                    dhartford

                                    ahah --- on the remote server, using the agent:

                                    'avail' -> "This agent does not have any committed resources in inventory. You must commit at least the platform resource to inventory in order to obtain availability reports."

                                    not sure what should be done to commit though.

                                    1 2 Previous Next