You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2021/09/03 12:30:05 UTC

[Bug 65548] New: Webapp context not loaded after calling addServiced, check and removeServiced calls

https://bz.apache.org/bugzilla/show_bug.cgi?id=65548

            Bug ID: 65548
           Summary: Webapp context not loaded after calling addServiced,
                    check and removeServiced calls
           Product: Tomcat 9
           Version: 9.0.52
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Manager
          Assignee: dev@tomcat.apache.org
          Reporter: dileepkumar8166@gmail.com
  Target Milestone: -----

Created attachment 38011
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38011&action=edit
Tomcat's JMX API Navigation

We are currently using Tomcat 9.0.45 and a webapp context can be loaded
dynamically when the following manager JMX operations are called in sequence:
addServiced()
check()
removeServiced(). 

The same is not happening with Tomcat 9.0.52. 

Steps to reproduce:
1) Create a sample webapp (sample.war can be downloaded from here:
https://tomcat.apache.org/tomcat-9.0-doc/appdev/sample/).

2) Turn off autoDeploy in server.xml. For example: 
<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="false">

3) Start the Tomcat and open manager UI (http://localhost:8080/manager/html).

4) Copy the sample.war (downloaded in step 1) and paste it in Tomcat's webapps
directory.

5) Use jconsole for Tomcat's JMX APIs (Refer attachment). 

6) Navigate to MBeans -> Catalina -> Deployer -> localhost -> Operations

7) Click on "addServiced" operation and provide the name of your war file in
the "name" field ("sample" in this case) and click on "addServiced" button.
"Method successfully invoked" popup comes up and click on "OK" button.

8) Similarly, click on "check" operation and provide the same name ("sample" in
this case). Click on "check" button and the same popup described in step 7
comes up. Click on "OK" button.

9) Finally, click on "removeServiced" operation and provide the same name
("sample" in this case). Click on "removeServiced" button and the same popup
described in step 7 comes up. Click on "OK" button.

After these steps, reload Tomcat manager web UI (mentioned in step 3)and the UI
should show the new webapp ("sample" webapp in this case).

The "sample" webapp appears with the Tomcat 9.0.45 but not with Tomcat 9.0.52.
Also tried by replacing "addServiced" operation with the new "tryAddServiced"
operation but the issue is not resolved.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 65548] Webapp context not loaded after calling addServiced, check and removeServiced calls

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65548

--- Comment #2 from Dileep <di...@gmail.com> ---
Calling just check("sample") succeeded. The webapp context is loaded
successfully. 
So, is there a change with the new Tomcat?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 65548] Webapp context not loaded after calling addServiced, check and removeServiced calls

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65548

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
What happens if you just call:

check("sample")

without any calls to addServiced(), removeServiced(), tryAddServiced() etc?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 65548] Webapp context not loaded after calling addServiced, check and removeServiced calls

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65548

Dileep <di...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dileepkumar8166@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 65548] Webapp context not loaded after calling addServiced, check and removeServiced calls

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65548

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEEDINFO                    |RESOLVED

--- Comment #3 from Mark Thomas <ma...@apache.org> ---
Yes. It is mentioned in the change log for 10.0.3, 9.0.44 and 8.5.64 but not
very clearly. I'll update the change log.

See BZ 65136 for details but the short version was the the "serviced" flag had
multiple issues (not atomic, was a List rather than a Set).

Patches: http://tomcat.markmail.org/thread/jnhjgmmddibw6qhl

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org