1 2 Previous Next 16 Replies Latest reply on May 13, 2010 1:46 AM by jorgedieguez

    Fail to build ManagedDeployment for:

      Hi JBoss team,

       

      I have installed JBoss AS 5.1.0.GA (jdk6) but I haven't been able to connect neither connect from Eclipse IDE nor from the Console.

       

      I have looked at some posts: http://community.jboss.org/thread/2615 and http://www.coderanch.com/t/440163/JBoss/Error-JBOSS-startup-Property-not , following some advices but still unsuccessful to connect.

       

      The log on server.log stops at:

       

      INFO  [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 1m:10s:110ms

       

      and the log at bootstrap.log shows the following:


      11:23:17,031 DEBUG [ProfileServiceBootstrap] Failed to build ManagedDeployment for: /././...logging.xml

       

      and,


      11:23:17,031 DEBUG [ProfileServiceBootstrap] Failed to build ManagedDeployment for: /././... vfs.xml

       

      Environment:

       

      JBOSS_HOME: C:\JBoss\jboss-5.1.0.GA

      JAVA: C:\Program Files\Java\jdk1.6.0_20\bin\java

      JAVA_OPTS: -Dprogram.name=run.bat -Xms128M -Xmx512M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dorg.jboss.resolver.warning=true -server

      CLASSPATH: C:\JBoss\jboss-5.1.0.GA\bin\run.jar

       

      Can you please provide me with advice and help?

       

      I'm attaching both logs for your analysis.

       

      Many thanks,

       

      Jorge

        • 1. Re: Fail to build ManagedDeployment for:
          peterj

          How are you trying to connect with Eclipse?  Do you have JBoss Tools installed within Eclipse? How did you set up the project in Eclipse?

           

          What "Console" are you talking about?

           

          According to the server.log, you will only be able to access JBoss AS via localhost. That is, http://localhost:8080 will work but http://yourhostname:8080 will not.

          • 2. Re: Fail to build ManagedDeployment for:

            Hi Peter,

             

            Peter Johnson wrote:

             

            How are you trying to connect with Eclipse?  Do you have JBoss Tools installed within Eclipse? How did you set up the project in Eclipse?

             

             

            This how I set up Jboss in Eclipse. I installed JBoss 5.0 adapter in the Servers runtime preferences (see note bellow), created a Server at the local host as follows:

            Host name: localhost

            address: 127.0.0.1

            JNDI port : 1099

            Server configuration: default

            Http port: currently 9191 (before 8080)

             

            Then started, after a while I've got in the console:

             

            13:23:17,687 INFO  [ServerImpl] JBoss (Microcontainer) [5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902232048)] Started in 28s:734ms

             

            and it seems no further activity in the server...

             

            Then the server goes to Stoped state in the Server view and the message bellow follows:

             

            Server JBoss v5.0 at localhost was unable to start within 50 seconds. If the server requires more time, try increasing the timeout in the server editor. I have encreased the timeout but still same problem.

             

            I haven't added a project to the server yet. The problem comes while starting the server.

             

            Note: I apologize for the mistake. I had installed the JBoss 5.0 adapter in Eclipse but then I was pointing to the wrong installation directorey which was JBoss 5.1.0. Currently the JBoss 5.0 adapter is pointing to JBoss 5.0.1. However, still same issue!

             

            Also note that the same logs got out from the server when I use the command line to start it!

             

            Peter Johnson wrote:

             

            What "Console" are you talking about?

            I meant the Command line from Windows. I'm sorry for the word "console" that means too many things.

             

            Peter Johnson wrote:

             

            According to the server.log, you will only be able to access JBoss AS via localhost. That is, http://localhost:8080 will work but http://yourhostname:8080 will not.

            Roger that!

             

            Many thanks for your help. If you require more data please, don't hesitate to ask.

             

            Jorge

            • 3. Re: Fail to build ManagedDeployment for:
              peterj

              >>Then the server goes to Stoped state in the Server view and the  message bellow follows:

              >>

              >>Server JBoss v5.0 at localhost was unable to  start within 50 seconds. If the server requires more time, try  increasing the timeout in the server >>editor. I have encreased the  timeout but still same problem.

               

              This means that Eclipse cannot communicate with the JMX server within JBoss AS. You indicated that you change the HTTP port, but not the JNDI port. Did you change any other ports? Did you apply any security setting to the JMX invoker, or are you running EAP 5 which has the JMX invoker locked down by default? What ports are actually open by JBoss AS (you can use netstat or tcpview to find out)?

               

              >>I meant the Command line from Windows.

              What are you running in the command prompt to determine whether JBoss AS is running? I am referring to this sentence in your original post: "I haven't been able to connect neither connect ... from  the Console."

              • 4. Re: Fail to build ManagedDeployment for:

                Peter Johnson wrote:

                 

                >>Then the server goes to Stoped state in the Server view and the  message bellow follows:

                >>

                >>Server JBoss v5.0 at localhost was unable to  start within 50 seconds. If the server requires more time, try  increasing the timeout in the server >>editor. I have encreased the  timeout but still same problem.

                 

                This means that Eclipse cannot communicate with the JMX server within JBoss AS. You indicated that you change the HTTP port, but not the JNDI port. Did you change any other ports? Did you apply any security setting to the JMX invoker, or are you running EAP 5 which has the JMX invoker locked down by default? What ports are actually open by JBoss AS (you can use netstat or tcpview to find out)?

                Hi Peter,

                 

                No. I haven't changed any other ports i.e. http: 9090, JNDI: 1099


                I haven't apply any security settings to JMX (that I know off) or running EAP 5.

                 

                Here is the results from netstat -a after running C:\JBoss\jboss-5.0.1.GA\bin\run.bat

                 

                Connexions actives

                 

                  Proto  Adresse locale         Adresse distante       Etat
                  TCP    ezd01:epmap            ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:microsoft-ds     ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:1550             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:2701             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:2702             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:3389             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:5800             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:5900             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:31890            ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:1025             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:1027             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:1047             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:1090             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:1098             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:1099             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:1627             localhost:23560        SYN_SENT
                  TCP    ezd01:3873             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:4444             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:4445             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:4446             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:4457             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:4712             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:4713             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:5152             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:5152             localhost:1144         CLOSE_WAIT
                  TCP    ezd01:8009             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:8080             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:8083             ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:21584            ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:netbios-ssn      ezd01.ezed.com:0  LISTENING
                  TCP    ezd01:1554             ezd01.ezed.com:0  LISTENING
                  UDP    ezd01:microsoft-ds     *:*
                  UDP    ezd01:isakmp           *:*
                  UDP    ezd01:4500             *:*
                  UDP    ezd01:9370             *:*
                  UDP    ezd01:31890            *:*
                  UDP    ezd01:ntp              *:*
                  UDP    ezd01:1900             *:*
                  UDP    ezd01:ntp              *:*
                  UDP    ezd01:netbios-ns       *:*
                  UDP    ezd01:netbios-dgm      *:*
                  UDP    ezd01:1478             *:*
                  UDP    ezd01:1900             *:*

                 

                Notice that I'm working with Jboss AS in local i.e. localhost.

                 

                Peter Johnson wrote:

                 

                >>I meant the Command line from Windows.

                What are you running in the command prompt to determine whether JBoss AS is running? I am referring to this sentence in your original post: "I haven't been able to connect neither connect ... from  the Console."

                 

                I'm running "C:\JBoss\jboss-5.0.1.GA\bin\run.bat" in the command line. Then the server seems to hangup...

                 

                14:33:33,328 INFO  [TomcatDeployment] deploy, ctxPath=/jmx-console
                14:33:33,406 INFO  [Http11Protocol] D´┐¢marrage de Coyote HTTP/1.1 sur http-127.0.0.1-8080
                14:33:33,437 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
                14:33:33,453 INFO  [ServerImpl] JBoss (Microcontainer) [5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902232048)] Started in 51s:860ms

                 

                Many thanks for your help,

                 

                Jorge

                • 5. Re: Fail to build ManagedDeployment for:
                  peterj

                  >>I'm running "C:\JBoss\jboss-5.0.1.GA\bin\run.bat" in the command line.  Then the server seems to hangup...

                   

                  No it does not hang up.  The "started in xxx seconds" is that last console log entry made during startup. Only if you are interacting with apps deployed to JBoss AS, and either those apps or some code within JBoss AS does any INFO logging, will you see any other output at the console.

                   

                  The netstat output does not help, you need to pass the proper parameters to know which process is associated with each port: netstat -abn

                  Also, post only the Jboss AS ports, not that whole netstat output.

                  • 6. Re: Fail to build ManagedDeployment for:

                    Peter Johnson wrote:

                     

                    >>I'm running "C:\JBoss\jboss-5.0.1.GA\bin\run.bat" in the command line.  Then the server seems to hangup...

                     

                    No it does not hang up.  The "started in xxx seconds" is that last console log entry made during startup. Only if you are interacting with apps deployed to JBoss AS, and either those apps or some code within JBoss AS does any INFO logging, will you see any other output at the console.

                     

                    Peter,

                     

                    Should I assume then that the server has correctly started? If positive then, why the "Startup timeout"  goes off in Eclipse? It has being that timeout the sole reason that made me beleive that the server didn't start currectly  and then post this thread!!! In fact, after installation and local server creation I didn't add any application to the server, I thought it was paramount to check the server's startup first and then -if ok- add a project to the server in Eclipse, but then again that "start timeout"!!!

                     

                    Peter Johnson wrote:


                    The netstat output does not help, you need to pass the proper parameters to know which process is associated with each port: netstat -abn

                    Also, post only the Jboss AS ports, not that whole netstat output.

                     

                    Here is netstat -abn result:

                     


                      TCP    127.0.0.1:1090         0.0.0.0:0              LISTENING       5036
                      [java.exe]

                     

                      TCP    127.0.0.1:4457         0.0.0.0:0              LISTENING       5036
                      [java.exe]

                     

                      TCP    127.0.0.1:8009         0.0.0.0:0              LISTENING       5036
                      [java.exe]

                     

                      TCP    127.0.0.1:8080         0.0.0.0:0              LISTENING       5036
                      [java.exe]

                     

                      TCP    127.0.0.1:8083         0.0.0.0:0              LISTENING       5036
                      [java.exe]

                     

                    I assume that this are the port numbers you are looking for. I don't see any text indicating JBoss as application.

                     

                    What I did:

                     

                    1) netstat -abn (Jboss shutdown, all applications and physical interfaces too)

                    2) start Jboss (C:\JBoss\jboss-5.0.1.GA\bin\run.bat)

                    3)correlate the new ports between netstat's logs and then against server.log

                     

                    Many thanks,

                     

                    Jorge

                    • 7. Re: Fail to build ManagedDeployment for:
                      peterj

                      >>Should I assume then that the server has correctly started?

                      Yes.

                       

                      >>Here is netstat -abn result:

                      That looks like the standard set of ports for JBoss AS.

                       

                      >>I don't see any text indicating JBoss as application

                      All Java apps use the "java.exe" or "javaw.exe" process (well, almost, some use other launchers such as Eclipse which uses "eclipse.exe"). To figure out which Java app is running you need to use something like Task manager on Windows 7 which has an optional "Command Line" column, or better yet Process Explorer from Sysinternals.  The main class is shown in the command line info and from there you can determine the Java app.

                       

                      >>why the "Startup timeout"  goes off in Eclipse?

                      In order to determine if JBoss AS is running, Eclipse first connects to the JNDI port and asks for the JMX managed server. Once it gets that it asks the managed server for the Server mbean. Once it gets the server mbean it asks for the status. Not until the status is "running" will Eclipse be satisfied. If any of the above steps fails, Eclipse repeats that step until that step passes. If all of the steps cannot be done within a specific time (30 seconds by default), Eclipse gives that "not started" message.

                       

                      The typical reason that it fails is that the ports are wrong. But other errors are possible. Debugging this would be so much easier if Eclipse were to at least indicate what step it was on. But we can simulate these steps (but I have a meeting right now so I will write the debugging steps out later).

                      • 8. Re: Fail to build ManagedDeployment for:
                        peterj

                        With JBoss AS running, open a second command prompt in the JBoss AS bin directory and enter this command and post the results:

                         

                        twiddle get "jboss.system:type=Server" Started

                        • 9. Re: Fail to build ManagedDeployment for:

                          Peter,

                           

                          Very inlighting comments...Many thanks for the tip on process explorer...

                           

                          Here is the output from the command line:

                           

                          C:\JBoss\jboss-5.0.1.GA\bin>twiddle get "jboss.system:type=Server" Started
                          Started=true
                          C:\JBoss\jboss-5.0.1.GA\bin>

                           

                          As you suggested I have already installed "process explorer" (very informed!!!) However, as

                           

                          >> (look for:) The main class is  shown in the command line info and from there you can determine the Java  app.

                           

                          I haven't been able to find it. I looked in the server log for strings: "main", "class", "main class" with no luck... I'm missing something here, I didn't get it right!.

                           

                          Many thanks,

                           

                          Jorge

                          • 10. Re: Fail to build ManagedDeployment for:
                            peterj

                            >>I haven't been able to find [the main class].

                            In Process Explorer you need to go to View | Select Column, and check the Command Line box. Then scroll down to a java.exe entry and you should see the full command line. including the "main" class, which for JBoss AS is org.jboss.Main. The command line tends to be very long so you might have to hover over it to see the whole thing, or if that doesn't work (it often goes off the screen), right-click the process and select Properties; the command line is on the Image tab.

                             

                            The twiddle output looks OK, so at this point I am stumped as to why Eclipse is having a hard time with it. In your Eclipse workspace, look at workspace/.metadata/.log and see if there are any hints in that log file as to why it thinks JBoss AS is not running.

                            • 11. Re: Fail to build ManagedDeployment for:

                              Peter,

                               

                              I have just test (this time with Eclipse) and it seems that -as you point out, the server is ok. I increase the server "start timeout" long enough to check the log, server status i.e. twiddle, netstats and process explorer before eclipse shut it down.

                               

                              twiddle shows:

                              server started

                               

                              TCP/IP property shows:

                              all ports "listening" state

                               

                              Image property:

                              "C:\Program Files\Java\jdk1.6.0_20\bin\javaw.exe" -Dprogram.name=run.bat -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dfile.encoding=Cp1252 -classpath C:\JBoss\jboss-5.0.1.GA\bin\run.jar org.jboss.Main -c default

                               

                              Important:

                              I notice that jboss 8080 port was opened which took my attention, because I configured 9090 (from the very beging) on Eclipse's server editor view. So I changed to 8080 and now Eclipse is able -as you pointed out, to connect to JMX managed server (I assume listening in 8080) and Eclipse pointing to 8080 too. Putting back the port to 9090 didn't reflect in the server subsequent instance i.e. it kept listening in 8080

                               

                              If this is right, then it seems eclipse server configuration is not synchronizing correctly with Jboss configuration i.e. unable to change Jboss default configuration so a mismatch between instantiating the server and connecting to.

                               

                              I think I should now post in Eclipse and point to this thread there. But before I want to know if you have any additional thoughts as (of course) if you confirm this assertions.

                               

                              Many thanks,

                               

                              Jorge

                              • 12. Re: Fail to build ManagedDeployment for:
                                peterj

                                If you change the ports JBoss AS usues, you should also let Eclipse know the new ports. You can do this by editing the eclipse/plugins/org.eclipse.jst.server.generic.jboss_1.6.1.v200904151730/servers/jboss5.serverdef file (the actual name might be different based on your version of Eclipse and thep atches installed).

                                • 13. Re: Fail to build ManagedDeployment for:

                                  Peter Johnson wrote:

                                   

                                  If you change the ports JBoss AS usues, you should also let Eclipse know the new ports. You can do this by editing the eclipse/plugins/org.eclipse.jst.server.generic.jboss_1.6.1.v200904151730/servers/jboss5.serverdef file

                                  I have changed the port in jboss from 8080 to 9090 in eclipse\plugins\org.eclipse.jst.server.generic.jboss_1.6.1.v200904151730\servers also changed the port accordanlly in Eclipse server editor view and publish it, then start Jboss within Eclipse. Still "timing out"!

                                   

                                  I have checked the server log as well as process explorer TCP/IP ports and there's no sign of port: 9090. Port: 8080 shows instead!

                                   

                                  I always assumed that by configuring the port in Eclipse I was not only telling eclipse which port to look for but also which port to configure in the server?

                                   

                                  Jorge

                                  • 14. Re: Fail to build ManagedDeployment for:

                                    ...next, I have changed  the port attribute in < Connector \> in C:\JBoss\jboss-5.0.1.GA\server\default\deploy\jbossweb.sar and it works!!!

                                     

                                    <Connector protocol="HTTP/1.1" port="9090" address="${jboss.bind.address}"
                                                   connectionTimeout="20000" redirectPort="8443" />

                                     

                                    Should eclipse configure this file in the first place?

                                     

                                    many thanks,

                                     

                                    Jorge

                                    1 2 Previous Next