# Upgrade from 1.4.2 to 2.3.3

**URL:** <https://discuss.elastic.co/t/upgrade-from-1-4-2-to-2-3-3/53575>\
**Category:** Logstash\
**Created:** [June 21, 2016, 9:12pm UTC](https://discuss.elastic.co/t/upgrade-from-1-4-2-to-2-3-3/53575 "2016-06-21T21:12:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AGirin](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@AGirin](https://discuss.elastic.co/u/AGirin)\
**Post date:** [June 21, 2016, 9:12pm UTC](https://discuss.elastic.co/t/upgrade-from-1-4-2-to-2-3-3/53575/1 "2016-06-21T21:12:04Z")

</div>

We are testing upgrade from Logstash 1.4.2 to 2.3.3 and seeing a lot of this error in the logstash.log:

{:timestamp=\>"2016-06-21T15:41:12.868000-0500", :message=\>"Ruby exception occurred: LogStash::Timestamp can't be coerced into Fixnum", :level=\>:error}

We have a lot of configs under /etc/logstash/conf.d. Can somebody point me in the right direction on how to troubleshoot this issue?

Thanks,

Andrew

---

<div class="post-metadata">

**Author:** ![AGirin](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@AGirin](https://discuss.elastic.co/u/AGirin)\
**Post date:** [June 21, 2016, 10:05pm UTC](https://discuss.elastic.co/t/upgrade-from-1-4-2-to-2-3-3/53575/2 "2016-06-21T22:05:08Z")

</div>

I isolated this error to this code in our config:

ruby {  
init =\> "require 'time'"  
code =\> "event['[metrics][server\_lag]'] = Time.now.to\_i - event['@timestamp']; event['[metrics][server\_time]'] = Time.now.to\_i"  
}

---

<div class="post-metadata">

**Author:** ![AGirin](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@AGirin](https://discuss.elastic.co/u/AGirin)\
**Post date:** [June 21, 2016, 10:31pm UTC](https://discuss.elastic.co/t/upgrade-from-1-4-2-to-2-3-3/53575/3 "2016-06-21T22:31:48Z")

</div>

Fixed the code and the error wen away:

ruby {  
init =\> "require 'time'"  
code =\> "event['[metrics][server\_lag]'] = Time.now.to\_i - event['@timestamp'].to\_i; event['[metrics][server\_time]'] = Time.now.to\_i"  
}

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:51am UTC](https://discuss.elastic.co/t/upgrade-from-1-4-2-to-2-3-3/53575/4 "2017-07-06T04:51:21Z")

</div>


