MatrikonOPC Tunneller Troubleshooting Guide
MatrikonOPC Tunneller Troubleshooting Guide
This manual is a product of Matrikon Inc. Matrikon Inc. Suite 1800, 10405 Jasper Avenue Edmonton, AB T5J 3N4 Canada Phone: +1.780.448.1010 Fax: +1.780.448.9191 www.matrikonopc.com
Document Revision History: Date
Document Version
Description
Author
2007-12-20
1.0
Initial document.
BM
2009-07-13
1.1
MatrikonOPC Tunneller Troubleshooting Guide.
JS
2010-01-15
2.0
Published version.
LB, JS
MatrikonOPC Tunneller Troubleshooting Guide
2
SOFTWARE VERSION Version:
N/A
DOCUMENT VERSION Version:
2.0
COPYRIGHT INFORMATION © Copyright 1997 - 2010, Matrikon Inc. All rights reserved. No part of this document may be reproduced, stored in a retrieval system, translated, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without prior written permission of Matrikon Inc.
CONFIDENTIAL The information contained herein is confidential and proprietary to Matrikon Inc. It may not be disclosed or transferred, directly or indirectly, to any third party without the explicit written permission of Matrikon Inc.
LIMITATIONS Matrikon has made its best effort to prepare this manual. Matrikon makes no representation or warranties of any kind with regard to the completeness or accuracy of the contents herein and accepts no liability of any kind including without limitation warranties of merchantable quality, satisfactory quality, merchantability and fitness for a particular purpose on those arising by law, statute, usage of trade, course of dealing or otherwise. Matrikon shall not be liable for any losses or damages of any kind caused or alleged to be caused directly or indirectly from this manual.
LICENSE AGREEMENT This document and the software described in this document are supplied under a license agreement and may only be used in accordance with the terms of that agreement. Matrikon reserves the right to make any improvements and/or changes to product specifications at any time without notice.
TRADEMARK INFORMATION The following are either trademarks or registered trademarks of their respective organizations: Matrikon and MatrikonOPC are trademarks or registered trademarks of Matrikon Inc.
OTHER MatrikonOPC™ is a division of Matrikon™ Inc.
MatrikonOPC Tunneller Troubleshooting Guide
3
Table of Contents Introduction ..................................................................................................................... 5 Initial Troubleshooting..................................................................................................... 6 COM ................................................................................................................................ 6 Licensing .......................................................................................................................... 6 Product Version ................................................................................................................. 6 User’s Manual ................................................................................................................... 6 Installation ....................................................................................................................... 6 Contacting Support ............................................................................................................ 6 Direct Connection ............................................................................................................. 8 Test 1 – Connecting Locally with MatrikonOPC Explorer .......................................................... 8 Local Loopback ................................................................................................................. 9 Test 2 – Connect the Two Tunneller Components Locally ........................................................ 9 Test 3 – Local Loopback to OPC Servers ............................................................................. 12 Network Connection ....................................................................................................... 15 Test 4 – Testing Network Connection ................................................................................. 15 Test 5 – Connecting Tunneller Across Your Network ............................................................. 15 Sample Network Connection ............................................................................................. 17 Tunneller Logging .......................................................................................................... 18 Client Side ...................................................................................................................... 18 Interface Logging ............................................................................................................ 18 Server Side (v3.0.1.0 and Older)....................................................................................... 18 Server Side (v3.1.1.0 and Newer) ..................................................................................... 18 Log Locations .................................................................................................................. 18
Table of Figures Figure Figure Figure Figure Figure Figure Figure Figure Figure
1 2 3 4 5 6 7 8 9
-
Tunneller Standard Architecture ...................................................................... 5 Tunneller Local Connection Architecture .......................................................... 8 Tunneller Local Loopback Connection .............................................................. 9 Tunneller Server-Side Default Configuration (1) ............................................ 10 Tunneller Server Side Default Configuration (2) ............................................ 11 Tunneller Client Side Gateway Configuration Utility ....................................... 12 MatrikonOPC Explorer OPC Server Connection ............................................... 13 Tunneller Network Connection Architecture ................................................... 16 MatrikonOPC Tunneller Error Message ........................................................... 16
Table of Tables Table 1 - MatrikonOPC Support Regional Contact Information ......................................... 7 Table 2 - After-Hours Support .......................................................................................... 7
MatrikonOPC Tunneller Troubleshooting Guide
4
Introduction Every MatrikonOPC™ Tunneller connection has an infrastructure that looks like the diagram in Figure 1, highlighting the desired data flow path. If you are having trouble connecting MatrikonOPC Tunneller from your production OPC server on one computer to the production OPC client on another computer, you can follow these steps to diagnose where the communication is failing. There are some potential issues listed at each step. Host 1 – Server Side Production OPC Server (server)
Host 2 – Client Side
MatrikonOPC Simulation (server)
MatrikonOPC Tunneller SSC (client) MatrikonOPC Tunneller CSC (server)
MatrikonOPC Explorer (client)
MatrikonOPC Simulation (server)
Network
MatrikonOPC Tunneller SSC (client) MatrikonOPC Tunneller CSC (server)
MatrikonOPC Explorer (client)
Production OPC Client (client)
Figure 1 - Tunneller Standard Architecture
MatrikonOPC Simulation Server and MatrikonOPC Explorer are powerful testing tools and are used extensively as diagnostic tools. They are included with the Tunneller install. It is expected that you are familiar with both Explorer and the Simulation server. Both products come with a configuration training video. Every time you test your connection in MatrikonOPC Explorer, make sure: You connect to the OPC server. The state is Running. You add and validate a handful of tags from the OPC server. You get values with Good quality.
MatrikonOPC Tunneller Troubleshooting Guide
5
Initial Troubleshooting There are a few items that should be checked before any other troubleshooting is done.
COM MatrikonOPC Tunneller avoids DCOM headaches. However, all OPC communication is based on Microsoft ActiveX COM. You must configure your COM settings in a similar way to DCOM configuration. Tunneller does not need an identical user on the client and server machines. On both the server and client side, set up DCOM for the Tunneller CSC, all OPC servers, OpcEnum, and defaults according to the following documents: MatrikonOPC Windows NT 2000 DCOM Configuration MatrikonOPC Windows XPSP2 2003SP1 DCOM Configuration Note: The Tunneller Server Side Connection (SSC) does not have its own DCOM entry.
Licensing Using the MatrikonOPC Licensing Utility, verify that MatrikonOPC Tunneller is licensed on both the OPC server and OPC client sides. Ensure that your OPC server and client are licensed as well.
Product Version Often times upgrading to the latest version resolves a variety of issues you may be experiencing. Note: Versions made before 2006 are not compatible with the current version. Please contact MatrikonOPC Support or your account manager to find out if an upgrade is available.
User’s Manual You can find the MatrikonOPC Tunneller User’s Manual in the install directory or a shortcut to it in the Start menu. This is the best resource for complete information about various settings in Tunneller.
Installation While it is optional to install both the Tunneller Server-Side and Tunneller Client-Side on the each computer, it is highly advantageous for troubleshooting and it will be assumed you have done this. To install, you must have full administrator permissions. If you are installing from a remote desktop session, you must log in as the console session by going to Start -> Run, and type in mstsc.exe /admin, or mstsc.exe /console for earlier versions of Windows. The other option is to use Control Panel -> Add or Remove Programs -> Add New Programs -> CD or Floppy, and select the Tunneller install executable. Once Tunneller has been installed correctly, the following services are displayed: MatrikonOPC Tunneller CSC, MatrikonOPC Tunneller HDA CSC, and MatrikonOPC SSC. The services should be set to launch Automatically.
Contacting Support The MatrikonOPC Customer Services department (www.opcsupport.com) is available 24 hours a day, seven days a week. Contact MatrikonOPC Support using the information below, or send an email (
[email protected]). MatrikonOPC Tunneller Troubleshooting Guide
6
For Monday to Friday daytime support requests, contact MatrikonOPC Support using the regional phone numbers provided in Table 1. Region
Office Hours
North America
8:00 am-5:00 pm
UTC/GMT -7 hours (MST) Europe /Africa *
9:00 am-5:00 pm
UTC/GMT +1 hours (CET)
Contact Information +1-877-OPC-4-ALL +49-221-969-77-0 (Request OPC Support)
Middle East * UTC/GMT +3 hours
9:00 am-5:00 pm
+973-174-65363
Australia/Asia * UTC/GMT +10 hours (AEST)
9:00 am-5:00 pm
+61-2-4908-2198 (Request OPC Support)
* Toll-free regional numbers coming soon! Table 1 - MatrikonOPC Support Regional Contact Information
For after-hours support in all regions, please use either of the following numbers. There is no extra charge from MatrikonOPC for calling their after-hours support numbers. Region
Contact Information +1-780-231-9480 +1-780-264-6714
All
Table 2 - After-Hours Support
MatrikonOPC Tunneller Troubleshooting Guide
7
Direct Connection Test 1 – Connecting Locally with MatrikonOPC Explorer First, we want to ensure that you can connect the MatrikonOPC Explorer client to the OPC servers on the local machine. If you cannot validate tags or get quality status of good, there are bigger problems than MatrikonOPC Tunneller! 1. Connect to tags in MatrikonOPC Server for Simulation server using MatrikonOPC Explorer. 2. Connect to tags in your production OPC server using MatrikonOPC Explorer. 3. You may also want to attempt to connect locally to the MatrikonOPC Server for Simulation using your production OPC client, on the client side. This test is successful if you can read data, receive updates, and have good quality data. Host 1 – Server Side Production OPC Server (server)
Host 2 – Client Side
MatrikonOPC Simulation (server)
MatrikonOPC Simulation (server)
MatrikonOPC Tunneller SSC (client)
MatrikonOPC Tunneller SSC (client)
MatrikonOPC Tunneller CSC (server)
MatrikonOPC Tunneller CSC (server)
MatrikonOPC Explorer (client)
MatrikonOPC Explorer (client)
Production OPC Client (client)
Figure 2 - Tunneller Local Connection Architecture
A successful test should tell you that: 1. OPC and COM are working on this computer. 2. The user currently logged in has permissions to connect to the OPC server. What to do if you had problems during this test: 1. Check your COM/DCOM settings. 2. Ensure that your OPC server is configured correctly. 3. If you are still experiencing problems with this test, contact your OPC server vendor or MatrikonOPC Support.
MatrikonOPC Tunneller Troubleshooting Guide
8
Local Loopback We want to prove that MatrikonOPC Tunneller can successfully connect with the MatrikonOPC Server for Simulation, all on the same machine. The purpose of a loopback test is to determine any communication constraints that may exist on the local PC, without external network issues interfering. This test rules out things like local default COM and local security issues. Host 1 – Server Side Production OPC Server (server)
MatrikonOPC Simulation (server)
MatrikonOPC Tunneller SSC (client) MatrikonOPC Tunneller CSC (server)
MatrikonOPC Explorer (client)
Figure 3 - Tunneller Local Loopback Connection
Test 2 – Connect the Two Tunneller Components Locally MatrikonOPC Tunneller Server Side Connection should have Encryption, Impersonation, and Access Lists turned off for the preliminary connection testing. By default, these are all turned off. It is recommended that other settings be left at their default settings unless this test fails. Configure the Tunneller CSC to communicate to the local computer: Open the MatrikonOPC Tunneller Client Side Configuration Utility. Select the local machine and verify that Tunneller adds the links correctly. A list of OPC servers appear in the left-hand pane. Set the Communication Retry Attempts option to Retry Forever. This often rules out network issues. This test is successful if you receive a list of local OPC servers, as seen in figure 6.
MatrikonOPC Tunneller Troubleshooting Guide
9
Figure 4 - Tunneller Server-Side Default Configuration (1)
MatrikonOPC Tunneller Troubleshooting Guide
10
Figure 5 - Tunneller Server Side Default Configuration (2)
MatrikonOPC Tunneller Troubleshooting Guide
11
Figure 6 - Tunneller Client Side Gateway Configuration Utility
Test 3 – Local Loopback to OPC Servers 1. Open the MatrikonOPC Explorer and connect to the "tunnelled" link to MatrikonOPC Server for Simulation. 2. Verify that you can add a group, add tags and receive data, and have a connected state. 3. Test the tunnelled link to your production OPC server. This test is successful if you can add a group, add tags and receive data, and have a connected state for your OPC server.
MatrikonOPC Tunneller Troubleshooting Guide
12
Figure 7 - MatrikonOPC Explorer OPC Server Connection
A successful test will tell you that: 1. A passed test confirms that Tunneller Server-Side connection (normally running as the Local System account) has permission to communicate successfully to the local OPC servers. 2. If this works then you have proven that Tunneller SSC can communicate with the local OPC server. This means that the DCOM is set correctly, the TCP port specified is open (locally). What to do if you had problems during this test: 1. Check your COM/DCOM settings. 2. Verify that you do not have a firewall turned on, or that you have guaranteed that exceptions have been made for all Tunneller services and port (default TCP port is 21379). 3. Sometimes third-party OPC servers do not allow the SYSTEM account to connect to them and need a specific user. Go to the Windows Services panel and right-click your mouse on MatrikonOPC Tunneller SSC. Select Properties. From the Properties window, select the Log On tab and change the user. a. For example, the Emerson DeltaV OPC server expects the Tunneller SSC to log in as the DetaVAdmin user for most configurations. b. Keep in mind that MatrikonOPC Explorer runs as the user currently logged in. If you wish to test out other users, right-click your mouse on the MatrikonOPC Explorer shortcut and select the Run as option. 4. Ensure that the MatrikonOPC Tunneller SSC and CSC services are started by checking the Windows Services Manager. The Tunneller SSC should be set to Automatic, so that is starts with the computer. MatrikonOPC Tunneller Troubleshooting Guide
13
5. When adding a Tunneller connection in the Tunneller CSC, if there is no error message but also no OPC servers show up in the list then one of two things is happening. a. OPCEnum is not finding the OPC servers. Select the Registry Browse button in the Tunneller SSC and restart the service. You can also attempt to open the DCOM permissions for OPCEnum, or reinstall MatrikonOPC Tunneller. b. The second reason is that you have Restriction of Access to OPC Servers in the Tunneller Server-Side Gateway Configuration Tool turned on and not configured correctly.
MatrikonOPC Tunneller Troubleshooting Guide
14
Network Connection Test 4 – Testing Network Connection Ping: You can test if a network connection exists by pinging the other computer. 1. Open a command prompt. 2. Type ping
and press Enter. Note: For example, we would type ping TEST_COMP or ping 192.168.1.100. Telnet: You should also test the connection using telnet as this allows you to specify the TCP port. 1. Open a command prompt. 2. Type telnet and press Enter. Note: In our example, we would type telnet 192.168.1.100 21379. 3. If a blank screen appears then the port is open, and the test is successful. 4. If you receive a connecting message or an error message then something is blocking that port. It could be the Windows firewall, a third-party firewall like Norton's or a hardware firewall between the PCs. A successful test should tell you that: If you can both ping and telnet to the other computer, this shows that the port is open between the two computers. What to do if you had problems during this test: Verify the computers are physically connected to the same network. Contact your Network Administrator. Their may be a firewall between the machines. The IP address should always be tested in case the host name could not be resolved. Some domains block telnet and ping as a security measure, and this test will not work in all cases.
Test 5 – Connecting Tunneller Across Your Network Finally, we want to test MatrikonOPC Tunneller across your network. 1. Run the MatrikonOPC Tunneller Client Side Configuration Utility on the second computer, and add your server-side computer. 2. As before, connect to MatrikonOPC Simulation Server in Explorer. 3. Encryption, Impersonation, and Access Lists should still be turned off. 4. Connect to your production OPC server through Tunneller in Explorer. Once you have reached this point, you will have few issues with your final connections. If Explorer can connect to your Tunnelled OPC servers, but your production OPC client cannot, then the issue is most likely not with Tunneller. Try connecting your OPC client to the local and tunnelled Simulation server like we did in Test 1 and Test 2 of this manual.
MatrikonOPC Tunneller Troubleshooting Guide
15
Host 1 – Server Side Production OPC Server (server)
Host 2 – Client Side
MatrikonOPC Simulation (server)
MatrikonOPC Simulation (server)
MatrikonOPC Tunneller SSC (client)
MatrikonOPC Tunneller SSC (client) Network
MatrikonOPC Tunneller CSC (server)
MatrikonOPC Explorer (client)
MatrikonOPC Tunneller CSC (server)
MatrikonOPC Explorer (client)
Production OPC Client (client)
Figure 8 - Tunneller Network Connection Architecture
What to do if you had problems during this test:
Figure 9 - MatrikonOPC Tunneller Error Message
If you see the error in Figure 9: Each item listed in the error message has been explained earlier in this manual. Increase your Communication Timeout and Retries. You may need to increase the communication timeout if you have substantial network traffic, or are attached to a large network (such as the Internet). You may see a failed state when connecting to a Tunneller OPC Server in MatrikonOPC Explorer if the communication timeout is too low. If you cannot browse all tags that are expected, then you may have to increase the processing timeout. The default is 60 seconds. This is important when connecting to an OPC server with a large and flat address space. If the error occurs immediately (less than one second) after you click the OK button, then you may be seeing a known issue with Tunneller Version 3.1.1.0. This occurs in some network configurations with NAT routing port forwarding. Contact MatrikonOPC Support to upgrade your version of Tunneller to the latest version. If the host name does not work, try the IP address.
MatrikonOPC Tunneller Troubleshooting Guide
16
If you have multiple NICs on the same computer, enter the IP address and machine name in the windows hosts file (\windows\system32\drivers\etc\hosts). Windows does not always route to the correct NIC unless the destination IP address is found in the hosts file. If you get a “state: failed” message in MatrikonOPC Explorer this means that the Tunneller Client and server sides are not connected. If a router exists between the two computers, or they sit on different domains/subnets, you will likely have to configure port forwarding to the correct IP addresses. After a computer reboot, if your OPC client cannot connect to an OPC server through Tunneller, try to restart the Tunneller CSC service. If this works, you can set the Tunneller CSC service to be dependant on the OPC client service. You can use a command like the one below. Please read the Microsoft MSDN to fully understand the consequences of this command. Any existing dependencies will be deleted if you do not specify them in the command. sc config “MatrikonOPC Tunneller CSC” depend= /RPCSS
Sample Network Connection In less than 5 minutes, connect to an OPC server in Northern Canada and view its process data. If you are having trouble with network connections in general and have internet access, you may attempt to connect to a server in the MatrikonOPC head office. The computer name: OPC-Canada.matrikon.com This exercise guides you through five easy steps to show you just how quickly you can connect to a remote OPC servers. Download all necessary software for free from our site. The best part is that you don't have to be an OPC expert to do it! Click here to try it now
MatrikonOPC Tunneller Troubleshooting Guide
17
Tunneller Logging You may need to collect log files for analysis by MatrikonOPC Support. You can enable logging using the following instructions. Once logging has been set, replicate your issue. You can then run MatrikonOPC Analyzer to seamlessly gather these logs into a single zip file. Please remember to revert the logging settings back to Low when you have finished. High logging can cause reduced performance and increased disk space usage.
Client Side 1. Go to C:\Program Files\Matrikon\OPC\Tunneller\ and launch the MatrikonOPC Tunneller shortcut 2. Select View -> Options. 3. From the Options window, select the General Logging tab. 4. Select the Enable Activity Logging checkbox, and select High from the adjacent dropdown list. 5. Click OK and close the configuration window. Select No when it asks you to save changes. 6. Stop and start the Matrikon OPC Tunneller CSC service.
Interface Logging Interface logging records OPC calls between the OPC server and client. You should not turn this on unless instructed to by MatrikonOPC Support. To enable this feature, follow the same steps as described in Client Side logging except for step 3 where you select the Interface Logging tab instead of the General Logging tab.
Server Side (v3.0.1.0 and Older) 1. Go to C:\Program Files\Matrikon\OPC\Tunneller\Server-Side Gateway\ and open tunneller.ini in a text editor. 2. Change the Log line level = 1 to level = 3. 3. Save the file, and close. 4. Stop and start the Matrikon OPC Tunneller SSC service.
Server Side (v3.1.1.0 and Newer) 1. Open the MatrikonOPC Tunneller Server side configuration. 2. Select the Advanced tab. 3. Increase the logging level to High. 4. Apply the change and exit. 5. Stop and start the Matrikon OPC Tunneller SSC service.
Log Locations You can run MatrikonOPC Analyzer to seamlessly gather these logs into a single zip file. MatrikonOPC Tunneller Troubleshooting Guide
18
The client side log is called PSTCFGMatrikon.OPC.Tunneller.1.log, located in: o
C:\Program Files\Common Files\MatrikonOPC\Common\
Interface log is called PSTxx.tmp (where xx is a number) and is located in: o
C:\Program Files\Matrikon\OPC\Tunneller\Client-Side Gateway\
The server side log file is called tunneller.log and is located in: o
C:\Program Files\Matrikon\OPC\Tunneller\Server-Side Gateway\
In versions 3.2.0.0 and above ClientSideConfig.log can be found in: o
C:\Program Files\Common Files\MatrikonOPC\Common\
MatrikonOPC Tunneller Troubleshooting Guide
19