# Remote OPC

**URL:** <https://forum.inductiveautomation.com/t/remote-opc/3797>\
**Category:** Ignition\
**Created:** [December 22, 2011, 3:16pm UTC](https://forum.inductiveautomation.com/t/remote-opc/3797 "2011-12-22T15:16:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![epsmitas](https://avatars.discourse-cdn.com/v4/letter/e/4af34b/32.png) [@epsmitas](https://forum.inductiveautomation.com/u/epsmitas)\
**Post date:** [December 22, 2011, 3:16pm UTC](https://forum.inductiveautomation.com/t/remote-opc/3797/1 "2011-12-22T15:16:28Z")

</div>

I have a requirement to connect remotely to a Kepware OPC Server. We have the latest version of Kepware Communications Server V5.7.84.0. We are running Ignition 7.3.2 (b533).

( The two computers in question for testing purposes have the Firewalls disabled and each one is able to ping the other with a straight through Ethernet connection between the two. One is a 64bit Windows 7 system the other 32 bit Windows XP ).

I am able to establish a local connection on each computer to a local Kepware Server. The remote connection is an issue and results is the following Console message;

8:57:30 AM Common.BasicExecutionEngine One-shot task com.inductiveautomation.xopc.client.sropc.UAServer$3@4d9363c threw uncaught exception.

java.lang.NullPointerException  
at com.inductiveautomation.xopc.client.sropc.ConnectionUtil.getEndpoint(ConnectionUtil.java:76)  
at com.inductiveautomation.xopc.client.sropc.ConnectionManager.connect(ConnectionManager.java:92)  
at com.inductiveautomation.xopc.client.sropc.UAServer.setUp(UAServer.java:120)  
at com.inductiveautomation.xopc.client.sropc.UAServer.access$200(UAServer.java:52)  
at com.inductiveautomation.xopc.client.sropc.UAServer$3.run(UAServer.java:208)  
at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:526)  
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)  
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)  
at java.util.concurrent.FutureTask.run(FutureTask.java:138)  
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)  
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)  
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
at java.lang.Thread.run(Thread.java:662)

I believe I have a correct endpoint setup on the Kepware end;

opc.tcp://192.168.0.199:49320 Basic 128Rsa(S,SE), Basic256(S,SE)

And my Ignition OPC-UA Connection parameters are;

Host: 192.168.0.199  
Port: 49320  
Security Policy: Basic128Rsa15  
MessageSecurityMode: SignAndEncrypt

Everything else is blank.

Like I said before I am able to establish a local connection by setting the Host: localhost but once I try to connect on the remote OPC Server it fails.

I’m hoping someone has a suggestion of what I might need to look at as I am running out of ideas.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 22, 2011, 3:21pm UTC](https://forum.inductiveautomation.com/t/remote-opc/3797/2 "2011-12-22T15:21:02Z")

</div>

Can you go to the Console “Levels” tab, use the search to find a logger for “ConnectionUtil”, then turn that to DEBUG.

After a couple connection attempts go to the log viewer and export the logs and attach the logs.bin.gz file here or email it to support.

---

<div class="post-metadata">

**Author:** ![epsmitas](https://avatars.discourse-cdn.com/v4/letter/e/4af34b/32.png) [@epsmitas](https://forum.inductiveautomation.com/u/epsmitas)\
**Post date:** [December 22, 2011, 3:29pm UTC](https://forum.inductiveautomation.com/t/remote-opc/3797/3 "2011-12-22T15:29:50Z")

</div>

Log File Attached…  
[logs.bin.gz](https://us1.discourse-cdn.com/inductiveautomation/original/1X/89b01df0980b6900657e80796c90ba2624b5fdb6.gz) (431 KB)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 22, 2011, 4:10pm UTC](https://forum.inductiveautomation.com/t/remote-opc/3797/4 "2011-12-22T16:10:18Z")

</div>

I see the problem… there’s a totally invalid endpoint coming back from Kepware along with all the other valid endpoints that is causing a NPE…

I’ll have to write some code to handle this case and it’ll make it into the next release. In the meantime, is there anything suspicious looking in your Kepware UA configuration? I’ve never seen this coming from Kepware before.

---

<div class="post-metadata">

**Author:** ![epsmitas](https://avatars.discourse-cdn.com/v4/letter/e/4af34b/32.png) [@epsmitas](https://forum.inductiveautomation.com/u/epsmitas)\
**Post date:** [December 22, 2011, 6:59pm UTC](https://forum.inductiveautomation.com/t/remote-opc/3797/5 "2011-12-22T18:59:35Z")

</div>

The UA Configuration on the Kepware side appears trivial. I am not seeing many options but I will poke around. I may try to revert the Kepware back a couple of revisions to see if I get different results. Not sure what I’m going to do if this does not work. Thx.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 22, 2011, 7:04pm UTC](https://forum.inductiveautomation.com/t/remote-opc/3797/6 "2011-12-22T19:04:03Z")

</div>

I can always push out a beta version of the OPC-UA module that has a fix for the NPE if it comes to that.

---

<div class="post-metadata">

**Author:** ![epsmitas](https://avatars.discourse-cdn.com/v4/letter/e/4af34b/32.png) [@epsmitas](https://forum.inductiveautomation.com/u/epsmitas)\
**Post date:** [December 22, 2011, 8:52pm UTC](https://forum.inductiveautomation.com/t/remote-opc/3797/7 "2011-12-22T20:52:06Z")

</div>

I did manage to get a “remote” connection to the Kepware Sever by only “enabling” one endpoint in the Kepware OPC-UA configuration. I disabled the other local endpoints and communications from Ignition cleared up. Maybe I don’t understand endpoints but I thought that multiple ones could co exist. I even tried differentiating them with different port numbers but it still broke the Ignition comms. Once I reverted back to 1 endpoint the comms started working again. FYI.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 22, 2011, 8:57pm UTC](https://forum.inductiveautomation.com/t/remote-opc/3797/8 "2011-12-22T20:57:05Z")

</div>

Your understanding is correct. The problem is that one of those enabled endpoints on Kepware is coming into Ignition in an invalid/malformed format. By disabling the others and enabling just the one you’ve stopped that from happening.
