Service does not start - ArgumentNullException value cannot be null parameter name ip.
My Service does not start and I see following exception in the EventViewer.
Service cannot be started. System.Runtime.Remoting.RemotingException: Remoting configuration failed with the exception 'System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: ip
at System.Runtime.Remoting.Channels.CoreChannel.GetMachineIp()
at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.SetupMachineName()
at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor(IDictionary properties, IServerChannelSinkProvider sinkProvider, IAuthorizeRemotingConnection authorizeCallback)
at System.Runtime.Remoting.Channels.Tcp.TcpChannel..ctor(IDictionary properties, IClientChannelSinkProvider clientSinkProvider, IServerChannelSinkProvider serverSinkProvider)
When I debug, the exception happened at line :
-> RemotingConfiguration.Configure(configFile, false);
My configfile Remoting Configuration is as below:
<system.runtime.remoting>
<application>
<service>
<wellknown mode="Singleton" objectUri="PersonalityModule.rem" type="Ideas.Instructor.PersonalityModules.SPPA.PersonalityModule, PM_SPPA"/>
</service>
<channels>
<channel ref="tcp" port="7676" >
<formatter ref="binary" typeFilterLevel="Full" />
</channel>
</channels>
</application>
<customErrors mode="Off"/>
</system.runtime.remoting>
I have limited knowledge on Remoting. I am not understanding what is causing this error and how to fix it. Kindly suggest. Thank you in advance.
Related
When an exception occurs in the code that's called from the handler, the host tries it for 5 times and then shuts down the service with the following message:
2013-10-17 08:57:12,091 [13] FATAL NServiceBus.Faults.Forwarder.FaultManager [(null)] - Could not forward failed message to error queue.
Autofac.Core.Registration.ComponentNotRegisteredException: The requested service 'NServiceBus.Transports.ISendMessages' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
2013-10-17 08:57:12,139 [13] FATAL NServiceBus [(null)] - Fault manager failed to process the failed message with id e0fc75b2-4eef-4f90-a450-a25901130c9a
System.InvalidOperationException: Could not forward failed message to error queue. ---> Autofac.Core.Registration.ComponentNotRegisteredException: The requested service 'NServiceBus.Transports.ISendMessages' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
Here's my config:
<configSections>
<section name="MessageForwardingInCaseOfFaultConfig" type="NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core" />
<section name="UnicastBusConfig" type="NServiceBus.Config.UnicastBusConfig, NServiceBus.Core" />
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<MessageForwardingInCaseOfFaultConfig ErrorQueue="error" />
<UnicastBusConfig ForwardReceivedMessagesTo="audit">
<MessageEndpointMappings />
</UnicastBusConfig>
Here's my Bus initialization code:
public class EndpointConfig : IConfigureThisEndpoint, AsA_Server, AsA_Publisher, UsingTransport<Msmq>
{
}
NServiceBus.SetLoggingLibrary.Log4Net(log4net.Config.XmlConfigurator.Configure);
NServiceBus.Unicast.Config.ConfigUnicastBus busConfig = Configure.With()
.Log4Net()
.DefaultBuilder()
.MsmqSubscriptionStorage()
.UnicastBus();
Bus = busConfig.CreateBus().Start(() => Configure.Instance.ForInstallationOn<NServiceBus.Installation.Environments.Windows>().Install());
I am not quite sure why it is not able to try the SLR after failing 5 times and also forwarding it to the error queue after that.
Any help is appreciated!
Thanks
Prasad
Take a look here: https://github.com/sfarmar/Samples/tree/master/HalloWorldWithPubSub
I'm hoping this can guide you in the right direction
I have a cloud instance where i have installed Jboss5.0.1GA server. Server instance contains a Public ip and a natted Ip Address. I have run Jboss server using -b with ip(natted) address and web url is working fine. Now i am creating Java external client to access EJB3 bean which is deployed in Jboss server where i am getting the exception and trying solution using google which is not helped my case. Find below code which tells what i am using in external client to access EJB3.
properties = new Properties();
properties.load(stream);
// Set the context
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
ht.put(Context.PROVIDER_URL,"public ip address");
ht.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
// Find and create a reference to the bean using JNDI
context = new InitialContext(ht);
While executing it localhost its working fine. While connecting remote throwing below exception. "javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: ". Can anyone help me on the same.
`This is my connector file(ejb3-connectors-jboss-beans.xml).
EJB3 Connectors
-->
JBoss Remoting Connector
Note: Bean Name "org.jboss.ejb3.RemotingConnector" is used
as a lookup value; alter only after checking java references
to this key.
-->
<property name="invokerLocator">
<value-factory bean="ServiceBindingManager"
method="getStringBinding">
<parameter>
jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3
</parameter>
<parameter>
<null />
</parameter>
<parameter>socket://${jboss.bind.address}:${port}</parameter>
<parameter>
<null />
</parameter>
<parameter>3873</parameter>
</value-factory>
</property>
<property name="serverConfiguration">
<inject bean="ServerConfiguration" />
</property>
AOP
org.jboss.aspects.remoting.AOPRemotingInvocationHandler
`
Do a telnet to the ip and port you are trying to connect on the jboss from the remote server instance. If that's not working then you have to solve networking issues first. (Let me know, so I can guide you on how to do it)
Also check your EJB3 binding settings and check networking. Out of the box config looks looks this..
<mbean code="org.jboss.remoting.transport.Connector"
xmbean-dd="org/jboss/remoting/transport/Connector.xml"
name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
<depends>jboss.aop:service=AspectDeployer</depends>
<attribute name="InvokerLocator">socket://0.0.0.0:3873</attribute>
<attribute name="Configuration">
<handlers>
<handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
</handlers>
</attribute>
</mbean>
Thanks!
#leo.
To my case below 2 things worked for me.
1. Running Jboss server using run.bat -b **public ip(not nat ip)** -Djboss.bind.address=0.0.0.0
2. Enabling my **local** machine hosts file to point remote ip to hostname ie remoteip remotehostname.
Hope it will help to others as well.
I am running into issues with forwarding failed messages to error queue as ISendMessages was not configured.
I have the following sections in my app.config file
<section name="MessageForwardingInCaseOfFaultConfig" type="NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core" />
<MessageForwardingInCaseOfFaultConfig ErrorQueue="nservicebus_error" />
<add key="ConnectivityRetryPeriod" value="30" />
<add key="FatalRetryCount" value="2" />
<add key="RetryFrequency" value="2" />
However, when the FatalRetryCount is exceeded, I get the following exception
System.InvalidOperationException occurred
Message=Could not forward failed message to error queue, reason: System.ArgumentException: NServiceBus.Unicast.Queuing.ISendMessages has not been configured. In order to avoid this exception, check the return value of the 'HasComponent' method for this type.
at NServiceBus.ObjectBuilder.Spring.SpringObjectBuilder.NServiceBus.ObjectBuilder.Common.IContainer.Build(Type typeToBuild)
at NServiceBus.ObjectBuilder.Common.CommonObjectBuilder.NServiceBus.ObjectBuilder.IBuilder.Build[T]()
at NServiceBus.Faults.Forwarder.FaultManager.SendFailureMessage(TransportMessage message, Exception e, String reason).
Source=NServiceBus.Core
StackTrace:
at NServiceBus.Faults.Forwarder.FaultManager.SendFailureMessage(TransportMessage message, Exception e, String reason)
InnerException: System.ArgumentException
Message=NServiceBus.Unicast.Queuing.ISendMessages has not been configured. In order to avoid this exception, check the return value of the 'HasComponent' method for this type.
Source=NServiceBus.ObjectBuilder.Spring
StackTrace:
at NServiceBus.ObjectBuilder.Spring.SpringObjectBuilder.NServiceBus.ObjectBuilder.Common.IContainer.Build(Type typeToBuild)
at NServiceBus.ObjectBuilder.Common.CommonObjectBuilder.NServiceBus.ObjectBuilder.IBuilder.Build[T]()
at NServiceBus.Faults.Forwarder.FaultManager.SendFailureMessage(TransportMessage message, Exception e, String reason)
In specific, this exception is logged in the following lien in the FaultManager.cs in the NServiceBus.Faults.Forwarder namespace
Here is the App.Config section and the Config code that I use
Got the fix to this issue from the NServiceBus support team and it looks like the ISendMessages gets registered when I explicitly call .MsmqTransport(). I updated the config code to call .MsmqTransport() and FaultManager stopped throwing this exception
I'm deploying with azure in visual studio 2010 and I have this problem when I have 2 websites.
With only 1 website the deploy runs sucessfully.
Help!!!!!!!!!
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="RIS2048.ConsultaClick.Web.Azure1" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition">
<WebRole name="RIS2048.ConsultaClick.Web" vmsize="Small">
<Sites>
<Site name="PT" physicalDirectory="..\RIS2048.ConsultaClick.WWWPacientes">
<VirtualDirectory name="images" physicalDirectory="..\RIS2048.ConsultaClick.WWWPacientes\imgpt" />
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" hostHeader="pt.consultaclick.com" />
</Bindings>
</Site>
<Site name="RO" physicalDirectory="..\RIS2048.ConsultaClick.WWWPacientes">
<VirtualDirectory name="images" physicalDirectory="..\RIS2048.ConsultaClick.WWWPacientes\imgro" />
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" hostHeader="ro.consultaclick.com" />
</Bindings>
</Site>
</Sites>
<Endpoints>
<InternalEndpoint name="Endpoint1" protocol="http" port="80" />
</Endpoints>
<Imports>
<Import moduleName="Diagnostics" />
<Import moduleName="RemoteAccess" />
<Import moduleName="RemoteForwarder" />
</Imports>
</WebRole>
</ServiceDefinition>
After using intellitrace and remote desktop found the following in event viewer:
https://picasaweb.google.com/112383217404623421937/Dropbox#
In system section:
NtpClient was unable to set a manual peer to use as a time source because of DNS resolution error on 'time.windows.com,0x9'. NtpClient will try again in 15 minutes and double the reattempt interval
thereafter. The error was: No such host is known. (0x80072AF9)
VSP rejected attempt to use protocol version '3.2'.
The application '/' belonging to site '1' has an invalid AppPoolId 'DefaultAppPool' set. Therefore, the application will be ignored.
Site 1 was disabled because the root application defined for the site is invalid. See the previous event log message for information about why the root application is invalid.
Error communicating with the Spooler system service. Open the Services snap-in and confirm that the Print Spooler service is running.
The SLUINotify service terminated with the following error:
The specified module could not be found.
Azure section:
An unhandled exception occurred. Process ID: 3024
Process Name: WaIISHost
Thread ID: 1
AppDomain Unhandled Exception
Exception: E:\sitesroot\3
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at IConfigurator.Deploy(String roleId, WebAppModel webAppModelPath, String roleRootDirectory, String sitesDestinationRootDirectory, String diagnosticsRootDirectory, String roleGuid, Dictionary2 globalEnvironment)
at ConfiguratorClient.Deploy(String roleId, WebAppModel webAppModelPath, String roleRootDirectory, String sitesDestinationRootDirectory, String diagnosticsRootDirectory, String roleGuid, Dictionary2 globalEnvironment)
at Microsoft.WindowsAzure.Hosts.WaIISHost.Program.Main(String[] args)
You should try to figure out what is causing the issue. Could you try configuring Remote Desktop and connect to one of your instance? Verify the Event Viewer to see if you have any errors or warnings in the Application log.
In these situations I often experienced a disconnect from the Remote Desktop session because of the cycling, but you should still try it and with a little luck you'll be able to find out the cause of the issue.
Alternatively you could try configuring the DiagnosticsManager to ship the Windows logs ever 1 minute to track down the issue.
The problem was that I was parsing the request on host header (pt.example.com) and accessing from cck.azure.com so the host header was invalid (I should access from pt.example.com and have a domain that I bought redirecting pt.example.com to cck.azure.com).......
I am trying to configure my message endpoint mapping in my NServiceBus configuration by sending messages from different namespaces to different endpoints.
As such, I have configured the following in my web.config:
<MessageEndpointMappings>
<add Messages="Company.Messages.Accounts" Endpoint="ServiceInput" />
<add Messages="Company.Messages.Payments" Endpoint="ServiceInput" />
<add Messages="Company.Messages.Cancellations" Endpoint="ServiceInput" />
<add Messages="Company.Messages.Notifications" Endpoint="ServiceInput" />
</MessageEndpointMappings>
However, when my application starts, I receive the following exception:
Spring.Objects.PropertyAccessExceptionsException: PropertyAccessExceptionsException (1 errors); nested PropertyAccessExceptions are:
[Spring.Core.TypeMismatchException: Cannot convert property value of type [System.Collections.Hashtable] to required type [System.Collections.IDictionary] for property 'MessageOwners'., Inner Exception: System.ArgumentException: Problem loading message assembly: Company.Messages.Payments ---> System.IO.FileNotFoundException: Could not load file or assembly 'Company.Messages.Payments' or one of its dependencies. The system cannot find the file specified.
File name: 'Company.Messages.Payments'
What I find interesting is that it seems to have found Company.Messages.Accounts but failed on the second configured line. I thought that maybe it didn't like have them all go to the same endpoint, but changing this configuration to have them go different endpoints didn't change the error message I received.
What am I doing wrong? Is it not possible to segment messages by namespace (all I have seen is by type and by assembly)?
Thanks,
Steve
NSB only supports mapping of assemblies or individual types to endpoints. Namespaces are not supported, I suggest you split you message assembly into separate assemblies for each of your endpoints.
According to this page you can specify a type:
http://docs.particular.net/nservicebus/messaging/message-owner
Specific types can be configured by using their qualified name: "namespace.type, assembly".
As of NServiceBus v3.3 namespaces can be used to filter message mappings
http://docs.particular.net/nservicebus/messaging/message-owner