Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Use absolute ordering in web.xml#6729

Merged
rawlinp merged 1 commit intoapache:masterfrom
zrhoffman:tr-absolute-ordering
Apr 8, 2022
Merged

Use absolute ordering in web.xml#6729
rawlinp merged 1 commit intoapache:masterfrom
zrhoffman:tr-absolute-ordering

Conversation

@zrhoffman
Copy link
Copy Markdown
Member

@zrhoffman zrhoffman commented Apr 7, 2022

This fixes an issue encountered by Traffic Router in Dev CDN in a Box, probably since Spring Framework was upgraded to 5.2.20 in #6705:

	Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering. See section 8.2.2 2c of the Servlet specification for details. Consider using absolute ordering.
More complete log
07-Apr-2022 20:24:41.353 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [3064] milliseconds
07-Apr-2022 20:24:41.465 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [traffic_router_core]
07-Apr-2022 20:24:41.465 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.43]
07-Apr-2022 20:24:41.798 SEVERE [main] org.apache.catalina.core.ContainerBase.startInternal A child container failed during start
	java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[traffic_router_core].StandardHost[localhost].StandardContext[]]
		at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
		at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
		at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916)
		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:434)
		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)
	Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[traffic_router_core].StandardHost[localhost].StandardContext[]]
		at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
		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)
		... 21 more
	Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering. See section 8.2.2 2c of the Servlet specification for details. Consider using absolute ordering.
		at org.apache.tomcat.util.descriptor.web.WebXml.orderWebFragments(WebXml.java:2260)
		at org.apache.tomcat.util.descriptor.web.WebXml.orderWebFragments(WebXml.java:2218)
		at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1294)
		at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:986)
		at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:303)
		at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5082)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		... 27 more

Note:

This PR includes commits from #6727 so it will work, so #6727 should be merged first.


Which Traffic Control components are affected by this PR?

  • Traffic Router

What is the best way to verify this PR?

  1. Remove CrConfig backups (rm -rf dev/{traffic_router/db,traffic_monitor/*.backup.*}) and take a snapshot, as long as Sync Dev CDN in a Box snapshot #6727 is still open
  2. In the Dev CDN in a Box, wait for Traffic Router to finish starting, until it says
    org.apache.traffic_control.traffic_router.core.config.ConfigHandler - Exiting processConfig: No json data to process
  3. Verify that Traffic Router routes the Dev CiaB Delivery Service:
    dig @localhost -p 3053  cdn.dev-ds.ciab.test
    curl -vHHost:cdn.dev-ds.ciab.test localhost:3080

If this is a bugfix, which Traffic Control versions contained the bug?

PR submission checklist

@zrhoffman zrhoffman added bug something isn't working as intended Traffic Router related to Traffic Router labels Apr 7, 2022
@zrhoffman zrhoffman added the configuration related to configuration - not limited to any one component label Apr 8, 2022
@zrhoffman zrhoffman force-pushed the tr-absolute-ordering branch from a171cfc to e159143 Compare April 8, 2022 16:20
@zrhoffman
Copy link
Copy Markdown
Member Author

Added instructions to take a snapshot before testing, #6729 is no longer based on/blocked by #6727

Copy link
Copy Markdown
Contributor

@ericholguin ericholguin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Built and started Dev CIAB using atc start
Waited for TR to finish and start
Performed the dig and curl commands and did not see any issues

@rawlinp rawlinp merged commit 24db11f into apache:master Apr 8, 2022
@zrhoffman zrhoffman deleted the tr-absolute-ordering branch April 9, 2022 12:14
zrhoffman added a commit to zrhoffman/trafficcontrol that referenced this pull request Oct 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug something isn't working as intended configuration related to configuration - not limited to any one component Traffic Router related to Traffic Router

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants