# UaException: status=Bad\_Certificate Time Invalid

**URL:** <https://forum.inductiveautomation.com/t/uaexception-status-bad-certificate-time-invalid/64910>\
**Category:** Ignition\
**Created:** [October 6, 2022, 4:57pm UTC](https://forum.inductiveautomation.com/t/uaexception-status-bad-certificate-time-invalid/64910 "2022-10-06T16:57:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kfoldesi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kfoldesi/32/11327_2.png) [@Kfoldesi](https://forum.inductiveautomation.com/u/Kfoldesi)\
**Post date:** [October 6, 2022, 4:57pm UTC](https://forum.inductiveautomation.com/t/uaexception-status-bad-certificate-time-invalid/64910/1 "2022-10-06T16:57:26Z")

</div>

How do I renew a certificate?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/2/d24bad5f3a1275f7419795eaf3bc76e729fed14d.png)

UaException: status=Bad\_CertificateTimeInvalid, message=certificate is expired: Thu Oct 03 00:00:00 EDT 2019 - Mon Oct 03 00:00:00 EDT 2022  
at org.eclipse.milo.opcua.stack.client.transport.uasc.UascClientAcknowledgeHandler.onError(UascClientAcknowledgeHandler.java:258)  
at org.eclipse.milo.opcua.stack.client.transport.uasc.UascClientAcknowledgeHandler.decode(UascClientAcknowledgeHandler.java:167)  
at io.netty.handler.codec.ByteToMessageCodec$1.decode(ByteToMessageCodec.java:42)  
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:502)  
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:441)  
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278)  
at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103)  
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)  
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)  
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:337)  
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1408)  
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)  
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)  
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930)  
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)  
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:677)  
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:612)  
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:529)  
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:491)  
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905)  
at java.base/java.lang.Thread.run(Unknown Source)

8.0.4 (b2019091612)  
Azul Systems, Inc. 11.0.4

---

<div class="post-metadata">

**Author:** ![Kfoldesi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kfoldesi/32/11327_2.png) [@Kfoldesi](https://forum.inductiveautomation.com/u/Kfoldesi)\
**Post date:** [October 7, 2022, 11:39am UTC](https://forum.inductiveautomation.com/t/uaexception-status-bad-certificate-time-invalid/64910/2 "2022-10-07T11:39:04Z")

</div>

Does anyone know how to resolve this issue? This system has been running for years. It talks to AB plc's using modbus. No OPC UA - I don't know why it has a temporary certificate.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 7, 2022, 12:48pm UTC](https://forum.inductiveautomation.com/t/uaexception-status-bad-certificate-time-invalid/64910/3 "2022-10-07T12:48:21Z")

</div>

If it is what I think, it is self-generated and signed. If you delete it I think Ignition will generate a new one. Which you probably then have to accept in the other system. @Kevin.Herron ?

---

<div class="post-metadata">

**Author:** ![avaughn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/avaughn/32/38972_2.png) [@avaughn](https://forum.inductiveautomation.com/u/avaughn)\
**Post date:** [October 7, 2022, 1:18pm UTC](https://forum.inductiveautomation.com/t/uaexception-status-bad-certificate-time-invalid/64910/4 "2022-10-07T13:18:57Z")

</div>

As Phil mentions, the certificates get regenerated during startup once you delete them. Kevin mentions in [this](https://forum.inductiveautomation.com/t/opcua-certificate-expired/40663/2) post where those certificates are located that need to be deleted. Also, 8.1.8 introduced a [regenerate](https://docs.inductiveautomation.com/display/DOC81/OPC+UA+Security#OPCUASecurity-RegenerateCurrentCertificates) certificate option.

---

<div class="post-metadata">

**Author:** ![cmohr623](https://avatars.discourse-cdn.com/v4/letter/c/ecd19e/32.png) [@cmohr623](https://forum.inductiveautomation.com/u/cmohr623)\
**Post date:** [April 12, 2023, 3:57pm UTC](https://forum.inductiveautomation.com/t/uaexception-status-bad-certificate-time-invalid/64910/5 "2023-04-12T15:57:37Z")

</div>

This resolution does work to regenerate the certificates, but the question from myself and my customer is; "Why did this happen and do we need to worry about it happening again?" This system is running v8.0.8 and has been running for many years without this happening. The solution isn't one that my customer feels comfortable doing themselves, so it requires an onsite service call from my office which costs them money. Is there an underlying issue that we need to look for and resolve or some other way to prevent this from happening again? Thanks!

---

<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 12, 2023, 4:00pm UTC](https://forum.inductiveautomation.com/t/uaexception-status-bad-certificate-time-invalid/64910/6 "2023-04-12T16:00:16Z")

</div>

It will happen again in 3 years.

If you upgrade to 8.1 and regenerate from the UI that was implemented you'll have the option to set a custom validity period.
