Challenge Overview
Project Overview
TopCoder Competition Engine is a system used for Single Round Matches (SRM) and Marathon Matches (MM).
Competition Task Overview
Currently, the architecture is changed a lot in order to support Amazon SQS, like removing the concept for farms (farm controller, farm deployer), and the build script is also changed a lot for start services all under apps account.
We have made changes and make it working in a new VM, but when setup services under the legent Arena VM. we meet problems to start the services (exception occurs).
The purpose of this challenge is to fix the problems, and make all services started properly and function properly.
Current Situation
Once you get your Arena VM, if login in as apps account and run jps command, you can see the following java processes.
here is the summary of the process.
jar - elasticmq server to simulate the amazon sqs interface in local environment, NEW
ProcessorMain - the farm processor as before
MPSQASListener - the listener for MPSQAS client as before
AdminListener - the listener for Admin Tool as before
Main - the jboss services as before
WebSocketServer - the listener for web arena as before
As you can see above, the Main listener is not properly startup, so everything is not function properly.
if you check the log (/home/apps/app/scripts/server-xxxxxx.log), you can see error like
2014-12-24 00:27:01,025 WARN [main, ClassPathXmlApplicationContext] Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'srmCompileResultHandler' defined in URL [jar:file:/home/apps/app/lib/jars/classes-7.1.5.jar!/com/topcoder/server/farm/compiler/srm/SRMCompileResultHandler.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'controllerServices' defined in class path resource [listener-applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.topcoder.farm.controller.services.ControllerServicesImpl]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:762)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at com.topcoder.server.listener.ListenerMain.start(ListenerMain.java:110)
at com.topcoder.server.listener.ListenerMain.main(ListenerMain.java:261)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'controllerServices' defined in class path resource [listener-applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.topcoder.farm.controller.services.ControllerServicesImpl]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1093)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1038)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:216)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:350)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:331)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:968)
at com.topcoder.server.farm.BaseCodeProcessingResultHandler.setApplicationContext(BaseCodeProcessingResultHandler.java:28)
at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:119)
at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:94)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1558)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
... 12 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.topcoder.farm.controller.services.ControllerServicesImpl]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1086)
... 28 more
Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V
at net.sf.cglib.core.DebuggingClassWriter.<init>(DebuggingClassWriter.java:47)
at net.sf.cglib.core.DefaultGeneratorStrategy.getClassWriter(DefaultGeneratorStrategy.java:30)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:24)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
We can fix the problem by some manually steps, like
1. remove all asm-*.jar under /home/apps/app/lib/jars directory
2. remove the cglib-2.1.3.jar under /home/apps/app/lib/jars directory
3. wget https://github.com/cglib/cglib/releases/download/RELEASE_3_1/cglib-nodep-3.1.jar to /home/apps/app/lib/jars directory
4. kill all java processes and restart by /home/apps/dev/arena-vm/start-services_arena.sh
What is Expected
But this is not what we are expecting, and we do have a environment that can start the listeners without changing the /home/apps/app/lib/jars directory.
So for this challenge, we'd like to you to investigate the root cause and figure out a way to make all services running properly without these manually steps (jars removal and addition).
and verifying that all the services are properly functioning.
User Guide
You can check the new build and start steps by
- /home/apps/dev/arena-vm/deploy_arena.sh
- /home/apps/dev/arena-vm/start-services_arena.sh
Verification
You can follow the SRM Problem Guide to carry out the standard verification process. Let me know if you need any more clarification. Generally, all the clients tool should be functioning properly, like Arena applet, Admin Tool, MPSQAS client and Web Arena.
About VMs
Before asking your own VM, you need to have a public key on your profile before asking for the VM.
You can find more details on how to generate a key http://apps.topcoder.com/wiki/display/projects/Generate+SSH+Key and how to connect using it http://apps.topcoder.com/wiki/display/projects/Connect+Using+SSH+Key.
Please reference http://apps.topcoder.com/wiki/display/docs/Competition+Engine+VM+Setup for general usage of Arena VM.
Previously, we have made several update for the Arena VM. So when the Arena VM allocated is available for you, there is a problem and a SRM contest already setup, you can reuse that for testing.
Final Submission Guidelines
Submission Deliverables
Below is an overview of the deliverables:
- Root Cause of Problem
- new/changed files
- Working VM environment for verification.
Final Submission
For each member, the final submission should be uploaded to the Online Review Tool.