Bug 1013094

Summary: Failing tests of http-binding and rest-binding during "mvn jboss-as:deploy"
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Pavel Drozd <pdrozd>
Component: ExamplesAssignee: Douglas Palmer <dpalmer>
Status: MODIFIED --- QA Contact: Matej Melko <mmelko>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: soa-p-jira
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
The http-binding and rest-binding quick starts do not deploy. If users try to run them, they will encounter an java.net.BindException. To work around this issue, use the following command: mvn -DskipTests jboss-as:deploy
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Drozd 2013-09-27 20:15:06 UTC
Failing tests of quickstarts http-binding and rest-binding when executing command: "mvn jboss-as:deploy". 
The tests should be skipped or jar should be manualy deployed.

Following exception occurs during test:

Caused by: java.net.BindException: Address already in use
	at sun.nio.ch.Net.bind0(Native Method)
	at sun.nio.ch.Net.bind(Net.java:344)
	at sun.nio.ch.Net.bind(Net.java:336)
	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:199)
	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
	at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193)
	at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:366)
	at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:290)
	at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Test mechanism  Time elapsed: 0.009 sec  <<< ERROR!

Comment 1 Keith Babo 2013-10-14 16:49:56 UTC
Is this after the application has already been deployed once?

The bump in the version of the jboss-as deploy plugin seems to now include test phase of the Maven lifecycle.  We should be able to modify the quickstart to use a  config property for the port value in the unit test which is different than the deployed port value.

Simple workaround is to use "mvn -DskipTests jboss-as:deploy"

Comment 2 Keith Babo 2013-10-14 16:54:04 UTC
Sorry, ignore the question about the application being deployed once.  I misread the bug description and thought this was about the camel netty binding.  We can still update the quickstarts to use a system property for test execution which will cause the standalone netty http server used by HTTP and REST to bind to a different port.

Comment 3 Douglas Palmer 2014-10-08 02:41:20 UTC
This has been fixed for some time; to deploy a QS on EAP execute 'mvn install -Pdeploy'.