on 2013 Jul 04 5:04 PM
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 827 | Information | . | 10 | 5600 | Scale02 | AgentBase | Start ignored. Agent state = Faulted | |
04/07/2013 16:57:42 617 | Information | . | 9 | 5600 | Scale02 | Host | WCF service is started. | |
04/07/2013 16:57:42 617 | Error | . | 9 | 5600 | Scale02 | Host | failed to create ConnectivityAgentProxy | FaultException`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 603 | Error | . | 13 | 5600 | Scale02 | ServiceFaultManager | Manufacturing Fault: REASON = Object reference not set to an instance of an object. ; SEVERITY = Fatal | |
04/07/2013 16:57:42 597 | Information | . | 13 | 5600 | Scale02 | AgentBase | Namespace Cache Loaded. | |
04/07/2013 16:57:42 597 | Verbose | . | 13 | 5600 | Scale02 | AgentBase | Namespace cache loading... | |
04/07/2013 16:57:42 597 | Verbose | . | 13 | 5600 | Scale02 | AgentBase | Namespace cache cleared. | |
04/07/2013 16:57:42 597 | Verbose | . | 13 | 5600 | Scale02 | AgentBase | Namespace cache constructor mode=Demand | |
04/07/2013 16:57:42 253 | Verbose | . | 13 | 5600 | Scale02 | AgentBase | starting... | |
04/07/2013 16:57:41 973 | Information | . | 9 | 5600 | Scale02 | Host | implicitly calling start on the hosted IConnectivityAgent service contract | |
04/07/2013 16:57:41 603 | Information | . | 9 | 5600 | Scale02 | Host | using default NetTcpBinding endpoint for internal IConnectivityAgent proxy | |
04/07/2013 16:57:41 603 | Verbose | . | 9 | 5600 | Scale02 | Host | Service endpoints: | |
04/07/2013 16:57:41 603 | Verbose | . | 9 | 5600 | Scale02 | Host | SAP.Manufacturing.Connectivity.SocketAgent is running with the following endpoints: | |
04/07/2013 16:57:40 547 | Information | . | 9 | 5600 | Scale02 | Host | WCF service is starting. | |
04/07/2013 16:57:40 457 | Verbose | . | 1 | 5600 | Scale02 | BrowserSessionManager | Created browse manager. | |
04/07/2013 16:57:40 447 | Verbose | . | 1 | 5600 | Scale02 | BrowserSessionManager | Created browse manager. | |
04/07/2013 16:57:40 337 | Verbose | . | 1 | 5600 | Scale02 | Host | Running [Scale02] as a windows service... |
Request clarification before answering.
Turns out I was missing a step on the setup to add Notification to my agent instance as per this document:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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.
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
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
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?
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
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
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 ?
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.
Colm Gavin, this is the thread: https://scn.sap.com/thread/3501838
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.