Josh de Leeuw

I'm sure there is a simple solution to this, but I'm struggling to figure it out.

I'm trying to have a service running on one node subscribe to a service running on a different node.

Code Snippet

AgentOperations _agentNotify = new AgentOperations();
AgentOperations _agentPort;

---in start() method------

_agentPort = ServiceForwarder<AgentOperations>("http://192.168.1.103:10000/agentbrain");

_agentPort.Subscribe(_agentNotify);


Am I missing something obvious I've triple checked the URI, so I know that isn't the problem...






Re: Microsoft Robotics - Decentralized Software Services (DSS) Subscribe across dssnodes?

Omid K. Rad

It's not a good practice to hard-code the IP and URI when referencing in your code. Use manifests instead which always override the runtime settings. Service Tutorial 7 explains how to get two services on different nodes talk to each other. If you get security error, try unblocking the firewall and also add users or disable the DSS node security using Security Manager (http://localhost:50000/security/manager)



Re: Microsoft Robotics - Decentralized Software Services (DSS) Subscribe across dssnodes?

Josh de Leeuw

I understand that this isn't a good practice, but I've tried the methods in ServiceTutorial7 and they don't fix the problem either (I may be making a mistake somewhere). What I'd like to know is if the code snippet above wouldn't work for any other reason, besides the IP and URI being assigned statically. If the above should work, then maybe my problem is somewhere else...




Re: Microsoft Robotics - Decentralized Software Services (DSS) Subscribe across dssnodes?

Omid K. Rad

Well you didn't say what is the problem you're getting. Do you get any errors or failure messages The format of the URI you're passing to the ServiceForwarder above seems to be right assuming that 10000 is the HTTP port number of the client 192.168.1.103 which is running the "agentbrain" service on that DSS node. Just make sure to test the URI is correct by making a query to the directory service on the remote node for the service you want to communicate with and inspect the ServiceType in the response message. The best way to do so would probably be to walk through the code in debug mode.

BTW, Service Tutorial 7 had an issue in the manifest which is now fixed in the MSRS 1.5 that was just released today. If you tell more about the problem perhaps I can help you better.

Thanks





Re: Microsoft Robotics - Decentralized Software Services (DSS) Subscribe across dssnodes?

Josh de Leeuw

Hi Omid,

Thanks for your help on this. It took me awhile to figure out what was going on, but I know that the ServiceForwarder is working, and that the service being subscribed to is getting the request. However, it seems to generate an error when it tries to create the forwarder to send messages back to the subscribing service. Here is what the Console/Output service shows:


Code Snippet

9 12:18:11 * UriResolver.ResolveUri:Scheme not Registered:dssp.tcpCategory
Level None
Time 2007-07-10T12:18:11.2738208-04:00
Subject UriResolver.ResolveUri:Scheme not Registered:dssp.tcp
Source
CodeSite

10 12:18:11 * DsspForwarder:CreateRequestForwarder: Failed resolving:dssp.tcp://surveyor-1100:50001/minskydrivebywire/NotificationTarget/d59ce157-3b24-4dbe-beca-55d5bdae7ec6Category
Level None
Time 2007-07-10T12:18:11.353936-04:00
Subject DsspForwarder:CreateRequestForwarder: Failed resolving:dssp.tcp://surveyor-1100:50001/minskydrivebywire/NotificationTarget/d59ce157-3b24-4dbe-beca-55d5bdae7ec6
Source
CodeSite



I'm starting the service to be subscribed to using:
dsshost -p:10000 -m:<manifest file>

After that loads I start drive-by-wire service using:
dsshost -p:50000 -m:<manifest file>

Thanks again.






Re: Microsoft Robotics - Decentralized Software Services (DSS) Subscribe across dssnodes?

Omid K. Rad

I'm not sure if this is the cause but could you please try specifying the TCP port as well

dsshost -p:10000 -t:10001 -m:<manifest>

and

dsshost -p:50000 -t:50001 -m:<manifest>

Thanks





Re: Microsoft Robotics - Decentralized Software Services (DSS) Subscribe across dssnodes?

Josh de Leeuw

I just tried the above suggestion, and it changed the error that was produced. Here's what I got (sorry there's a lot of text):


Code Snippet

6 17:57:54 ** Subscribe request from: dssp.tcp://surveyor-1100:10001/minskybrain/NotificationTarget/8a7b6b05-5e80-42ae-9a66-ee707f6151c7Category StdOut
Level Info
Time 2007-07-10T17:57:54.0862048-04:00
Subject Subscribe request from: dssp.tcp://surveyor-1100:10001/minskybrain/NotificationTarget/8a7b6b05-5e80-42ae-9a66-ee707f6151c7
Source http://surveyor-1100:10000/phidgetinterfacekittest
CodeSite Boolean MoveNext()() at line:173, fileC:\Microsoft Robotics Studio (1.0)\samples\Platforms\Phidgets\PhidgetTestServices\PhidgetInterfaceKitTest.cs

7 17:57:54 ** Service uri: Category Console
Level Info
Time 2007-07-10T17:57:54.1262624-04:00
Subject Service uri:
Source http://surveyor-1100:10000/phidgetinterfacekittest
CodeSite Void Start()() at line:70, fileC:\Microsoft Robotics Studio (1.0)\samples\Platforms\Phidgets\PhidgetTestServices\PhidgetInterfaceKitTest.cs

8 17:57:54 ** Service uri: http://surveyor-1100:10000/phidgetinterfacekitboardsCategory Activation
Level Info
Time 2007-07-10T17:57:54.5268384-04:00
Subject Service uri: http://surveyor-1100:10000/phidgetinterfacekitboards
Source http://surveyor-1100:10000/phidgetinterfacekitboards
CodeSite Void Start()() at line:54, fileC:\Microsoft Robotics Studio (1.0)\samples\Platforms\Phidgets\PhidgetBoards\PhidgetInterfaceKitBoards.cs

9 17:58:43 ** Autonomous Mode OnCategory StdOut
Level Info
Time 2007-07-10T17:58:43.8077008-04:00
Subject Autonomous Mode On
Source http://surveyor-1100:10000/minskybrain
CodeSite Boolean MoveNext()() at line:125, fileC:\Microsoft Robotics Studio (1.0)\Minsky\MinskyBrain\MinskyBrain.cs

10 17:58:47 * ### SerializerService: Error serializing soap envelope: There was an error reflecting type 'Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState'.Category
Level None
Time 2007-07-10T17:58:47.7834176-04:00
Subject ### SerializerService: Error serializing soap envelope: There was an error reflecting type 'Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState'.
Source
CodeSite

11 17:58:47 * ### SerializerService: Error serializing soap envelope: There was an error reflecting type 'Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState'.Category
Level None
Time 2007-07-10T17:58:47.8134608-04:00
Subject ### SerializerService: Error serializing soap envelope: There was an error reflecting type 'Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState'.
Source
CodeSite

12 17:58:47 * ### SerializerForwarder:ReportFailure. Exception:There was an error reflecting type 'Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState'. Action:http://schemas.microsoft.com/xw/2004/10/dssp.html:NotifyRequest Body Type:Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState Target Service:dssp.tcp://surveyor-1100:50001/minskydrivebywire/NotificationTarget/09b122a6-8850-47ae-8011-4abf3c1c2459 Source Service:dssp.tcp://surveyor-1100:10001/subscriptionmanager/fdc9d3f8-5e89-4451-98b7-cc19abda8800Category
Level None
Time 2007-07-10T17:58:47.8635328-04:00
Subject ### SerializerForwarder:ReportFailure. Exception:There was an error reflecting type 'Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState'. Action:http://schemas.microsoft.com/xw/2004/10/dssp.html:NotifyRequest Body Type:Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState Target Service:dssp.tcp://surveyor-1100:50001/minskydrivebywire/NotificationTarget/09b122a6-8850-47ae-8011-4abf3c1c2459 Source Service:dssp.tcp://surveyor-1100:10001/subscriptionmanager/fdc9d3f8-5e89-4451-98b7-cc19abda8800
Source
CodeSite

13 17:58:47 * ### SerializerForwarder:ReportFailure. Exception:There was an error reflecting type 'Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState'. Action:http://schemas.microsoft.com/xw/2004/10/dssp.html:NotifyRequest Body Type:Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState Target Service:dssp.tcp://surveyor-1100:50001/minskydrivebywire/NotificationTarget/09b122a6-8850-47ae-8011-4abf3c1c2459 Source Service:dssp.tcp://surveyor-1100:10001/subscriptionmanager/fdc9d3f8-5e89-4451-98b7-cc19abda8800Category
Level None
Time 2007-07-10T17:58:47.8735472-04:00
Subject ### SerializerForwarder:ReportFailure. Exception:There was an error reflecting type 'Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState'. Action:http://schemas.microsoft.com/xw/2004/10/dssp.html:NotifyRequest Body Type:Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState Target Service:dssp.tcp://surveyor-1100:50001/minskydrivebywire/NotificationTarget/09b122a6-8850-47ae-8011-4abf3c1c2459 Source Service:dssp.tcp://surveyor-1100:10001/subscriptionmanager/fdc9d3f8-5e89-4451-98b7-cc19abda8800
Source
CodeSite

14 17:58:47 * ### SerializerService: Error serializing soap envelope: There was an error reflecting type 'Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState'.Category
Level None
Time 2007-07-10T17:58:47.8835616-04:00
Subject ### SerializerService: Error serializing soap envelope: There was an error reflecting type 'Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState'.
Source
CodeSite

15 17:58:47 * ### SerializerForwarder:ReportFailure. Exception:There was an error reflecting type 'Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState'. Action:http://schemas.microsoft.com/xw/2004/10/dssp.html:NotifyRequest Body Type:Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState Target Service:dssp.tcp://surveyor-1100:50001/minskydrivebywire/NotificationTarget/09b122a6-8850-47ae-8011-4abf3c1c2459 Source Service:dssp.tcp://surveyor-1100:10001/subscriptionmanager/fdc9d3f8-5e89-4451-98b7-cc19abda8800Category
Level None
Time 2007-07-10T17:58:47.8835616-04:00
Subject ### SerializerForwarder:ReportFailure. Exception:There was an error reflecting type 'Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState'. Action:http://schemas.microsoft.com/xw/2004/10/dssp.html:NotifyRequest Body Type:Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState Target Service:dssp.tcp://surveyor-1100:50001/minskydrivebywire/NotificationTarget/09b122a6-8850-47ae-8011-4abf3c1c2459 Source Service:dssp.tcp://surveyor-1100:10001/subscriptionmanager/fdc9d3f8-5e89-4451-98b7-cc19abda8800
Source
CodeSite

16 17:58:47 * ### SerializerService: Error serializing soap envelope: There was an error reflecting type 'Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState'.Category
Level None
Time 2007-07-10T17:58:47.9035904-04:00
Subject ### SerializerService: Error serializing soap envelope: There was an error reflecting type 'Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState'.
Source
CodeSite

17 17:58:47 * ### DsspForwarder:OutboundFailureHandler. Exception:Request failed Action:http://schemas.microsoft.com/xw/2004/10/dssp.html:NotifyRequest Body Type:Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState Target Service:dssp.tcp://surveyor-1100:50001/minskydrivebywire/NotificationTarget/09b122a6-8850-47ae-8011-4abf3c1c2459 Source Service:dssp.tcp://surveyor-1100:10001/subscriptionmanager/fdc9d3f8-5e89-4451-98b7-cc19abda8800Category
Level None
Time 2007-07-10T17:58:47.9136048-04:00
Subject ### DsspForwarder:OutboundFailureHandler. Exception:Request failed Action:http://schemas.microsoft.com/xw/2004/10/dssp.html:NotifyRequest Body Type:Vassar.IRRL.Minsky.Brain.Proxy.MinskyBrainState Target Service:dssp.tcp://surveyor-1100:50001/minskydrivebywire/NotificationTarget/09b122a6-8850-47ae-8011-4abf3c1c2459 Source Service:dssp.tcp://surveyor-1100:10001/subscriptionmanager/fdc9d3f8-5e89-4451-98b7-cc19abda8800
Source
CodeSite



It basically continued on from there, with the same types of errors.

Thanks again.





Re: Microsoft Robotics - Decentralized Software Services (DSS) Subscribe across dssnodes?

Josh de Leeuw

I've resolved this. The last error involved something to do with being unable to send the state across the nodes, so I sent a smaller chunk of it and that worked out.




Re: Microsoft Robotics - Decentralized Software Services (DSS) Subscribe across dssnodes?

Omid K. Rad

Great, so the issue with the first error was that the TCP port was not defined



Re: Microsoft Robotics - Decentralized Software Services (DSS) Subscribe across dssnodes?

antoniomorandi

I have a similar problem. It works with 2 separate nodes on my local host. So all I should have to do is change the ip address and port of the services on the 2nd box. When I try to go cross machine I get:

### DsspForwarderSurpriseutboundFailureHandler. Exception:Request failed Action:http://schemas.microsoft.com/xw/2004/10/dssp.html:QueryRequest Body Type:Microsoft.Dss.Services.Directory.Proxy.QueryRequest Target Service:http://192.168.1.106:40001/directory Source ServiceBig Smilessp.tcp://wdxac180620k7:50001/obstaclemapgeneratorCategory
Level None
Time 2007-09-27T16:54:45.12375-05:00
Subject ### DsspForwarderSurpriseutboundFailureHandler. Exception:Request failed Action:http://schemas.microsoft.com/xw/2004/10/dssp.html:QueryRequest Body Type:Microsoft.Dss.Services.Directory.Proxy.QueryRequest Target Service:http://192.168.1.106:40001/directory Source ServiceBig Smilessp.tcp://wdxac180620k7:50001/obstaclemapgenerator
Source
CodeSite

My code follows ex 7 pretty closely. It fails here:

private IEnumerator<ITask> OnStartup()
{

PartnerType remote = FindPartner("Remote");
ds.DirectoryPort remoteDir = DirectoryPort;
if (remote != null && !string.IsNullOrEmpty(remote.Service))
{
remoteDir = ServiceForwarder<ds.DirectoryPort>(remote.Service);
LogInfo("1");
}


// FAILS HERE --------------------------------------------------------------------------------------------------------------------------------------------
ds.Query query = new ds.Query(new ds.QueryRequestType(new ServiceInfoType(cs.Contract.Identifier)));
remoteDir.Post(query);
cs.ConstructorPort remoteConstructor = ConstructorPort;
yield return Arbiter.Choice(query.ResponsePort, delegate(ds.QueryResponseType success)
{
remoteConstructor = ServiceForwarder<cs.ConstructorPort>(success.RecordList[0].Service);
LogInfo("2");

},
delegate(Fault fault)
{
LogInfo("ERROR : " + fault.Reason);
LogInfo("ERROR : " + fault.Detail);
LogInfo("ERROR : " + fault.Code);
}

);





Re: Microsoft Robotics - Decentralized Software Services (DSS) Subscribe across dssnodes?

antoniomorandi

I should have included the manifest

< xml version="1.0" >
<Manifest
xmlns="http://schemas.microsoft.com/xw/2004/10/manifest.html"
xmlnsBig Smilessp="http://schemas.microsoft.com/xw/2004/10/dssp.html"
xmlnsSurprisebsmap="http://schemas.tempuri.org/2007/09/obstaclemapgenerator.html">
<CreateServiceList>
<ServiceRecordType>
<dssp:Contract>http://schemas.tempuri.org/2007/09/obstaclemapgenerator.html</dssp:Contract>
<dsspStick out tongueartnerList>
<dsspStick out tongueartner>
<dsspTongue Tiedervice>http://192.168.1.106:40000/directory</dsspTongue Tiedervice>
<!-- <dsspTongue Tiedervice>http://localhost:40000/directory</dsspTongue Tiedervice> -->
<dssp:Name>obsmap:Remote</dssp:Name>
</dsspStick out tongueartner>
</dsspStick out tongueartnerList>
</ServiceRecordType>
</CreateServiceList>
</Manifest>




Re: Microsoft Robotics - Decentralized Software Services (DSS) Subscribe across dssnodes?

Omid K. Rad

When running nodes across machines, you should check two things:

  1. DSS HTTP ports should be opened in firewall
  2. Configure the security of each node to allow the other node to access it

To edit security settings, when viewing the DSS node in the browser click on Security Manager on the left navigation pane. For more information about DSS security see Security.





Re: Microsoft Robotics - Decentralized Software Services (DSS) Subscribe across dssnodes?

George Chrysanthakopoulos

Actually please review other posts in the forum about IP address and the HOSTS file: DSS only works when you supply host names, not IP addresses. There ar emany reasons for this but if you only have an IP address, please modify your windows\system32\drivers\etc\HOSTS file and add an entry for machine, next to its ip address. Then use that name in your DSS manifests, etc

(example entry in HOSTS file)

MACHINEA 192.168.2.34