# Trouble with Gateway Message from 7.9 to 8.0

**URL:** <https://forum.inductiveautomation.com/t/trouble-with-gateway-message-from-7-9-to-8-0/32587>\
**Category:** Ignition\
**Tags:** ignition79, ignition80\
**Created:** [February 25, 2020, 3:31pm UTC](https://forum.inductiveautomation.com/t/trouble-with-gateway-message-from-7-9-to-8-0/32587 "2020-02-25T15:31:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [February 25, 2020, 3:31pm UTC](https://forum.inductiveautomation.com/t/trouble-with-gateway-message-from-7-9-to-8-0/32587/1 "2020-02-25T15:31:11Z")

</div>

We're looking into a project where we'd like to leverage 8.0 but decouple some of the functionality from the existing 7.9 system. To do this, we'd like to send gateway messages from the 7.9 gateway to the 8.0 gateway. I've successfully established a gateway network connection outgoing from 8.0 to 7.9 and all seems to function well--I can even add the 7.9 tag provider to the 8.0 gateway via Remote Tag Provider.

Here is some baseline context:

- Ignition 8.0 Gateway
  - Version: 8.0.9
  - Hostname: `eightoh`
  - Ignition Gateway Name: `Ignition-eightoh`
  - Project Name: `EightOhTest`
  - Message Handler Name: `UpdateTime`

- Ignition 7.9 Gateway
  - Version: 7.9.13
  - Hostname: `sevennine`
  - Ignition Gateway Name: `Ignition-sevennine`
  - Project Name: `SevenNineTest`

When I attempt to send a gateway message from the 7.9 gateway (via the Designer, in R/W mode) with the script below:

```python
results = system.util.sendMessage(project="EightOhTest", messageHandler="UpdateTime", remoteServers=['Ignition-eightoh'])

```

... I get a `sendStatus=SENT` and the message seems to go out the door. On the 8.0 gateway, however, I get an error in the logger from `metro.Intent` (error is the same even if I change the _project_ or _messageHandler_ variables to invalid values in the msg send, so it appears to be at a level before the message is delivered to a given project's handler):

```python
Intent	25Feb2020 09:18:58	Unhandled Intent failure.
java.io.StreamCorruptedException: invalid type code: FF
at java.base/java.io.ObjectInputStream.readObject0(Unknown Source)
at java.base/java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.base/java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.base/java.io.ObjectInputStream.readObject0(Unknown Source)
at java.base/java.io.ObjectInputStream.readObject(Unknown Source)
at java.base/java.util.concurrent.ConcurrentHashMap.readObject(Unknown Source)
at java.base/jdk.internal.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at java.base/java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
at java.base/java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.base/java.io.ObjectInputStream.readObject0(Unknown Source)
at java.base/java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.base/java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.base/java.io.ObjectInputStream.readObject0(Unknown Source)
at java.base/java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.base/java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.base/java.io.ObjectInputStream.readObject0(Unknown Source)
at java.base/java.io.ObjectInputStream.readObject(Unknown Source)
at com.inductiveautomation.metro.impl.codecs.JavaSerializationCodec.decode(JavaSerializationCodec.java:41)
at com.inductiveautomation.metro.impl.CentralManagerImpl.handleLocal(CentralManagerImpl.java:432)
at com.inductiveautomation.metro.impl.ConnectionWatcher.handle(ConnectionWatcher.java:424)
at com.inductiveautomation.metro.impl.ConnectionWatcher.handle(ConnectionWatcher.java:43)
at com.inductiveautomation.metro.impl.protocol.websocket.WebSocketConnection.forward(WebSocketConnection.java:1407)
at com.inductiveautomation.metro.impl.protocol.websocket.WebSocketConnection$RunDownload.run(WebSocketConnection.java:1965)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

```

Has anyone else had success using gateway messaging between a 7.9 and 8.0 gateway?

Thanks in advance for any insights!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 25, 2020, 3:35pm UTC](https://forum.inductiveautomation.com/t/trouble-with-gateway-message-from-7-9-to-8-0/32587/2 "2020-02-25T15:35:17Z")

</div>

I’m pretty sure this is a bug that there’s active PRs up for. Scanning through those, looks like changes need to happen in both 7.9 and 8.0, so you’ll have to update both sides once changes are accepted.

Right now the PRs are targeting 7.9.14 and 8.0.10, but that’s subject to change 🚆

---

<div class="post-metadata">

**Author:** ![weertske](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weertske/32/3353_2.png) [@weertske](https://forum.inductiveautomation.com/u/weertske)\
**Post date:** [March 3, 2020, 9:58pm UTC](https://forum.inductiveautomation.com/t/trouble-with-gateway-message-from-7-9-to-8-0/32587/3 "2020-03-03T21:58:20Z")

</div>

@kcollins We needed the same functionality but could not wait for the aforementioned fix. I our case we have two central gateways (one 7.9 and one 8.0) and a bunch of spokes that are 7.9 that I used to message to via the 7.9 central gateway. To make the messaging from 8.0 work, I tag write a dataset tag to the 7.9 central gateway and on a tag change event it reads the dataset and sends a message to the 7.9 spoke targeted by the dataset (7.9 to 7.9). It works well but does require that the 8.0 gateway has read, write permissions to the 7.9 central gateway.

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [March 3, 2020, 10:31pm UTC](https://forum.inductiveautomation.com/t/trouble-with-gateway-message-from-7-9-to-8-0/32587/4 "2020-03-03T22:31:02Z")

</div>

@weertske, seems reasonable. We ended up concluding that at least for our proposed system, we could implement the equivalent functionality by putting WebDev on the 8.0 gateway and using HTTP requests (from the 7.9 gateway) for message exchange upstream. Not nearly as clean/simple as the built-in gateway messaging, but would let us get the job done in a way that could _fairly_ easily be substituted with gateway messaging later down the road.

Thanks for sharing that solution path as well!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 4, 2020, 10:21pm UTC](https://forum.inductiveautomation.com/t/trouble-with-gateway-message-from-7-9-to-8-0/32587/5 "2020-03-04T22:21:05Z")

</div>

FWIW - the changes just made it into 8.0.11 (will also likely be in 7.9.14). The gist is basically the approach @kcollins described; if a different major platform version is detected the payload is serialized to ‘plain’ JSON for exchange. It’s not perfect - you may have to manually handle ‘serializing’ more complex Java objects, if they’re not JSON primitives, but the groundwork’s already there.

---

<div class="post-metadata">

**Author:** ![TChenier](https://avatars.discourse-cdn.com/v4/letter/t/d6d6ee/32.png) [@TChenier](https://forum.inductiveautomation.com/u/TChenier)\
**Post date:** [June 15, 2020, 7:30pm UTC](https://forum.inductiveautomation.com/t/trouble-with-gateway-message-from-7-9-to-8-0/32587/6 "2020-06-15T19:30:51Z")

</div>

Did the fix make it into 7.9.14? I do not see any mention of messaging in the release notes.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 15, 2020, 7:46pm UTC](https://forum.inductiveautomation.com/t/trouble-with-gateway-message-from-7-9-to-8-0/32587/7 "2020-06-15T19:46:33Z")

</div>

Yes, it did. It got skipped in our release note process for some technical reasons, but the changes are in 7.9.14.
