{}

Våra varumärken

Impact-Company-Logo-English Black-01-177x54

Välkommen till Schneider Electrics webbplats

Välkommen till vår webbplats.

Sök bland vanliga frågor (FAQ)

OPC Client application gives the message "Failed to obtain a valid CLSID for the server ..."


THE FOLLOWING ARTICLE IS TAKEN FROM THE OPC RESOURCE SITE AT https://www.opcti.com:
======================================================================
OPC Error: Failure to obtain a CLSID

1. Cause
This error appears in the OPC Client application when it fails to find the OPC Server. The two most common causes are:

a. Failure to find the OPC server in the Windows Registry
b. Failure to connect to OPCENUM.EXE

2. Symptoms
When an OPC Client application is unable to find the OPC Server, users receive an error informing them that the OPC Client application could not obtain the CLSID of the OPC Server. Depending on the software product that you are using, this error may appear in various different formats as follows:

o CLSID not found in Registry

o OPC Server CLSID not found in Registry

o Cannot browse for OPC Servers on remote PC

o Unable to connect to the data source, COM error

o Failed to initialize Server Object. Invalid Class String

o Failed to obtain a valid CLSID for server [OPC Server name]

o DCOM error for CLSID 13486D44-4821-11D2-A494-3CB306C100000

o Unable to find any OpcEnum server on ; CLSID returns 800706BA

3. Background
The inability to establish the first connection with an OPC Server is both the first and most common error that Integrators encounter when using OPC. When an OPC Client application tries to connect to an OPC Server, the OPC Client application must be able to identify the exact application (OPC Server) to which it will connect. Each OPC Server is identified by a Class Identification (CLSID). The CLSID is a type of Globally Unique Identifier (GUID), which is a 128-bit number that identifies an application. A CLSID is similar to your own government-issued identification, such as a Social Security Number (SSN) or Social Insurance Number (SIN), which identifies a specific person.
Most OPC Client applications attempt to display a list of available OPC Servers on the target PC. This process is called Browsing and is the process whereby the OPC Client application is able to view the OPC Servers that are installed on the remote PC. When the OPC Client performs a Browse, it actually connects to a copy of OpcEnum, which resides on the remote PC, and retrieves the list of available OPC Servers (refer to Figure 1). This list includes the ProgID (human-friendly name) and the CLSID (the numerical identification) of each OPC Server. At this point, the OPC Client does not actually connect to the OPC Servers directly. Consequently, the retrieval of the list is independent of the state of each OPC Server and whether it is operational or not.

OPS Client Server
Figure 1: OpcEnum is used to browse for OPC Servers that are located on the same PC as OpcEnum.
If the OPC Client application is unable to find the CLSID, for any reason, it will not be able to connect to the OPC Server and use any of the messages in Section "2 Symptoms" (above). The OPC Client application typically retrieves the CLSID from one of two sources:

o The Windows Registry

o A Windows application called OpcEnum (on the target PC)

4. OPC Marketplace Observations
A failure to interact either with the Registry or with OpcEnum will result in an error. Section "6 Repair Procedure" (below) explains how to fix the problems that either of the above causes. Nevertheless, keep the following in mind when working with software products that do not seem to behave as you expect.
4.1 Preferred OPC browsing
OPCTI recommends that all programmers enable their OPC Client applications to behave as follows:

a. Enable users to connect to a copy of OpcEnum on the target PC. If this step succeeds it will provide users with a powerful and flexible method to dynamically browse for OPC Servers on any PC.

b. If the above fails, the OPC Client application should attempt to connect to the Windows Registry of the target PC. The user of the OPC Client application must have Administrator access rights to connect and browse the Windows Registry. Providing users with Administrator access rights is a security risk.

c. If the above fails, the OPC Client application should provide users with the ability to manually input a CLSID without having to install new software or modify the Windows Registry in any way. This method enables users to establish an OPC connection with minimal technical knowledge.

4.2 Some applications are unable to connect to OpcEnum
OPCTI recommends that all programmers enable their OPC Client applications to connect to either a local or remote copy of OpcEnum, as per section "4.1 Preferred OPC browsing" (above). However, there are many OPC Client applications that cannot connect to OpcEnum. This is because the programmers who wrote these OPC Client applications decided not to use OpcEnum for browsing. If this is the case integrators will have to do one of the following:

o Dangerous: Provide the users of the OPC Client applications with Administrator privileges on the target PC to enable them to browse the remote Windows Registry. OPCTI does not recommend this method because it may provide too many people with Administrator access to various PCs, which is a potential security threat.

o Tedious: Manually copy the OPC Servers CLSID to the PC on which the OPC Client application resides. This method will not enable the OPC Client application to dynamically browse remote PCs for their list of OPC Servers. However, it does provide a solution that works in a static environment.

4.3 Some applications cant connect to the Windows Registry
Some OPC Client applications are unable to connect to the Windows Registry regardless of the users identity. This is because the vendor did not add this functionality. These applications can typically only connect to a list of OPC Servers that the vendor preselected. There is typically nothing that the user can do in this case because the limitation lies with the application and not with OPC or DCOM.
5. Repair Procedure
5.1 User Authentication Issues
It is possible that you are not authenticated on the remote PC. Authentication is the process of verifying that you are the user you claim to be. Windows compares the User Name with the stored password. If Windows does not recognize your User Account, it will reject your entry immediately without attempting to make a connection to the OPC Server. This can happen under at least a couple of circumstances.

a. The User Account does not exist on a remote PC: If you are attempting entry from one Windows Domain to another, then you will either have to establish a Domain Trust or add your User Account to both Windows Domains. If you are using a Workgroup, then you will have to add the User Account to the remote PC. Ensure that you use the same spelling for the user name (but capitalization does not matter). As well, ensure you use the same spelling and capitalization for the password. Last, ensure that each User Account also has a password. Remote Authentication requires you to have a User Name and a password. If the User Account does not have a password, Authentication will fail. Note that if you are using a single Windows Domain, this problem will not happen.

b. Simple File Sharing is turned on: Simple File Sharing strips the username and password from requests coming in from remote computers. Thus, users will not be able to authenticate properly. To turn Simple File Sharing off, refer to Image 1. To learn more about how this feature affects OPC, and how to turn this feature off, refer to my whitepaper titled "OPC and DCOM: 5 things you need to know." Specifically, look for the section "2.2 Local Users Authenticate as Themselves".


Folder Options
Image 1: Turn off "Simple File Sharing" to enable Windows to Authenticate User Accounts properly.
5.2 OpcEnum is not installed
The OPC Foundation is responsible for the creation and maintenance of OpcEnum. OPC Foundation members can obtain OpcEnum for free directly from the OPC Foundation. OpcEnum is typically installed when you install an OPC Client or OPC Server; however, this is not always the case. Thus, it is possible that a computer does not have a local copy of OpcEnum installed.
OpcEnum is only able to browse for OPC Servers on the machine on which it is running. Therefore, OpcEnum cannot perform a Browse on remote PCs. Thus, even if a copy of OpcEnum is present on your own PC, you will not be able to browse the remote PC.
Use Windows Explorer to find out if OpcEnum is installed on the PC you wish to browse. The file is called OpcEnum.exe. If OpcEnum isn't installed, you will need to install it. OpcEnum is available as a free application from the OPC Foundation.
5.3 OpcEnum is disabled
Even if OpcEnum is installed on the remote PC, it must be able to execute, otherwise, communication will fail. If the "Startup Type" for OpcEnum is set to "Disabled" then Windows will be unable to start OpcEnum. Thus, you will have to enable OpcEnum.
Computer Management
Image 2: The Services panel indicates that the OpcEnum services is Disabled.
To check the Startup Type for OpcEnum follow the steps below:

o Click Start, and then click Control Panel. Click Performance and Maintenance. Click Administrative Tools, and then double-click Computer Management. The Computer Management window for the local computer is displayed. "Computer Management (Local)" is displayed at the root of the console tree.

o In the console tree, expand Services and Applications, and click on the Services container.

o Look for OpcEnum in the right-hand window pane. If the Startup Type is set to "Disabled", then OpcEnum is indeed disabled and you will have to enable it (below). If OpcEnum is not on the list, then it has likely not been installed, so you should go back to step "6.2 OpcEnum is not installed". If the Startup Type for OpcEnum is already set to either Manual or Automatic, then skip to step "6.4 Anonymous Logon access not given".

o To enable OpcEnum, right-click on OpcEnum, and select the Properties option. In the Startup Type Combo Box, select Manual (refer to Image 3). While it is also possible to select the Automatic setting, I recommend that you select Manual so that OpcEnum will only execute when required.


OPC properties
Image 3: To enable the OpcEnum Windows Service, set the Startup Type to Manual.
Now that the Startup Type for OpcEnum is properly set, try to browse the remote computer again. If it still doesn't work, move to the next step.
5.4 Anonymous Logon access not given
By default, OpcEnum requires Anonymous Logon access (on the OPC Server PC) to work properly. If you do not provide this access, no one will be able to connect to OpcEnum and browse the PC. It is possible that this access was overlooked during the setup. Thus, you will have to add the Anonymous Logon Access Control Entry (ACE) to the System-Wide DCOM Settings, Security Settings, Access Permissions, and Edit Limits. I described this in detail in my whitepaper titled "OPC and DCOM: 5 things you need to know" (visit www.opcti.com for a copy). Specifically, look for section "3.3 COM Security".
6. Additional References
The OPC Training Institute has various other whitepapers to help you troubleshoot and learn more about OPC. These are available on the OPCTI website at www.opcti.com If these are of interest, you can also consider attending one of OPCTIs many hands-on OPC courses where you get the opportunity to benefit from expert context, learn new concepts, and immediately apply them in live connectivity scenarios and troubleshooting activities.
6.1 OPC & DCOM: 5 Things You Need to Know
This whitepaper discusses the five steps to a simple and effective strategy to establish reliable DCOM communication. In addition, the whitepaper covers troubleshooting tips to identify common OPC and DCOM problems, their symptoms, causes, and how to solve them. This will help integrators set up reliable and secure OPC connections. Download the "OPC & DCOM: 5 Things You Need to Know" whitepaper.
6.2 OPC & DCOM Troubleshooting: Quick Start Guide
OPC is a powerful industrial communication standard. However, OPC relies on having DCOM work properly. Luckily, DCOM problems can usually be overcome with relatively simple configuration changes as documented in this whitepaper. Download the "OPC & DCOM Troubleshooting: Quick Start Guide" whitepaper.
6.5 0x80040202 DCOM Error
0x80040202 error appears in the OPC Client application when it fails to receive a callback from the OPC Server. Find out about the various circumstances that can trigger this error. Download the "0x80040202 DCOM Error" whitepaper.
6.6 0x80070005 DCOM Error
DCOM Error 0x80070005 appears in the OPC Client application when it succeeds in launching an OPC Server or OpcEnum, but fails to receive a reply from either of the applications. This error could be caused under several conditions. Download the "0x80070005 DCOM Error" whitepaper.
6.7 0x800706BA DCOM Error
The 0x800706BA DCOM error appears in the OPC Client application when the OPC Client "believes" that it has a live connection to the OPC Server, but truly does not. This can happen under several conditions. Download the "0x800706BA DCOM Error" whitepaper.
6.8 OPC Bridging Transfers Data between Industrial Automation Systems
Integrators frequently use OPC technology to connect one Industrial Automation system (PLC, DCS, SCADA, HVAC, etc) with another so data can be shared between the two systems. Because OPC technology is based on the Client/Server architecture, the challenge is that two OPC Servers cannot communicate with each other directly. A variety of vendors provide an intermediate software solution, generically called an "OPC Bridge," to facilitate this sort of communication. This whitepaper discusses the concept of the OPC Bridge, the solution architecture, required software components, and various features to help Integrators differentiate between different OPC Bridge products. Download the "OPC Bridging Transfers Data between Industrial Automation Systems" whitepaper.

OPC

Schneider Electric Sverige

Utforska mer
Produktfamilj
PowerLogic ION EEM 4.0ION Setup
Utforska mer
Produktfamilj
PowerLogic ION EEM 4.0ION Setup