When MSMQManagementClass.Init(Object& Machine, Object& PathName, Object& FormatName) method is called it works fine when the client and msmq service are both on the same box.
When the client and msmq service are in different domain i get the following error
System.Runtime.InteropServices.COMException (0xC00E000B): The Message
Queuing service is not available at
MSMQ.MSMQManagementClass.Init(Object& Machine, Object& PathName,
Object& FormatName)
on windows 2008 server
Below code gives the error
var msmq = new MSMQManagement();
var machineName = MachineName
var pathName = null
var formatName = DIRECT=TCP:ipaddress\private$\testq
msmq.Init(ref machineName, ref pathName, ref formatName);
but
this works fine
var queue = new MessageQueue(FormatName:DIRECT=TCP:ipaddress\private$\testq)
Do you mean cross-domain or cross-forest?
Cross-forest MSMQ? You need to be trusting
You are performing an RPC operation to a remote machine so the following should help:
Understanding how MSMQ security blocks RPC traffic
Cheers
John
To use MSMQ it requires that MSMQ is installed on both the sender and receiver.
Related
I've got a module my_api with a function which is callback for cowboy's requests handle/2,
So when I make some http requests like this:
curl http://localhost/test
to my application this function is called and it's working correctly because I get a response in the terminal.
But in another terminal I attach to my application with remsh and try to trace calls to that function with a dbg module like this:
dbg:tracer().
dbg:tp(my_api, handle, 2, []).
dbg:p(all, c).
I expected that after in another terminal I make a http request to my api, the function my_api:handle/2 is called and I get some info about this call (at least function arguments) in the attached to the node terminal but I get nothing in there. What am I missing?
When you call dbg:tracer/0, a tracer of type process is started with a message handler that sends all trace messages to the user I/O device. Your remote shell's group leader is independent of the user I/O device, so your shell doesn't receive the output sent to user.
One approach to allow you to see trace output is to set up a trace port on the server and a trace client in a separate node. If you want traces from node foo, first remsh to it:
$ erl -sname bar -remsh foo
Then set up a trace port. Here, we set up a TCP/IP trace port on host port 50000 (use any port you like as long as it's available to you):
1> dbg:tracer(port, dbg:trace_port(ip, 50000)).
Next, set up the trace parameters as you did before:
2> dbg:tp(my_api, handle, 2, []).
{ok, ...}
3> dbg:p(all, c).
{ok, ...}
Then exit the remsh, and start a node without remsh:
$ erl -sname bar
On this node, start a TCP/IP trace client attached to host port 50000:
1> dbg:trace_client(ip, {"localhost", 50000}).
This shell will now receive dbg trace messages from foo. Here, we used "localhost" as the hostname since this node is running on the same host as the server node, but you'll need to use a different hostname if your client is running on a separate host.
Another approach, which is easier but relies on an undocumented function and so might break in the future, is to remsh to the node to be traced as you originally did but then use dbg:tracer/2 to send dbg output to your remote shell's group leader:
1> dbg:tracer(process, {fun dbg:dhandler/2, group_leader()}).
{ok, ...}
2> dbg:tp(my_api, handle, 2, []).
{ok, ...}
3> dbg:p(all, c).
{ok, ...}
Since this relies on the dbg:dhandler/2 function, which is exported but undocumented, there's no guarantee it will always work.
Lastly, since you're tracing all processes, please pay attention to the potential problems described in the dbg man page, and always be sure to call dbg:stop_clear(). when you're finished tracing.
I am trying to run a simple program of jcloud. The program is as follows:
String provider = "openstack-nova";
String identity = "Tenant:usename"; // tenantName:userName
String credential = "pass";
novaApi = ContextBuilder.newBuilder(provider).endpoint("http://openstack.infosys.tuwien.ac.at/identity/v2.0")
.credentials(identity, credential).modules(modules).buildApi(NovaApi.class);
regions = novaApi.getConfiguredRegions();
The openstack.infosys is connect via SOCKS proxy on port 7777. I have also enlisted the same on eclipse(Window->Preferences->General->Network Config->SOCKS(Manual)) . However, everytime I run the code I get the following error:
ERROR o.j.h.i.JavaUrlHttpCommandExecutorService - Command not considered safe to retry because request method is POST:
Which is then caused by
Caused by: java.net.SocketTimeoutException: connect timed out
I am able to access the horizon web interface of the same without any issues.
Can someone please help me in understanding what is the possible problem.
You need to tell Apache jclouds about your proxy configuration when creating the context. Have a look at these properties, and pass the ones you need to the overrides method of the ContextBuilder:
Proxy type
Proxy host
Proxy port
Proxy user
Proxy password
I have been using Unity and teensy to perform serial communication for quite some time. And it has been working fine.
Now I changed my teensy board and thus the COM Port has changed on it.
Teensy is communicating perfectly in arduino and sending all the right signals when checked in serial monitor. But I am getting this error in unity.
> IOException: The port `COM11' does not exist.
System.IO.Ports.WinSerialStream.ReportIOError (System.String optional_arg)
System.IO.Ports.WinSerialStream..ctor (System.String port_name, Int32
baud_rate, Int32 data_bits, Parity parity, StopBits sb, Boolean dtr_enable, Boolean rts_enable, Handshake hs, Int32 read_timeout, Int32 write_timeout, Int32 read_buffer_size, Int32 write_buffer_size)
(wrapper remoting-invoke-with-check) System.IO.Ports.WinSerialStream:.ctor (string,int,int,System.IO.Ports.Parity,System.IO.Ports.StopBits,bool,bool,System.IO.Ports.Handshake,int,int,int,int)
System.IO.Ports.SerialPort.Open ()
Initially the com ports were single digit values such as COM4 or COM8 etc. But since I started getting twodigit COM Ports I started facing this problem. If I connect a teensy again with a single digit com port it works fine but does not detect COM50 etc.
How do I solve this?
If this is Windows OS then try to specify the COM port name as \\.\COM11
myPort= new SerialPort("\\\\.\\COM11",9600);
NOTES: This syntax also works for ports COM1 through COM9. Certain boards will let you choose the port names yourself. This syntax works for those names as well.
Use System.IO.Ports.SerialPort.GetPortNames() to see what names does the OS use for current COM ports. (I'm not sure if you're talking about .NET, but if you do this helps)
Use
foreach(string str in SerialPort.GetPortNames())
{
Debug.WriteLine(string.Format("Existing COM port: {0}", str));
}
For know the ports available
Please, Can you help me?
There are two services which send messages to a remote queue using NServiceBus.
The first service is located in the first domain (server1).
The second service is located in the second domain (server2).
The remote queue is located at the third server (server3) in the second domain.
I can send messages from server2 to server3.
But when I try to send messages from server1 to server3 I always get this error:
Common.Logging.ConfigurationException: The destination queue 'queue#server3' could not be found. You may have misconfigured the destination for this kind of message (Messages.Message) in the MessageEndpointMappings of the UnicastBusConfig section in your configuration file. It may also be the case that the given queue just hasn't been created yet, or has been deleted. ---> NServiceBus.Unicast.Queuing.QueueNotFoundException ---> System.Messaging.MessageQueueException: Insufficient resources to perform operation.
at System.Messaging.MessageQueue.SendInternal(Object obj, MessageQueueTransaction internalTransaction, MessageQueueTransactionType transactionType)
at NServiceBus.Unicast.Queuing.Msmq.MsmqMessageSender.NServiceBus.Unicast.Queuing.ISendMessages.Send(TransportMessage message, Address address)
--- End of inner exception stack trace ---
at NServiceBus.Unicast.Queuing.Msmq.MsmqMessageSender.NServiceBus.Unicast.Queuing.ISendMessages.Send(TransportMessage message, Address address)
at NServiceBus.Unicast.UnicastBus.SendMessage(IEnumerable`1 addresses, String correlationId, MessageIntentEnum messageIntent, Object[] messages)
--- End of inner exception stack trace ---
at NServiceBus.Unicast.UnicastBus.SendMessage(IEnumerable`1 addresses, String correlationId, MessageIntentEnum messageIntent, Object[] messages)
at NServiceBus.Unicast.UnicastBus.SendMessage(Address address, String correlationId, MessageIntentEnum messageIntent, Object[] messages)
at NServiceBus.Unicast.UnicastBus.NServiceBus.IBus.Send(Object[] messages)
Both domains are located in the same network. I can ping server3 from server1, so I don't understand why NServiceBus can't find the destination queue.
I've tried to use MSMQ direct format to specify the destination queue address. But NServiceBus doesn't support it.
User has answered the question him self with:
don't know what the reason of this issue was. I've tried everything.
All settings were valid. It started to work only after I've rebooted
server1
I have a problem with a running build machine, where the agent suddenly does not want to start. It's been a part of a remote controller and for trouble shooting this issue, if started a local controller. The symptoms are, at the agent(s) initializes correct (says 'Ready'), but has the stopped icon and in the status area says 'BuildController has not been started in 1 minutes. The AD account running the build service works on another build machine (seperate controller + build agents). I've tried the following
Reinstall the build service
running with machine name, fully qualified domain name and IP address for endpoint address
un- and re-registered build service
rebooted
cleaned up build agent registrations with script
If I change the service account running the build service to my own AD account, it works. However, running under our dedicated build user failes on this particular machine, but not the other. Any suggestions what to do? Here's the error from the event log:
Service 'Default Agent - tfs2010build1' had an exception:
Exception Message: There was no endpoint listening at http://tfs2010build1:9191/Build/v3.0/Services/Controller/31 that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. (type EndpointNotFoundException)
Exception Stack Trace:
Server stack trace:
at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
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 Microsoft.TeamFoundation.Build.Machine.IBuildControllerService.TestConnectionFromController(String agentUri)
at Microsoft.TeamFoundation.Build.Machine.ServiceProxies.ServiceProxy`1.<>c__DisplayClass3.<Do>b__2(T channel)
at Microsoft.TeamFoundation.Build.Machine.ServiceProxies.ServiceProxy`1.Do[TResult](Func`2 action)
at Microsoft.TeamFoundation.Build.Machine.BuildAgentService.<>c__DisplayClass12.<TestConnection>b__11(Object )
Inner Exception Details:
Exception Message: Unable to connect to the remote server (type WebException)
Exception Stack Trace: at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
Inner Exception Details:
Exception Message: No connection could be made because the target machine actively refused it 127.0.0.1:38742 (type SocketException)
Exception Stack Trace: at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
Found the problem. Proxy server was enabled under IE options. Not sure why the build service worked under my AD user account and not the dedicated build user, but it solved the problem.
---->>>>>Update!
So we have 2 machines (B1 & B2), each with 2 agents. B1 had the initial problem and was solved by disabling the proxy settings under IE. Yesterday B2 suddenly started showing the same symptons and error messages on the 2 agents. Proxy setting is NOT enabled. While it did fix B1, it's not the universal solution for this particular problem.
It's hard work keeping these build agents running :( - Miss TeamCity...
---->>>>Update again!
So yesterday when I looked at the proxy configuration, it wasn't set. However this morning the checkbox was checked. Disabled the proxy and the agents went online. Very strange behavior! Wonder if Windows Update changes these settings...
I often get this same issue with the proxy when I am forced to manually stop a build. I have not been able to find any decent resolutions for this.