[Bug-11134] Error “Writing to Server”

When a “shared” scripting module is imported into the designer and it is commited (or saved), the following error raises up:

com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Error writing to server
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:338)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:498)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:270)
at com.inductiveautomation.ignition.designer.gateway.PriviledgedDesignerTask$GatewayMessageTask.execute(PriviledgedDesignerTask.java:440)
at com.inductiveautomation.ignition.designer.gateway.PriviledgedDesignerTask$TaskThread.run(PriviledgedDesignerTask.java:328)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Error writing to server
at java.base/sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.base/java.net.HttpURLConnection.getResponseCode(Unknown Source)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:418)
... 4 more

Ignition v8.0.0-beta0 (b2018110513)
Java: Azul Systems, Inc. 11.0.1

The gateway runs on a virtual server (Windows Server 2016).
The error happens on a designer running on a remote machine (like my laptop), instead it does not appear when the designer is opened on localhost.

The build date of the Ignition8 is 8.0.0-beta0 (b2018110513).

GW Java Version: 11.0.1+13-LTS
Designer Java Version: Azul Systems, Inc. 11.0.1

Thank you for your support!

1 Like

This looks to me like you have some kind of corporate proxy or firewall interfering :grimacing:

1 Like

Thank you Kevin.
I did a check with our IT dept: at a first glance there are not firewall blocks between my laptop and the virtual server, where Ignition8 is running.
They ask me a question: are there some problems from Ignition side if the are network routers in the middle (the laptop and the gateway are on two different subnetworks)?

Thanks.

Any news for the current issue?

Unfortunately today I noticed that also in localhost the "Writing to Server" error occurs when trying to save global and/or project modifications.

14:38:51.504 [AWT-EventQueue-0] ERROR com.inductiveautomation.ignition.designer.IgnitionDesigner - null
com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Error writing to server
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:338)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:498)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:270)
at com.inductiveautomation.ignition.designer.gateway.PriviledgedDesignerTask$GatewayMessageTask.execute(PriviledgedDesignerTask.java:440)
at com.inductiveautomation.ignition.designer.gateway.PriviledgedDesignerTask$TaskThread.run(PriviledgedDesignerTask.java:328)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Error writing to server
at java.base/sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.base/java.net.HttpURLConnection.getResponseCode(Unknown Source)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:418)
... 4 common frames omitted
14:38:51.492 [PDT-Task-runner] WARN com.inductiveautomation.ignition.client.gateway_interface.GatewayConnectionManager - Connection to Gateway lost, due to exception.
com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Error writing to server
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:338)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:498)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:270)
at com.inductiveautomation.ignition.designer.gateway.PriviledgedDesignerTask$GatewayMessageTask.execute(PriviledgedDesignerTask.java:440)
at com.inductiveautomation.ignition.designer.gateway.PriviledgedDesignerTask$TaskThread.run(PriviledgedDesignerTask.java:328)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Error writing to server
at java.base/sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.base/java.net.HttpURLConnection.getResponseCode(Unknown Source)
at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:418)
... 4 common frames omitted
14:38:51.502 [PDT-Task-runner] INFO tags.subscriptions - Changing connected quality to 'Bad_Stale'
14:38:51.502 [PDT-Task-runner] INFO Scripting.ScriptManager.WebLLC - Pausing scripts...
14:38:51.502 [PDT-Task-runner] INFO com.inductiveautomation.ignition.client.gateway_interface.GatewayConnectionManager - Starting reconnect thread.
14:38:51.516 [GatewayConnection-1] INFO tags.subscriptions - Changing connected quality to 'Good'
14:38:51.516 [GatewayConnection-1] INFO Scripting.ScriptManager.WebLLC - Resuming scripts...
14:38:51.521 [GatewayConnection-1] INFO com.inductiveautomation.ignition.client.gateway_interface.GatewayConnectionManager - Stopping reconnect thread.

Thank you for your support.

Hi Kevin, have you some idea to solve this issue? As you can see, the problem occurs also in localhost.

1 Like

By any chance are you running the Designer on a Windows system? If so, when you started the Designer for the first time (and if the Windows firewall was enabled) you would have seen a dialog like the following:

If you happened to see this, do you remember the settings you defined? It is something that in theory should cause problems well before saving things, but at this point I am looking for anything that could possibly cause a disruption like this.

Also, would it be possible to share the script you are attempting to upload? I want to see if there is anything in the script that might stand out.

Thanks,
Garth

1 Like

Hi Garth,
I found that the issue might be related to the size/number of the shared scripts. Is there some limit on Ignition 8?
I made a lot of tests: after having imported a number of libraries the error “Writing to server” came up; I guess the error does not depend on the code inside the libraries but on the size of the shared scripts.
The libraries are taken from a 7.9.x release and there the problem does not exist.

Thanks a lot.

1 Like

Andrea,

We have a few open issues around similar issues with the Designer disconnecting from the Gateway with large amounts of data. There looks to be a limit of about 5MB in changes allowed when attempting to import or write changes to the Gateway. The ticket is currently being worked on and hopefully will be in a build within the next couple of days.

Garth

1 Like

Hi Andrea,

We’ve made some changes that should help with the issue you are seeing. Please let us know if you continue to see this behavior after upgrading to the latest build.

Thank you!

1 Like

Thank you, now it works fine!

1 Like