简体   繁体   中英

WCF exception on communication object & listener on IP endpoint 0.0.0.0:9000

I am getting WCFexception on two things as mentioned below

The communication object, System.ServiceModel.ServiceHost, cannot be used for communication because it is in the Faulted state.

There is already a listener on IP endpoint 0.0.0.0:9000. Make sure that you are not trying to use this endpoint multiple times in your application and that there are no other applications listening on this endpoint.

If we try to browse we get the page cannot be displayed message.If we reboot the server/service it will start working. I am novice to WCF . Please help me in solving the issue.

Thanks in advance.

Please find below the stack trace


Message: HandlingInstanceID: 
An exception of type 'System.ServiceModel.AddressAlreadyInUseException' occurred and was caught.
----------------------------------------------------------------------------
Type : System.ServiceModel.AddressAlreadyInUseException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : There is already a listener on IP endpoint 0.0.0.0:9000.  Make sure that you are not trying to use this endpoint multiple times in your application and that there are no other applications listening on this endpoint.
Source : System.ServiceModel
Help link : 
Data : System.Collections.ListDictionaryInternal
TargetSite : Void Listen()
Stack Trace :    at System.ServiceModel.Channels.SocketConnectionListener.Listen()
   at System.ServiceModel.Channels.BufferedConnectionListener.Listen()
   at System.ServiceModel.Channels.ExclusiveTcpTransportManager.OnOpen()
   at System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
   at System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
   at System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.ConnectionOrientedTransportChannelListener.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.TcpChannelListener`2.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open()
   at PRWCFWindowsHost.HostEngine.StartPRSyncService() in F:\Source Code\Application\PRApplication\PR_SOURCECODE_VSS_MARCH\PR.root\PR\PRWCFWindowsHost\HostEngine.cs:line 101

TimeStamp : 06/10/2015 08:45:02
FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
AppDomainName : WindowsHost.exe
ThreadIdentity : 
WindowsIdentity : NT AUTHORITY\SYSTEM
    Inner Exception
    ---------------
    Type : System.Net.Sockets.SocketException, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    Message : Only one usage of each socket address (protocol/network address/port) is normally permitted
    Source : System
    Help link : 
    ErrorCode : 10048
    SocketErrorCode : AddressAlreadyInUse
    NativeErrorCode : 10048
    Data : System.Collections.ListDictionaryInternal
    TargetSite : Void DoBind(System.Net.EndPoint, System.Net.SocketAddress)
    Stack Trace :    at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.Sockets.Socket.Bind(EndPoint localEP)
       at System.ServiceModel.Channels.SocketConnectionListener.Listen()

Message: HandlingInstanceID: 6978b145-1b73-443d-917c-839221b6bab8
An exception of type 'System.ServiceModel.CommunicationObjectFaultedException' occurred and was caught.
-------------------------------------------------------------------------------------------------------
10/06/2015 10:55:23
Type : System.ServiceModel.CommunicationObjectFaultedException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : The communication object, System.ServiceModel.ServiceHost, cannot be used for communication because it is in the Faulted state.
Source : System.ServiceModel
Help link : 
Data : System.Collections.ListDictionaryInternal
TargetSite : Void Close(System.TimeSpan)
Stack Trace :    at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Close()
   at WindowsHost.HostEngine.OnStop() in F:\Source Code\Application issue\PRApplication\PR_SOURCECODE_VSS_MARCH\PR.root\PR\WindowsHost\HostEngine.cs:line 84

Additional Info:

MachineName : 
TimeStamp : 06/10/2015 08:55:23
FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
AppDomainName : WindowsHost.exe
ThreadIdentity : 
WindowsIdentity : NT AUTHORITY\SYSTEM


Message: HandlingInstanceID: 1ca8f69a-8e36-4e99-a5eb-e`enter code here`5f0e5dc7a28
An exception of type 'System.IO.FileNotFoundException' occurred and was caught.
-------------------------------------------------------------------------------
10/06/2015 11:52:33
Type : System.IO.FileNotFoundException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Could not find file 'C:\ProcessLog.log'.
Source : mscorlib
Help link : 
FileName : C:\RunProcessLog.log
FusionLog : 
Data : System.Collections.ListDictionaryInternal
TargetSite : Void WinIOError(Int32, System.String)
Stack Trace :    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at ITG.PR.BusinessLayer.FileManager.ReadResultSetRebuildLogFile(List`1 lResultSetList, Hashtable PreviousResultSet)
   at ITG.PR.PRWCFService.SyncedService.ReadResultSetRebuildLogFile(List`1 lResultSetList, Hashtable PreviousResultSet) in F:\Source Code\Application\PRApplication\PR_SOURCECODE_VSS_MARCH\PR.root\PR\PRWCFService\SyncedService.cs:line 3094

  FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
AppDomainName : WindowsHost.exe
ThreadIdentity : IIS APPPOOL\DoAppPool
WindowsIdentity : NT AUTHORITY\SYSTEM

I am assuming you are getting this error in visual studio .Go to Properties of your project file. Find Project URL in Web tab. You will find the url like http://localhost:9000/ . Give a different port number here to something like http://localhost:11483/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM