# OPC - Error connecting to server:

**URL:** <https://forum.inductiveautomation.com/t/opc-error-connecting-to-server/9559>\
**Category:** Module Development\
**Created:** [January 17, 2015, 5:27pm UTC](https://forum.inductiveautomation.com/t/opc-error-connecting-to-server/9559 "2015-01-17T17:27:53Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [January 17, 2015, 5:27pm UTC](https://forum.inductiveautomation.com/t/opc-error-connecting-to-server/9559/1 "2015-01-17T17:27:53Z")

</div>

Hi,  
I my trial version I continuously get following error in the logfile (ofcourse with different time stamps each time):

ERROR [OpcUaConnection:Ignition OPC-UA Server] [22:14:12,814]: Error connecting to server: StatusCode[Severity=Bad, Subcode=Bad\_ConnectionRejected]

Can some one explain what does it mean and how to get rid of it?  
(I am not using any OPC connection in my module, and its not interfering with my module development at the moment).

BR  
PRAMANJ

---

<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:** [January 20, 2015, 3:28pm UTC](https://forum.inductiveautomation.com/t/opc-error-connecting-to-server/9559/2 "2015-01-20T15:28:00Z")

</div>

It means either:

a) the OPC connection you have configured doesn’t have right address  
or  
b) the “endpoint address” setting for the server isn’t correct, which is common when Ignition is installed on a laptop and DHCP leases you a new IP address.

Make sure the endpoint address is correct in both the server and connection settings and restart the UA module or gateway.

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [January 23, 2015, 10:57am UTC](https://forum.inductiveautomation.com/t/opc-error-connecting-to-server/9559/3 "2015-01-23T10:57:19Z")

</div>

I have just activated the OPC module in my CD-KEY didn't do any configuration! Its the default downloaded 7.6.4 version of ignition evaluation version.

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [March 15, 2015, 10:32am UTC](https://forum.inductiveautomation.com/t/opc-error-connecting-to-server/9559/4 "2015-03-15T10:32:17Z")

</div>

I also periodically get "WARN [clockDriftDetector][10:40:48]: clock drift, degraded performance, or pause-the-world detected" in my logfile!

Could it be due to the fact that i don't reset my 2 hours trail period once its is over? The sample tag provider expamle gievn in SDK 7.6.4 keeps running and updating the tags in back ground and my module also keeps running.

Regards  
PRAMANJ

---

<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:** [April 2, 2015, 11:09pm UTC](https://forum.inductiveautomation.com/t/opc-error-connecting-to-server/9559/5 "2015-04-02T23:09:05Z")

</div>

[quote=“Pramanj”]I also periodically get “WARN [clockDriftDetector][10:40:48]: clock drift, degraded performance, or pause-the-world detected” in my logfile!

Could it be due to the fact that i don’t reset my 2 hours trail period once its is over? The sample tag provider expamle gievn in SDK 7.6.4 keeps running and updating the tags in back ground and my module also keeps running.

Regards  
PRAMANJ[/quote]

The clock drift detector is a task that is scheduled to run every 1 second. Every time it runs, it checks how long it has been since the last time it ran. If it’s been greater than 2 seconds, it logs a warning with the delta between now and the last run.

One cause is the system clock changing. Other causes have to do with pauses in the JVM for things like garbage collection or pauses/delays in execution caused by the underlying OS (common when running one virtual machines).

If occurring frequently, it’s worth paying attention to. Ignition can have many tasks that are time/timer-based, scheduled at periods much faster than 1 second. If the 1 second clock drift detection task is not able to get regularly executed on time, it’s likely that neither are the other periodic tasks.

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [April 8, 2015, 5:50am UTC](https://forum.inductiveautomation.com/t/opc-error-connecting-to-server/9559/6 "2015-04-08T05:50:57Z")

</div>

Hi,

If I have an execute once task created in my module which waits for a user input for long time, will it also cause "pause the world" error. In other words, are the execute once tasks also supposed to finish the work quickly and close?

regards  
PRAMANJ

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [April 14, 2015, 6:03pm UTC](https://forum.inductiveautomation.com/t/opc-error-connecting-to-server/9559/7 "2015-04-14T18:03:57Z")

</div>

Hi Kevin,  
Can you please explain whether Execution Manager created one time execute task if kept on long wait can cause this problem?  
regards  
PRAMANJ

---

<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:** [April 14, 2015, 6:11pm UTC](https://forum.inductiveautomation.com/t/opc-error-connecting-to-server/9559/8 "2015-04-14T18:11:06Z")

</div>

[quote=“Pramanj”]Hi Kevin,  
Can you please explain whether Execution Manager created one time execute task if kept on long wait can cause this problem?  
regards  
PRAMANJ[/quote]

It shouldn’t cause the ClockDriftDetector to go off, but regardless, you shouldn’t be doing long-running or blocking tasks in an ExecutionManager. They’re generally shared, whether it’s a private one within your module or a public one belonging to the platform, and you’re only supposed to run quick, non-blocking tasks on them.

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [April 15, 2015, 3:32am UTC](https://forum.inductiveautomation.com/t/opc-error-connecting-to-server/9559/9 "2015-04-15T03:32:58Z")

</div>

Then how do I build a non-blocking request/response mechanism between Ignition and my module using Execution Manager? Cyclic polling doen't seem to be right for me. Is there any other ajax like API supported in Ignition?  
BR  
PRAMANJ

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [April 16, 2015, 10:33am UTC](https://forum.inductiveautomation.com/t/opc-error-connecting-to-server/9559/10 "2015-04-16T10:33:52Z")

</div>

Hi Kevin,  
Can you please throw some light on TCP driver supported by Ignition? Where can I find some documentation about it in javadocs?  
Also I would appreciate your reply to my previosu question.  
Best regards  
PRAMANJ

---

<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:** [April 17, 2015, 2:59pm UTC](https://forum.inductiveautomation.com/t/opc-error-connecting-to-server/9559/11 "2015-04-17T14:59:48Z")

</div>

[quote=“Pramanj”]Hi Kevin,  
Can you please throw some light on TCP driver supported by Ignition? Where can I find some documentation about it in javadocs?  
Also I would appreciate your reply to my previosu question.  
Best regards  
PRAMANJ[/quote]

Please start new topics for these questions and I’ll get to them.

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [April 17, 2015, 5:42pm UTC](https://forum.inductiveautomation.com/t/opc-error-connecting-to-server/9559/12 "2015-04-17T17:42:04Z")

</div>

done.  
regards  
PRAMANJ
