You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by nvijayak <nv...@cs.indiana.edu> on 2008/01/09 22:34:00 UTC

bind error in deploying http-upload tutorial

Hi,

I followed the steps in the servicemix tutorial to create the http-upload
(http://servicemix.apache.org/7-intermediate-writing-a-http-upload-application.html)

When I hotdeploy the service assembly I get a bind exception. Has anyone
face this before? 

I am copying a part of the servicemix output when I copy the upload-sa into
hotdeploy directory:

ERROR - AutoDeploymentService          - Failed to update Service Assembly:
http
-upload-sa
java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
<jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message"
version="1.0
">
<jbi-task-result>
<frmwk-task-result>
<frmwk-task-result-details>
<task-result-details>
<task-id>start</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
</task-result-details>
</frmwk-task-result-details>
</frmwk-task-result>
<component-task-result
xmlns="http://java.sun.com/xml/ns/jbi/management-message"
>
        <component-name>servicemix-http</component-name>
        <component-task-result-details>
                <task-result-details>
                        <task-id>start</task-id>
                        <task-result>FAILED</task-result>
                        <message-type>ERROR</message-type>
                        <task-status-msg>
<msg-loc-info>
<loc-token/>
<loc-message>Unable to start service unit</loc-message>
</msg-loc-info>
</task-status-msg>
                        <exception-info>
                                <nesting-level>1</nesting-level>
                                <msg-loc-info>
                                        <loc-token/>
                                        <loc-message>Address already in use:
bin
d</loc-message>
                                       
<stack-trace><![CDATA[java.net.BindExcep
tion: Address already in use: bind
        at sun.nio.ch.Net.bind(Native Method)
        at
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:
119)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
        at
org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnec
tor.java:211)
        at
org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelCon
nector.java:309)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
40)
        at org.mortbay.jetty.Server.doStart(Server.java:228)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
40)
        at
org.apache.servicemix.http.jetty.JettyContextManager.createServer(Jet
tyContextManager.java:286)
        at
org.apache.servicemix.http.jetty.JettyContextManager.createContext(Je
ttyContextManager.java:142)
        at
org.apache.servicemix.http.endpoints.HttpConsumerEndpoint.start(HttpC
onsumerEndpoint.java:186)
        at
org.apache.servicemix.common.endpoints.SimpleEndpoint.activate(Simple
Endpoint.java:55)
        at
org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:53)
        at
org.apache.servicemix.common.BaseServiceUnitManager.start(BaseService
UnitManager.java:151)
        at
org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(Servic
eUnitLifeCycle.java:103)
        at
org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(Se
rviceAssemblyLifeCycle.java:132)
        at
org.apache.servicemix.jbi.framework.DeploymentService.start(Deploymen
tService.java:378)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServi
ceAssembly(AutoDeploymentService.java:352)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchi
ve(AutoDeploymentService.java:253)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDire
ctory(AutoDeploymentService.java:647)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(
AutoDeploymentService.java:60)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoD
eploymentService.java:611)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
]]></stack-trace>
                                </msg-loc-info>
                        </exception-info>
                </task-result-details>
        </component-task-result-details>
</component-task-result>
</jbi-task-result>
</jbi-task>

Thanks,
Nithya
-- 
View this message in context: http://www.nabble.com/bind-error-in-deploying-http-upload-tutorial-tp14722182s12049p14722182.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: bind error in deploying http-upload tutorial

Posted by lhe77 <la...@compart.net>.
Gert,

thank you for this information. I will update the tutorial for this.

Regards,
Lars



Gert Vanthienen wrote:
> 
> Lars, Nithya,
> 
> 
> You can have multiple services exposed by servicemix-http on the same 
> port, but you have to make sure to always use the same host part when 
> specifying the locationURI.  In this case, the HTTP upload tutorial uses 
> "http://localhost:8192", while some other examples use 
> "http://0.0.0.0:8192" to bind to all interfaces.
> 
> So you will probably also get this working if you change the locationUri 
> for the HTTP upload example to "http://0.0.0.0:8192/upload".  This will 
> also allow you to access the upload service from another machine, which 
> isn't possible if you only bind the service to localhost (127.0.0.1).
> 
> 
> Gert
> 
> 
> lhe77 wrote:
>> Nithya,
>> 
>> great. So finally you were able to deploy it correctly.
>> 
>> About the webserver:
>> I really don't know if it is really necessary to have an own port for
>> each
>> service. Normally it is possible to have several services just with some
>> other path than /upload. But maybe somebody else can clarify this here.
>> Another reason I can imagine for this error is, that the port 8192 is
>> somehow in use at your machine or you are missing the rights to occupy
>> this
>> port.
>> 
>> I hope the tutorial was helpful to you.
>> 
>> Regards,
>> Lars
>> 
>> 
>> 
>> nvijayak wrote:
>>> Thanks for clarifying. I understand it better now.  so each service in
>>> servicemix needs to be host on a different port. I got this mistaken
>>> with
>>> the approach axis takes. I changed the locationUri to
>>> http://localhost:8092/upload and it works now
>>>
>>> Thanks,
>>> Nithya
>>>
>> 
>> 
> 
> 
> -----
> ---
> Gert Vanthienen
> http://www.anova.be
> 

-- 
View this message in context: http://www.nabble.com/bind-error-in-deploying-http-upload-tutorial-tp14722182s12049p14797064.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: bind error in deploying http-upload tutorial

Posted by Gert Vanthienen <ge...@skynet.be>.
Lars, Nithya,


You can have multiple services exposed by servicemix-http on the same 
port, but you have to make sure to always use the same host part when 
specifying the locationURI.  In this case, the HTTP upload tutorial uses 
"http://localhost:8192", while some other examples use 
"http://0.0.0.0:8192" to bind to all interfaces.

So you will probably also get this working if you change the locationUri 
for the HTTP upload example to "http://0.0.0.0:8192/upload".  This will 
also allow you to access the upload service from another machine, which 
isn't possible if you only bind the service to localhost (127.0.0.1).


Gert


lhe77 wrote:
> Nithya,
> 
> great. So finally you were able to deploy it correctly.
> 
> About the webserver:
> I really don't know if it is really necessary to have an own port for each
> service. Normally it is possible to have several services just with some
> other path than /upload. But maybe somebody else can clarify this here.
> Another reason I can imagine for this error is, that the port 8192 is
> somehow in use at your machine or you are missing the rights to occupy this
> port.
> 
> I hope the tutorial was helpful to you.
> 
> Regards,
> Lars
> 
> 
> 
> nvijayak wrote:
>> Thanks for clarifying. I understand it better now.  so each service in
>> servicemix needs to be host on a different port. I got this mistaken with
>> the approach axis takes. I changed the locationUri to
>> http://localhost:8092/upload and it works now
>>
>> Thanks,
>> Nithya
>>
> 
> 

Re: bind error in deploying http-upload tutorial

Posted by lhe77 <la...@compart.net>.
Nithya,

great. So finally you were able to deploy it correctly.

About the webserver:
I really don't know if it is really necessary to have an own port for each
service. Normally it is possible to have several services just with some
other path than /upload. But maybe somebody else can clarify this here.
Another reason I can imagine for this error is, that the port 8192 is
somehow in use at your machine or you are missing the rights to occupy this
port.

I hope the tutorial was helpful to you.

Regards,
Lars



nvijayak wrote:
> 
> Thanks for clarifying. I understand it better now.  so each service in
> servicemix needs to be host on a different port. I got this mistaken with
> the approach axis takes. I changed the locationUri to
> http://localhost:8092/upload and it works now
> 
> Thanks,
> Nithya
> 


-- 
View this message in context: http://www.nabble.com/bind-error-in-deploying-http-upload-tutorial-tp14722182s12049p14796165.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: bind error in deploying http-upload tutorial

Posted by nvijayak <nv...@cs.indiana.edu>.
Thanks for clarifying. I understand it better now.  so each service in
servicemix needs to be host on a different port. I got this mistaken with
the approach axis takes. I changed the locationUri to
http://localhost:8092/upload and it works now

Thanks,
Nithya



lhe wrote:
> 
> Nithya,
> 
> changing the service name will have no effect at all.
> 
> You have to change the http://localhost:8192/upload/ .into something
> different. Maybe take another port than 8192. Anyway, turn off the
> servicemix and then try to browser localhost:8192 in your browser. If this
> works without smx running, then you have another webserver running.
> 
> The error message you posted here says that Jetty (this is the webserver
> in the case of the tutorial) can't bind the adress
> http://localhost:8192/upload/ for some reason. The only reason I can
> imagine is that another webserver blocks it.
> 
> If nothing works, then just try running this tutorial from a clean service
> mix installation. 
> 
> Regards,
> Lars
> 
> 
> 
> 
> 
> nvijayak wrote:
>> 
>> 
>> thanks, I tried changing the service name in case if there was already
>> another service in that name. But it still gives me the same error. I
>> looked through the code to see if there are any attempts for opening a
>> socket or connection but couldn't find any. I followed the example for
>> htttp-uploader from the tutorial step by step. It uses a HandlerBean and
>> HttpMarsaler class. I wonder if any of these would be causing the
>> problem. 
>> 
>> I started servicemix 3.2.1 as stated in the website, created the
>> http-uploader-sa example and copied it to the hotdeploy directory.
>> 
>> If anyone has seen this problem before and solved I would very much
>> appreciate if you can post how. Also any suggestions for what might me
>> the problem is welcome.
>> 
>> Thanks,
>> Nithya
>> 
>> 
>> 
>> lhe77 wrote:
>>> 
>>> Nithya,
>>> 
>>> the error says that the address you try to bind is already in use.
>>> "Address already in use: bind"
>>> 
>>> So please make sure, that you don't run another webserver blocking
>>> address http://localhost:8192/upload/ .
>>> 
>>> Hopefully this will help you.
>>> 
>>> Regards,
>>> Lars
>>> 
>>> 
>>> 
>>> 
>>> nvijayak wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> I followed the steps in the servicemix tutorial to create the
>>>> http-upload
>>>> (http://servicemix.apache.org/7-intermediate-writing-a-http-upload-application.html)
>>>> 
>>>> When I hotdeploy the service assembly I get a bind exception. Has
>>>> anyone face this before? 
>>>> 
>>>> I am copying a part of the servicemix output when I copy the upload-sa
>>>> into hotdeploy directory:
>>>> 
>>>> ERROR - AutoDeploymentService          - Failed to update Service
>>>> Assembly: http
>>>> -upload-sa
>>>> java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
>>>> <jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message"
>>>> version="1.0
>>>> ">
>>>> <jbi-task-result>
>>>> <frmwk-task-result>
>>>> <frmwk-task-result-details>
>>>> <task-result-details>
>>>> <task-id>start</task-id>
>>>> <task-result>FAILED</task-result>
>>>> <message-type>ERROR</message-type>
>>>> </task-result-details>
>>>> </frmwk-task-result-details>
>>>> </frmwk-task-result>
>>>> <component-task-result
>>>> xmlns="http://java.sun.com/xml/ns/jbi/management-message"
>>>>>
>>>>         <component-name>servicemix-http</component-name>
>>>>         <component-task-result-details>
>>>>                 <task-result-details>
>>>>                         <task-id>start</task-id>
>>>>                         <task-result>FAILED</task-result>
>>>>                         <message-type>ERROR</message-type>
>>>>                         <task-status-msg>
>>>> <msg-loc-info>
>>>> <loc-token/>
>>>> <loc-message>Unable to start service unit</loc-message>
>>>> </msg-loc-info>
>>>> </task-status-msg>
>>>>                         <exception-info>
>>>>                                 <nesting-level>1</nesting-level>
>>>>                                 <msg-loc-info>
>>>>                                         <loc-token/>
>>>>                                         <loc-message>Address already in
>>>> use: bin
>>>> d</loc-message>
>>>>                                        
>>>> <stack-trace><![CDATA[java.net.BindExcep
>>>> tion: Address already in use: bind
>>>>         at sun.nio.ch.Net.bind(Native Method)
>>>>         at
>>>> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:
>>>> 119)
>>>>         at
>>>> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
>>>>         at
>>>> org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnec
>>>> tor.java:211)
>>>>         at
>>>> org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelCon
>>>> nector.java:309)
>>>>         at
>>>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
>>>> 40)
>>>>         at org.mortbay.jetty.Server.doStart(Server.java:228)
>>>>         at
>>>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
>>>> 40)
>>>>         at
>>>> org.apache.servicemix.http.jetty.JettyContextManager.createServer(Jet
>>>> tyContextManager.java:286)
>>>>         at
>>>> org.apache.servicemix.http.jetty.JettyContextManager.createContext(Je
>>>> ttyContextManager.java:142)
>>>>         at
>>>> org.apache.servicemix.http.endpoints.HttpConsumerEndpoint.start(HttpC
>>>> onsumerEndpoint.java:186)
>>>>         at
>>>> org.apache.servicemix.common.endpoints.SimpleEndpoint.activate(Simple
>>>> Endpoint.java:55)
>>>>         at
>>>> org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:53)
>>>>         at
>>>> org.apache.servicemix.common.BaseServiceUnitManager.start(BaseService
>>>> UnitManager.java:151)
>>>>         at
>>>> org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(Servic
>>>> eUnitLifeCycle.java:103)
>>>>         at
>>>> org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(Se
>>>> rviceAssemblyLifeCycle.java:132)
>>>>         at
>>>> org.apache.servicemix.jbi.framework.DeploymentService.start(Deploymen
>>>> tService.java:378)
>>>>         at
>>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServi
>>>> ceAssembly(AutoDeploymentService.java:352)
>>>>         at
>>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchi
>>>> ve(AutoDeploymentService.java:253)
>>>>         at
>>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDire
>>>> ctory(AutoDeploymentService.java:647)
>>>>         at
>>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(
>>>> AutoDeploymentService.java:60)
>>>>         at
>>>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoD
>>>> eploymentService.java:611)
>>>>         at java.util.TimerThread.mainLoop(Timer.java:512)
>>>>         at java.util.TimerThread.run(Timer.java:462)
>>>> ]]></stack-trace>
>>>>                                 </msg-loc-info>
>>>>                         </exception-info>
>>>>                 </task-result-details>
>>>>         </component-task-result-details>
>>>> </component-task-result>
>>>> </jbi-task-result>
>>>> </jbi-task>
>>>> 
>>>> Thanks,
>>>> Nithya
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/bind-error-in-deploying-http-upload-tutorial-tp14722182s12049p14793068.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: bind error in deploying http-upload tutorial

Posted by lhe <lr...@web.de>.
Nithya,

changing the service name will have no effect at all.

You have to change the http://localhost:8192/upload/ .into something
different. Maybe take another port than 8192. Anyway, turn off the
servicemix and then try to browser localhost:8192 in your browser. If this
works without smx running, then you have another webserver running.

The error message you posted here says that Jetty (this is the webserver in
the case of the tutorial) can't bind the adress
http://localhost:8192/upload/ for some reason. The only reason I can imagine
is that another webserver blocks it.

If nothing works, then just try running this tutorial from a clean service
mix installation. 

Regards,
Lars





nvijayak wrote:
> 
> 
> thanks, I tried changing the service name in case if there was already
> another service in that name. But it still gives me the same error. I
> looked through the code to see if there are any attempts for opening a
> socket or connection but couldn't find any. I followed the example for
> htttp-uploader from the tutorial step by step. It uses a HandlerBean and
> HttpMarsaler class. I wonder if any of these would be causing the problem. 
> 
> I started servicemix 3.2.1 as stated in the website, created the
> http-uploader-sa example and copied it to the hotdeploy directory.
> 
> If anyone has seen this problem before and solved I would very much
> appreciate if you can post how. Also any suggestions for what might me the
> problem is welcome.
> 
> Thanks,
> Nithya
> 
> 
> 
> lhe77 wrote:
>> 
>> Nithya,
>> 
>> the error says that the address you try to bind is already in use.
>> "Address already in use: bind"
>> 
>> So please make sure, that you don't run another webserver blocking
>> address http://localhost:8192/upload/ .
>> 
>> Hopefully this will help you.
>> 
>> Regards,
>> Lars
>> 
>> 
>> 
>> 
>> nvijayak wrote:
>>> 
>>> Hi,
>>> 
>>> I followed the steps in the servicemix tutorial to create the
>>> http-upload
>>> (http://servicemix.apache.org/7-intermediate-writing-a-http-upload-application.html)
>>> 
>>> When I hotdeploy the service assembly I get a bind exception. Has anyone
>>> face this before? 
>>> 
>>> I am copying a part of the servicemix output when I copy the upload-sa
>>> into hotdeploy directory:
>>> 
>>> ERROR - AutoDeploymentService          - Failed to update Service
>>> Assembly: http
>>> -upload-sa
>>> java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
>>> <jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message"
>>> version="1.0
>>> ">
>>> <jbi-task-result>
>>> <frmwk-task-result>
>>> <frmwk-task-result-details>
>>> <task-result-details>
>>> <task-id>start</task-id>
>>> <task-result>FAILED</task-result>
>>> <message-type>ERROR</message-type>
>>> </task-result-details>
>>> </frmwk-task-result-details>
>>> </frmwk-task-result>
>>> <component-task-result
>>> xmlns="http://java.sun.com/xml/ns/jbi/management-message"
>>>>
>>>         <component-name>servicemix-http</component-name>
>>>         <component-task-result-details>
>>>                 <task-result-details>
>>>                         <task-id>start</task-id>
>>>                         <task-result>FAILED</task-result>
>>>                         <message-type>ERROR</message-type>
>>>                         <task-status-msg>
>>> <msg-loc-info>
>>> <loc-token/>
>>> <loc-message>Unable to start service unit</loc-message>
>>> </msg-loc-info>
>>> </task-status-msg>
>>>                         <exception-info>
>>>                                 <nesting-level>1</nesting-level>
>>>                                 <msg-loc-info>
>>>                                         <loc-token/>
>>>                                         <loc-message>Address already in
>>> use: bin
>>> d</loc-message>
>>>                                        
>>> <stack-trace><![CDATA[java.net.BindExcep
>>> tion: Address already in use: bind
>>>         at sun.nio.ch.Net.bind(Native Method)
>>>         at
>>> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:
>>> 119)
>>>         at
>>> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
>>>         at
>>> org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnec
>>> tor.java:211)
>>>         at
>>> org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelCon
>>> nector.java:309)
>>>         at
>>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
>>> 40)
>>>         at org.mortbay.jetty.Server.doStart(Server.java:228)
>>>         at
>>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
>>> 40)
>>>         at
>>> org.apache.servicemix.http.jetty.JettyContextManager.createServer(Jet
>>> tyContextManager.java:286)
>>>         at
>>> org.apache.servicemix.http.jetty.JettyContextManager.createContext(Je
>>> ttyContextManager.java:142)
>>>         at
>>> org.apache.servicemix.http.endpoints.HttpConsumerEndpoint.start(HttpC
>>> onsumerEndpoint.java:186)
>>>         at
>>> org.apache.servicemix.common.endpoints.SimpleEndpoint.activate(Simple
>>> Endpoint.java:55)
>>>         at
>>> org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:53)
>>>         at
>>> org.apache.servicemix.common.BaseServiceUnitManager.start(BaseService
>>> UnitManager.java:151)
>>>         at
>>> org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(Servic
>>> eUnitLifeCycle.java:103)
>>>         at
>>> org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(Se
>>> rviceAssemblyLifeCycle.java:132)
>>>         at
>>> org.apache.servicemix.jbi.framework.DeploymentService.start(Deploymen
>>> tService.java:378)
>>>         at
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServi
>>> ceAssembly(AutoDeploymentService.java:352)
>>>         at
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchi
>>> ve(AutoDeploymentService.java:253)
>>>         at
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDire
>>> ctory(AutoDeploymentService.java:647)
>>>         at
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(
>>> AutoDeploymentService.java:60)
>>>         at
>>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoD
>>> eploymentService.java:611)
>>>         at java.util.TimerThread.mainLoop(Timer.java:512)
>>>         at java.util.TimerThread.run(Timer.java:462)
>>> ]]></stack-trace>
>>>                                 </msg-loc-info>
>>>                         </exception-info>
>>>                 </task-result-details>
>>>         </component-task-result-details>
>>> </component-task-result>
>>> </jbi-task-result>
>>> </jbi-task>
>>> 
>>> Thanks,
>>> Nithya
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/bind-error-in-deploying-http-upload-tutorial-tp14722182s12049p14789351.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: bind error in deploying http-upload tutorial

Posted by nvijayak <nv...@cs.indiana.edu>.

thanks, I tried changing the service name in case if there was already
another service in that name. But it still gives me the same error. I looked
through the code to see if there are any attempts for opening a socket or
connection but couldn't find any. I followed the example for htttp-uploader
from the tutorial step by step. It uses a HandlerBean and HttpMarsaler
class. I wonder if any of these would be causing the problem. 

I started servicemix 3.2.1 as stated in the website, created the
http-uploader-sa example and copied it to the hotdeploy directory.

If anyone has seen this problem before and solved I would very much
appreciate if you can post how. Also any suggestions for what might me the
problem is welcome.

Thanks,
Nithya



lhe77 wrote:
> 
> Nithya,
> 
> the error says that the address you try to bind is already in use.
> "Address already in use: bind"
> 
> So please make sure, that you don't run another webserver blocking address
> http://localhost:8192/upload/ .
> 
> Hopefully this will help you.
> 
> Regards,
> Lars
> 
> 
> 
> 
> nvijayak wrote:
>> 
>> Hi,
>> 
>> I followed the steps in the servicemix tutorial to create the http-upload
>> (http://servicemix.apache.org/7-intermediate-writing-a-http-upload-application.html)
>> 
>> When I hotdeploy the service assembly I get a bind exception. Has anyone
>> face this before? 
>> 
>> I am copying a part of the servicemix output when I copy the upload-sa
>> into hotdeploy directory:
>> 
>> ERROR - AutoDeploymentService          - Failed to update Service
>> Assembly: http
>> -upload-sa
>> java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
>> <jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message"
>> version="1.0
>> ">
>> <jbi-task-result>
>> <frmwk-task-result>
>> <frmwk-task-result-details>
>> <task-result-details>
>> <task-id>start</task-id>
>> <task-result>FAILED</task-result>
>> <message-type>ERROR</message-type>
>> </task-result-details>
>> </frmwk-task-result-details>
>> </frmwk-task-result>
>> <component-task-result
>> xmlns="http://java.sun.com/xml/ns/jbi/management-message"
>>>
>>         <component-name>servicemix-http</component-name>
>>         <component-task-result-details>
>>                 <task-result-details>
>>                         <task-id>start</task-id>
>>                         <task-result>FAILED</task-result>
>>                         <message-type>ERROR</message-type>
>>                         <task-status-msg>
>> <msg-loc-info>
>> <loc-token/>
>> <loc-message>Unable to start service unit</loc-message>
>> </msg-loc-info>
>> </task-status-msg>
>>                         <exception-info>
>>                                 <nesting-level>1</nesting-level>
>>                                 <msg-loc-info>
>>                                         <loc-token/>
>>                                         <loc-message>Address already in
>> use: bin
>> d</loc-message>
>>                                        
>> <stack-trace><![CDATA[java.net.BindExcep
>> tion: Address already in use: bind
>>         at sun.nio.ch.Net.bind(Native Method)
>>         at
>> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:
>> 119)
>>         at
>> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
>>         at
>> org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnec
>> tor.java:211)
>>         at
>> org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelCon
>> nector.java:309)
>>         at
>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
>> 40)
>>         at org.mortbay.jetty.Server.doStart(Server.java:228)
>>         at
>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
>> 40)
>>         at
>> org.apache.servicemix.http.jetty.JettyContextManager.createServer(Jet
>> tyContextManager.java:286)
>>         at
>> org.apache.servicemix.http.jetty.JettyContextManager.createContext(Je
>> ttyContextManager.java:142)
>>         at
>> org.apache.servicemix.http.endpoints.HttpConsumerEndpoint.start(HttpC
>> onsumerEndpoint.java:186)
>>         at
>> org.apache.servicemix.common.endpoints.SimpleEndpoint.activate(Simple
>> Endpoint.java:55)
>>         at
>> org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:53)
>>         at
>> org.apache.servicemix.common.BaseServiceUnitManager.start(BaseService
>> UnitManager.java:151)
>>         at
>> org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(Servic
>> eUnitLifeCycle.java:103)
>>         at
>> org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(Se
>> rviceAssemblyLifeCycle.java:132)
>>         at
>> org.apache.servicemix.jbi.framework.DeploymentService.start(Deploymen
>> tService.java:378)
>>         at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServi
>> ceAssembly(AutoDeploymentService.java:352)
>>         at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchi
>> ve(AutoDeploymentService.java:253)
>>         at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDire
>> ctory(AutoDeploymentService.java:647)
>>         at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(
>> AutoDeploymentService.java:60)
>>         at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoD
>> eploymentService.java:611)
>>         at java.util.TimerThread.mainLoop(Timer.java:512)
>>         at java.util.TimerThread.run(Timer.java:462)
>> ]]></stack-trace>
>>                                 </msg-loc-info>
>>                         </exception-info>
>>                 </task-result-details>
>>         </component-task-result-details>
>> </component-task-result>
>> </jbi-task-result>
>> </jbi-task>
>> 
>> Thanks,
>> Nithya
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/bind-error-in-deploying-http-upload-tutorial-tp14722182s12049p14781329.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: bind error in deploying http-upload tutorial

Posted by lhe77 <la...@compart.net>.
Nithya,

the error says that the address you try to bind is already in use.
"Address already in use: bind"

So please make sure, that you don't run another webserver blocking address
http://localhost:8192/upload/ .

Hopefully this will help you.

Regards,
Lars




nvijayak wrote:
> 
> Hi,
> 
> I followed the steps in the servicemix tutorial to create the http-upload
> (http://servicemix.apache.org/7-intermediate-writing-a-http-upload-application.html)
> 
> When I hotdeploy the service assembly I get a bind exception. Has anyone
> face this before? 
> 
> I am copying a part of the servicemix output when I copy the upload-sa
> into hotdeploy directory:
> 
> ERROR - AutoDeploymentService          - Failed to update Service
> Assembly: http
> -upload-sa
> java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
> <jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message"
> version="1.0
> ">
> <jbi-task-result>
> <frmwk-task-result>
> <frmwk-task-result-details>
> <task-result-details>
> <task-id>start</task-id>
> <task-result>FAILED</task-result>
> <message-type>ERROR</message-type>
> </task-result-details>
> </frmwk-task-result-details>
> </frmwk-task-result>
> <component-task-result
> xmlns="http://java.sun.com/xml/ns/jbi/management-message"
>>
>         <component-name>servicemix-http</component-name>
>         <component-task-result-details>
>                 <task-result-details>
>                         <task-id>start</task-id>
>                         <task-result>FAILED</task-result>
>                         <message-type>ERROR</message-type>
>                         <task-status-msg>
> <msg-loc-info>
> <loc-token/>
> <loc-message>Unable to start service unit</loc-message>
> </msg-loc-info>
> </task-status-msg>
>                         <exception-info>
>                                 <nesting-level>1</nesting-level>
>                                 <msg-loc-info>
>                                         <loc-token/>
>                                         <loc-message>Address already in
> use: bin
> d</loc-message>
>                                        
> <stack-trace><![CDATA[java.net.BindExcep
> tion: Address already in use: bind
>         at sun.nio.ch.Net.bind(Native Method)
>         at
> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:
> 119)
>         at
> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
>         at
> org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnec
> tor.java:211)
>         at
> org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelCon
> nector.java:309)
>         at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> 40)
>         at org.mortbay.jetty.Server.doStart(Server.java:228)
>         at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
> 40)
>         at
> org.apache.servicemix.http.jetty.JettyContextManager.createServer(Jet
> tyContextManager.java:286)
>         at
> org.apache.servicemix.http.jetty.JettyContextManager.createContext(Je
> ttyContextManager.java:142)
>         at
> org.apache.servicemix.http.endpoints.HttpConsumerEndpoint.start(HttpC
> onsumerEndpoint.java:186)
>         at
> org.apache.servicemix.common.endpoints.SimpleEndpoint.activate(Simple
> Endpoint.java:55)
>         at
> org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:53)
>         at
> org.apache.servicemix.common.BaseServiceUnitManager.start(BaseService
> UnitManager.java:151)
>         at
> org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(Servic
> eUnitLifeCycle.java:103)
>         at
> org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(Se
> rviceAssemblyLifeCycle.java:132)
>         at
> org.apache.servicemix.jbi.framework.DeploymentService.start(Deploymen
> tService.java:378)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServi
> ceAssembly(AutoDeploymentService.java:352)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchi
> ve(AutoDeploymentService.java:253)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDire
> ctory(AutoDeploymentService.java:647)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(
> AutoDeploymentService.java:60)
>         at
> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoD
> eploymentService.java:611)
>         at java.util.TimerThread.mainLoop(Timer.java:512)
>         at java.util.TimerThread.run(Timer.java:462)
> ]]></stack-trace>
>                                 </msg-loc-info>
>                         </exception-info>
>                 </task-result-details>
>         </component-task-result-details>
> </component-task-result>
> </jbi-task-result>
> </jbi-task>
> 
> Thanks,
> Nithya
> 

-- 
View this message in context: http://www.nabble.com/bind-error-in-deploying-http-upload-tutorial-tp14722182s12049p14728390.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.