cancel
Showing results for 
Search instead for 
Did you mean: 

PCO 2.3 Failed to Create ConnectivityAgentProxy

Former Member
0 Kudos
Hi Folks,
I am trying to start an Agent Instance in Plant Connectivity, I have my Destination Sytem setup and I am able to "Check Connection" and "Simulate Invoke" successfully. I have the Agent Instance setup and I am able to "Test Gateway Registration" successfully.
When I start the instance, it appears to be running successfully, but when I check the log I see the below errors:

Error Host failed to create ConnectivityAgentProxy

Error ServiceFaultManager Manufacturing Fault: REASON = Object reference not set to an instance of an object. ; SEVERITY = Fatal

I am running 32 Bit Windows 7 Ultimate SP1. Please see below for the verbose log, any help would be greatly appreciated.

Regards,

Colm

04/07/2013 16:57:42 827Information.105600Scale02AgentBaseStart ignored.  Agent state = Faulted
04/07/2013 16:57:42 617Information.95600Scale02HostWCF service is started.
04/07/2013 16:57:42 617Error.95600Scale02Hostfailed to create ConnectivityAgentProxyFaultException`1: Object reference not set to an instance of an object.


Server stack trace:
   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 SAP.Manufacturing.Connectivity.IPCoAgentControl.Start()
   at SAP.Manufacturing.Connectivity.ConnectivityAgentProxy.Start()
   at SAP.Manufacturing.Connectivity.WcfHost.Start()
04/07/2013 16:57:42 603Error.135600Scale02ServiceFaultManagerManufacturing Fault: REASON = Object reference not set to an instance of an object.
; SEVERITY = Fatal
04/07/2013 16:57:42 597Information.135600Scale02AgentBaseNamespace Cache Loaded.
04/07/2013 16:57:42 597Verbose.135600Scale02AgentBaseNamespace cache loading...
04/07/2013 16:57:42 597Verbose.135600Scale02AgentBaseNamespace cache cleared.
04/07/2013 16:57:42 597Verbose.135600Scale02AgentBaseNamespace cache constructor mode=Demand
04/07/2013 16:57:42 253Verbose.135600Scale02AgentBasestarting...
04/07/2013 16:57:41 973Information.95600Scale02Hostimplicitly calling start on the hosted IConnectivityAgent service contract
04/07/2013 16:57:41 603Information.95600Scale02Hostusing default NetTcpBinding endpoint for internal IConnectivityAgent proxy
04/07/2013 16:57:41 603Verbose.95600Scale02HostService endpoints:
04/07/2013 16:57:41 603Verbose.95600Scale02HostSAP.Manufacturing.Connectivity.SocketAgent is running with the following endpoints:
04/07/2013 16:57:40 547Information.95600Scale02HostWCF service is starting.
04/07/2013 16:57:40 457Verbose.15600Scale02BrowserSessionManagerCreated browse manager.
04/07/2013 16:57:40 447Verbose.15600Scale02BrowserSessionManagerCreated browse manager.
04/07/2013 16:57:40 337Verbose.15600Scale02HostRunning [Scale02] as a windows service...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Turns out I was missing a step on the setup to add Notification to my agent instance as per this document:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50b8f192-2d92-3010-0fa3-fc35afaae...

However, now that I have done that, I am receiving the following message when I try to test the connection in RPCO_BS_INT_TEST.

"No Read Access Implemented for Agent"

Any advice on this would be appreicated.

Former Member
0 Kudos

Any help on this guys?

Maybe could provide me with some advice, it would be really appreciated.

uwe_dittes
Participant
0 Kudos

Hi,

what kind of an PCo agent (socket, OPD DA,..) are you trying to use? And to which kind of destination do you want to connect? Mentioned SCN document describes connecting EWM MFS functionality with PCo socket agents. Report RPCO_BS_INT_TEST is not designed for socket agents but primarily for OPC-DA agents. For socket agents you better use the Z report Z_PCO_AGENT_COMMANDS instead. This report is part of the SCN document that describes handling of PCo custom agents.

In most cases the connection from SAP EWM/ERP systems to PCo agent fails. Therefore please check the corresponding RFC destination of your business suite system via transaction SM59 as it is described in the above mentioned document.

Greetings

Uwe 

Former Member
0 Kudos

Hi Uwe,

Many thanks for getting back to me, we are trying to use a Socket Agent to connect to a scale, however, even though we have our source system setup, we don't have the socket agent configured. The reason being, we believed that we just needed to confirm the connection before we sourced a scale to use.

From what you are telling me, I need to have my socket agent setup before I progress any further. If this is the case, thank you very much for your help and after setting up the socket agent, I will follow the other steps you have mentioned above.

Many Thanks,

Colm

former_member196557
Active Contributor
0 Kudos

Hi Gavin,

What version of PCo are you configuring?

Set up the Socket Agent with the socket type, name, IP Address and either the terminators or data length.  (Note: control character terminators are specified in hex; i.e., CR-LF terminator is \0D\0A).  then you can assign the name.Message variable to the trigger and/or an Output parameter in the Agent Instance Notification.

What is the destination of the Scale data? MII destination (transaction) or an RFC destination?

Regards, Steve

Former Member
0 Kudos

Uwe\Steve,

Apologies for the delay in getting back to you, I was trying to source a scale that I could use in my proof of concept. Once I connected the Management Console to the scale I had success, I can see the messages being received from the scale in the log. Looks like I was trying to run before I could walk!

I still can't use the test program to connect to the scale and wasn't able to find the Z_PCO_AGENT_COMMANDS program anywhere. This concerns me a little as I am still not sure how I will be able to send messages to and read messages from the scale in ABAP. It was my understanding that I would have some RFC enabled function modules that would allow me to do this, I was going to check the test program but if the test program doesn't work for me, I guess I will have to find those function modules else where.

Many Thanks to both of your for your help,

Colm

P.S. Steve,

To answer your question, we have a socket connection connection to our SAP system through a SAP NW RFC connection.

uwe_dittes
Participant
0 Kudos

Hi Colm,

report Z_PCO_AGENT_COMMANDS is described in this document http://scn.sap.com/docs/DOC-32671 (I thought you already found this document on SCN). The report also works for the socket agent we use to connect EWM MFS. It shows you the commands and the parameters of the commands you need to create your query in ABAP.

Greetings

Uwe

Former Member
0 Kudos

Thanks Uwe,

I am now able to send commands to my scale (such as the zero out\tare command) successfully, I'm having a bit of trouble reading back from the scale, so for example, reading the qty from the scale. The command is received correctly by the scale and I can see the scale qty in the log of the agent in plant connector but unfortunatly it doesn't send the qty from the agent back into ECC.

I've started working on my own custom agent and command using your guide as a template so hopefully I'll get this sorted in the next day or two.

Thanks!

Colm

Former Member
0 Kudos

Just one further question on this.

I am now using ZPCO_AGENT_COMMAND to send the command to our scale to get the reading from the scale, It sends the command successfully, I can check the log in PCO and see the scale value, but all that is returned by the ABAP code is a success message.

So, what I am trying to do is decompile the existing socket agent which I created in PCO take most of that code, and then just add in extra logic to wait for the value to be returned from the scale.

Does that sound like the right approach?

uwe_dittes
Participant
0 Kudos

Hi Colm,

you might use the possibility to handle notifications that are triggered by the external data source for getting the desired information from the scale. This would be very similar to the usage of socket agents for EWM MFS. Functionality to read data from (data points/tags of) external data sources (like RETRIEVE queries of PCo's OPC DA agents) aren't implemented for PCo socket agents.

Handling of notifications in Business Suite systems is described here: http://scn.sap.com/docs/DOC-27547. It also will work for notifications of socket agents if you add a notification destination which is based on a destination system of type SAP NW.

Greetings

Uwe

Former Member
0 Kudos

Thanks Uwe,

We had our VB expert here decompile the code of the standard SEND command that comes with the agent and add in logic to wait for the result and pass it back to ECC. That is working well for us now so we can progress our implementation to a full production environment. Many thanks for your help.

Regards,

Colm

Former Member
0 Kudos

Hi Colm, how are you ? now it is my time to query a weighing scale on ECC using PCo.

I did everything that the document below say to do, taking into account that my RFC System is a SAP ECC instead of EWM:

* SAP Plant Connectivity (PCo) Meets EWM SAP Plant Connectivity (PCo) Meets EWM Easy Guide for Connecting External Devices to SAP MFS Using PCo Socket Agents

After completing the instructions I did the tests and no issues here.

But this document doesn´t guide us to the complete process, it doesn´t show how to query the weighing scale in the RFC side.

How should I call the RFC that will give me the weighing scale value ?

Former Member
0 Kudos

Could you please post this as a new question and I will provide you with an answer, it's one of the flaws of the site here that I post answers to questions that I've asked that people find useful but I never get any points

Let me know when you've asked the question and I'll give you the code.

Former Member
0 Kudos

Colm Gavin, this is the thread: https://scn.sap.com/thread/3501838

Answers (0)