cancel
Showing results for 
Search instead for 
Did you mean: 

Start and Stop Pco Agent

matteo_fusi2
Participant
0 Kudos

Good morning experts,

  we have connections beetwen Emerson DCS - DELTAV OPC and MII using SAP PCo 15.0

Everything was fine since Managment decided to start and stop Agent Monitor during a window in order to avoid PCo Tags Browsing towards DCS.

We are using Windows Tasks scheduler to start and stop services, but it seems that start and stop result is different from using PCo console because now we have the error below.

Any Ideas?

Thanks and best regards

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member196557
Active Contributor
0 Kudos

Hi Matteo,

The error is from Netweaver and it looks like PCo is being stopped in the middle of a Query from MII to PCo.

Does PCo Agent Instance(s) start correctly after being stopped?

Can you continue to use MII with PCo to browse and retrieve tags and data  after a restart?

Regards, Steve

Former Member
0 Kudos

Good Morning Steve,

I'm Matteo colleague working on PCo.

PCo Agent Starts at 08.00PM and at 11.00PM MII uses TAGS query to get values from DCS finishing at 1.50AM.

At 2.00AM Windows tasks stops Agent.

During the noon when I test start using Windows Service I can see something strange such as these errors (but not on all tags).

Everything was fine since Management decides to start&stop Pco Agent using services.

former_member196557
Active Contributor
0 Kudos

Hi Alessandro,

What is it that you are trying to prevent by only allowing the PCo agent Instance to run for a limited period of time each day?

What Version, SP, and Patch of MII and PCo?

Are you saying that you only get these errors when stopping and starting PCo, but when PCo runs continuously there are no issues?

Regards, Steve

Former Member
0 Kudos

Hi Steve

we work with:

SAP MII 15.0 SP 03 Patch 3

PCo 15.0.3.2248

Operating System VersionMicrosoft Windows Server 2008 R2 Enterprise
Service PackService Pack 1

We start collecting data from Emerson DCS in august, agent always up running and we had no problems at all.

But emerson says that PCo Browsing causes too much of data load to their system. So Management decided to run PCo only 4 hours at night and then stopping the agent service using Windows task manager.

I'm not trying to avoid starting  and stopping agent because this is a requirement, I'm trying to figure out why this decision casues troubles with retrieving data. As you can see  we have exception as in figure in NWA Log.

At first glance it seems that starting and stopping agent using Console and starting and stopping agent using Services it is the same, but to me it is not and I would like to figure out if this impression is correct.

Starting & stopping using Windows Service Management take different times compared to PCo console. But at first glance the result for both is agent up&running or stopped if we stop the service.

In some posts of yours I found agent must be always up&running, is it correct?

Thanks

Alessandro

former_member196557
Active Contributor
0 Kudos

Hi Alessandro,

Are you connecting via OPC DA, or OPC HDA?

Have you defined Subscription Items and/or Notifications in the Agent Instance?

Regards, Steve

Former Member
0 Kudos

Hi Steve,

I'm connecting using OPC DA. I've not defined any Items or Notifications.

We have a Custom Database in which we listed all tags.

In my job I cycle all the tags passing any single tag to PCo Query--> RETRIEVE '[Param.1]' where [Param.1] is the corresponding tag.

Maybe this is not the best way but everythign was fine since we decided to schedule start&stop agent using Windows Services.

Thanks

Alessandro

former_member196557
Active Contributor
0 Kudos

Hi Alessandro,

OK, nothing looks out of the ordinary in what you are doing.

Do you have any indication of any tag data that is not retrieved when queried?

What is the issue access to the DCS that caused the request to only run the Agent instance when needed?

Regards, Steve

Former Member
0 Kudos

Hi Steve,

we need to start&stop agent because DCS OWNER (Emerson) said that PCo increase the amount of DCS load doing browsing sessions during all the 24H.

So business adopted the workaround to start PCo Agent from 8:00PM to 02:00 and then  stoppin using windows TASK SCHEDULER.

Is it possible that start&stop PCo Agent is not recommended?

Is it better to find solution DCS Emerson DELTAV side (even if this is a difficult solution because another vendor (Emerson) is involved)

Thank you

Alessandro

former_member196557
Active Contributor
0 Kudos

Hi  Alessandro,

PCo should not be browsing for tags unless there are queries being executed from MII.  PCo does validate the OPC server connection periodically but there should not be any other activity between PCo and the DeltaV OPC Server until tag queries are executed. I am also somewhat surpised to hear that just browsing tags puts a significant load on the DCS.

If you can deal with the error message, and you are NOT detecting any missing data reads, then leave things as they are. Otherwise, this should be taken up with the Emerson support team to determine why this is an issue with DeltaV.

Regards, Steve

Former Member
0 Kudos

Hi Steve,

  could we say that it is better to PCo Agent is always up&running and on the other side scheduling it using windows task could generate issues?

Thanks for your help

  Alessandro

former_member196557
Active Contributor
0 Kudos

Hi Alessandro,

It should not matter if you start/stop PCo on a schedule. Most customers leave it running 24x7.

Note that stopping a PCo Agent Instance from a task scheduler that executes the Net Stop command does not do anything different than stopping an Agent Instance from Management Console -- both stop the Agent Instance Windows Service.  Please confirm this by starting and stopping PCo through Management Console and while started, execute a tag browse from MII before stopping. If you see a different behavior with this test please let me know along with the pertinent details (Log Messages, etc.).

Regards, Steve

Former Member
0 Kudos

Hi Steve,

these are few sample in the  Management console log and, I think, the related Exception in nwa

This is relatd to the quality... It is manageable from settings, but I'd like to use GOOD


Retrieve for Tag MODULES/P01-3100/31-FI-304_N_TOT/IERI/CV [31-FI-304_N_TOT/IERI.CV] failed due to Quality Error, Expecting: Good, Received:Bad.

The following errors are more interesting

I don't know what it is...


Retrieve for Tag MODULES/P02-3900/39-FI-213_N_TOT/IERI/CV [39-FI-213_N_TOT/IERI.CV] failed due to Value cannot be null.

Parameter name: source.

I don't know what it is...


The given key was not present in the dictionary. KeyNotFoundException: The given key was not present in the dictionary.

   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)

   at SAP.Manufacturing.Connectivity.Agents.Opc.Da.Wrappers.DaGroupWrapper.SyncReadItems(Int32[] serverHandles, Int32 threadID)

   at SAP.Manufacturing.Connectivity.Agents.Opc.Da.Wrappers.DaGroupWrapper.ReadTags(List`1 itemsSource, Int32 threadID)

   at SAP.Manufacturing.Connectivity.Agents.Opc.Da.OpcDaAgent.ReadTags(Object readThreadID)

Any Idea?

Regards,

  Alessandro

Query execution failed due to following:

Unknown stream error: com.sap.xmii.protocol.ProtocolException: java.lang.ArrayIndexOutOfBoundsException: while trying to store to index 18224 of a byte (or boolean) array with length 18224, loaded from local variable 'bytes'

[EXCEPTION]

com.sap.xmii.Illuminator.logging.LHException: Query execution failed due to following:

Unknown stream error: com.sap.xmii.protocol.ProtocolException: java.lang.ArrayIndexOutOfBoundsException: while trying to store to index 18224 of a byte (or boolean) array with length 18224, loaded from local variable 'bytes'

at com.sap.xmii.Illuminator.logging.ErrorHandler.handleError(ErrorHandler.java:47)

at com.sap.xmii.Illuminator.logging.ErrorHandler.handleError(ErrorHandler.java:36)

at com.sap.xmii.Illuminator.connectors.PCo.TagFixedQueryProcessor.processRequest(TagFixedQueryProcessor.java:92)

at com.sap.xmii.Illuminator.connectors.PCo.PCoConnector.doProcessRequest(PCoConnector.java:99)

at com.sap.xmii.Illuminator.connectors.AbstractConnector.processRequest(AbstractConnector.java:112)

at com.sap.xmii.Illuminator.server.QueryEngine.run(QueryEngine.java:65)

at com.sap.xmii.Illuminator.server.QueryEngine.run(QueryEngine.java:46)

at com.sap.xmii.bls.executables.actions.illuminator.IllumQueryAccompanimentData.runQuery(IllumQueryAccompanimentData.java:1601)

at com.sap.xmii.bls.executables.actions.illuminator.IllumQueryAccompanimentData.query(IllumQueryAccompanimentData.java:1047)

at com.sap.xmii.bls.executables.actions.illuminator.IlluminatorQueryActions.query(IlluminatorQueryActions.java:135)

at com.sap.xmii.bls.executables.actions.illuminator.IlluminatorQueryActions.query(IlluminatorQueryActions.java:123)

at com.sap.xmii.bls.executables.actions.illuminator.IlluminatorQueryActions.pcoQuery(IlluminatorQueryActions.java:463)

at sun.reflect.GeneratedMethodAccessor666.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at com.sap.xmii.bls.engine.ReflectiveAction.doExecute(ReflectiveAction.java:837)

at com.sap.xmii.bls.engine.BaseNode.executeNode(BaseNode.java:203)

at com.sap.xmii.bls.engine.BaseAction.execute(BaseAction.java:86)

at com.sap.xmii.bls.engine.runners.ProductionRunner.runAction(ProductionRunner.java:199)

at com.sap.xmii.bls.executables.sequences.Sequence.execute(Sequence.java:50)

at com.sap.xmii.bls.engine.runners.ProductionRunner.runSequence(ProductionRunner.java:172)

at com.sap.xmii.bls.executables.sequences.Sequence.execute(Sequence.java:59)

at com.sap.xmii.bls.engine.runners.ProductionRunner.runSequence(ProductionRunner.java:172)

at com.sap.xmii.bls.executables.controls.Repeater.doExecute(Repeater.java:146)

at com.sap.xmii.bls.engine.BaseNode.executeNode(BaseNode.java:203)

at com.sap.xmii.bls.engine.BaseControl.execute(BaseControl.java:133)

at com.sap.xmii.bls.engine.runners.ProductionRunner.runControl(ProductionRunner.java:104)

at com.sap.xmii.bls.executables.sequences.Sequence.execute(Sequence.java:64)

at com.sap.xmii.bls.engine.runners.ProductionRunner.runSequence(ProductionRunner.java:172)

at com.sap.xmii.bls.executables.sequences.Sequence.execute(Sequence.java:59)

at com.sap.xmii.bls.engine.runners.ProductionRunner.runSequence(ProductionRunner.java:172)

at com.sap.xmii.bls.executables.sequences.Sequence.execute(Sequence.java:59)

at com.sap.xmii.bls.engine.runners.ProductionRunner.runSequence(ProductionRunner.java:172)

at com.sap.xmii.bls.executables.sequences.Sequence.execute(Sequence.java:59)

at com.sap.xmii.bls.engine.runners.ProductionRunner.runSequence(ProductionRunner.java:172)

at com.sap.xmii.bls.executables.sequences.Sequence.execute(Sequence.java:59)

at com.sap.xmii.bls.engine.runners.ProductionRunner.runSequence(ProductionRunner.java:172)

at com.sap.xmii.bls.executables.sequences.RootNode.execute(RootNode.java:39)

at com.sap.xmii.bls.engine.TransactionInstance.execute(TransactionInstance.java:1250)

at com.sap.xmii.bls.engine.TransactionInstance.run(TransactionInstance.java:808)

at com.sap.xmii.bls.executables.actions.logic.LogicActions.transaction(LogicActions.java:393)

at sun.reflect.GeneratedMethodAccessor573.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at com.sap.xmii.bls.engine.ReflectiveAction.doExecute(ReflectiveAction.java:837)

at com.sap.xmii.bls.engine.BaseNode.executeNode(BaseNode.java:203)

at com.sap.xmii.bls.engine.BaseAction.execute(BaseAction.java:86)

at com.sap.xmii.bls.engine.runners.ProductionRunner.runAction(ProductionRunner.java:199)

at com.sap.xmii.bls.executables.sequences.Sequence.execute(Sequence.java:50)

at com.sap.xmii.bls.engine.runners.ProductionRunner.runSequence(ProductionRunner.java:172)

at com.sap.xmii.bls.executables.sequences.RootNode.execute(RootNode.java:39)

at com.sap.xmii.bls.engine.TransactionInstance.execute(TransactionInstance.java:1250)

at com.sap.xmii.bls.engine.TransactionInstance.run(TransactionInstance.java:808)

at com.sap.xmii.scheduler.XacuteWorker$1.run(XacuteWorker.java:245)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.Subject.doAs(Subject.java:394)

at com.sap.xmii.scheduler.XacuteWorker.execute(XacuteWorker.java:242)

at com.sap.xmii.ejb.JobBean.onMessage(JobBean.java:89)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47)

at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)

at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)

at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)

at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:50)

at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)

at com.sap.engine.services.ejb3.runtime.impl.Interceptors_MessageListenerType.invoke(Interceptors_MessageListenerType.java:86)

at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)

at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:191)

at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:23)

at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)

at sun.reflect.GeneratedMethodAccessor315.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at com.sap.engine.services.ejb3.util.BeanMethods.executeReflectMethod(BeanMethods.java:314)

at com.sap.engine.services.ejb3.jacc.ExecuteMethodPrivilegedAction.run(ExecuteMethodPrivilegedAction.java:38)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.Subject.doAs(Subject.java:394)

at com.sap.engine.services.ejb3.jacc.ContainerJ2EESecurityProviderBaseImpl.doAs(ContainerJ2EESecurityProviderBaseImpl.java:262)

at com.sap.engine.services.ejb3.runtime.impl.Interceptors_RunAs.invoke(Interceptors_RunAs.java:24)

at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)

at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:25)

at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)

at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:17)

at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)

at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Lock.invoke(Interceptors_Lock.java:21)

at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)

at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:138)

at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:172)

at com.sap.engine.services.ejb3.runtime.impl.MDBProxyInvocationHandler.invoke(MDBProxyInvocationHandler.java:142)

at com.sun.proxy.$Proxy713.onMessage(Unknown Source)

at com.sap.jms.client.session.JMSSession.deliverMessage(JMSSession.java:1075)

at com.sap.jms.client.session.JMSSession.run(JMSSession.java:898)

at com.sap.jms.resourceadapter.RaServerSession.run(RaServerSession.java:139)

at com.sap.engine.services.connector.jca15.work.TaskImpl.run(TaskImpl.java:410)

at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)

at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)

at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328

former_member196557
Active Contributor
0 Kudos

Hi Alessandro,

At this point I think you need to open a support ticket for PCo, as it appears that a more technical investigation is required than I can provide. You should gather two sets of logs:

  1. Clear the Agent instance log and set Log Level to Verbose
  2. wait for an automatic start - query - stop cycle, then export the logs , retrieve the mII errors, and clear again.
  3. Start - stop through Management Console and execute tag queries from MII while started. After stopping, export the logs, retrieve the MII errors,  and clear the logs and reset the Log Level to Warning.

You should name the log exports accordingly and upload them with the ticket.

Regards, Steve

Former Member
0 Kudos

Hi Steve,

  I had to change my account but it's still me.

we opened SAP ticket. Thanks for your help.

Do you want me to change discussion status?

Regards,

  Alessandro