# Gateway restarting is failed, and starting script is not working too, after changing HTTP/HTTPS port from 8080/8043 to 80/443

**URL:** <https://forum.inductiveautomation.com/t/gateway-restarting-is-failed-and-starting-script-is-not-working-too-after-changing-http-https-port-from-8080-8043-to-80-443/79060>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [September 13, 2023, 7:52am UTC](https://forum.inductiveautomation.com/t/gateway-restarting-is-failed-and-starting-script-is-not-working-too-after-changing-http-https-port-from-8080-8043-to-80-443/79060 "2023-09-13T07:52:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![UnSuk\_Song](https://avatars.discourse-cdn.com/v4/letter/u/3ab097/32.png) [@UnSuk\_Song](https://forum.inductiveautomation.com/u/UnSuk_Song)\
**Post date:** [September 13, 2023, 7:52am UTC](https://forum.inductiveautomation.com/t/gateway-restarting-is-failed-and-starting-script-is-not-working-too-after-changing-http-https-port-from-8080-8043-to-80-443/79060/1 "2023-09-13T07:52:22Z")

</div>

I changed web server setting HTTP/HTTPS port from 8080/8043 to 80/443.  
After changing the config, I restarted gateway with `gwcmd --restart`.  
It took too much time(restart starts from 15:34:40, and took 10min) and ended up not restarting.

I just want to know why Gateway startup is failed,  
and How to reconfigure HTTP/HTTPS port back to 8080/8043 when whole thing was running well.

```auto
me@myserver:~$ gwcmd -i
No response from Gateway

me@myserver:~$ /usr/local/bin/ignition/ignition.sh start
Starting Ignition-Gateway with systemd...
Job for Ignition-Gateway.service failed because the control process exited with error code.
See "systemctl status Ignition-Gateway.service" and "journalctl -xe" for details.
Failed to start service Ignition-Gateway

```

Add more information and current status

```auto
me@myserver:~$ sudo systemctl status Ignition-Gateway.service
● Ignition-Gateway.service - Ignition-Gateway
     Loaded: loaded (/etc/systemd/system/Ignition-Gateway.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2023-09-13 16:28:00 KST; 6min ago
    Process: 9567 ExecStart=/usr/local/bin/ignition/ignition.sh start sysd (code=exited, status=1/FAILURE)

 9월 13 16:27:55 myserver systemd[1]: Starting Ignition-Gateway...
 9월 13 16:27:56 myserver ignition.sh[9567]: Starting Ignition-Gateway...
 9월 13 16:28:00 myserver ignition.sh[9567]: Waiting for Ignition-Gateway.......
 9월 13 16:28:00 myserver ignition.sh[9567]: WARNING: Ignition-Gateway may have failed to start.
 9월 13 16:28:00 myserver systemd[1]: Ignition-Gateway.service: Control process exited, code=exited, status=1/FAILURE
 9월 13 16:28:00 myserver systemd[1]: Ignition-Gateway.service: Failed with result 'exit-code'.
 9월 13 16:28:00 myserver systemd[1]: Failed to start Ignition-Gateway.

```

On syslog:

```auto
Sep 13 16:27:55 myserver systemd[1]: Starting Ignition-Gateway...
Sep 13 16:27:56 myserver ignition.sh[9567]: Starting Ignition-Gateway...
Sep 13 16:27:58 myserver org.gnome.Nautilus[4416]: Traceback (most recent call last):
Sep 13 16:27:58 myserver org.gnome.Nautilus[4416]: File "/usr/share/nautilus-python/extensions/clamtk-gnome.py", line 64, in get_file_items
Sep 13 16:27:58 myserver org.gnome.Nautilus[4416]: tip=_('Scan %s for threats...') % file.get_name(),
Sep 13 16:27:58 myserver org.gnome.Nautilus[4416]: TypeError: %b requires a bytes-like object, or an object that implements __bytes__ , not 'str'
Sep 13 16:28:00 myserver ignition.sh[9567]: Waiting for Ignition-Gateway.......
Sep 13 16:28:00 myserver ignition.sh[9567]: WARNING: Ignition-Gateway may have failed to start.
Sep 13 16:28:00 myserver systemd[1]: Ignition-Gateway.service: Control process exited, code=exited, status=1/FAILURE
Sep 13 16:28:00 myserver systemd[1]: Ignition-Gateway.service: Failed with result 'exit-code'.
Sep 13 16:28:00 myserver systemd[1]: Failed to start Ignition-Gateway.

```

Lastly, this is the part of the `wrapper.log` file.  
I think this represents the situation immediately after the restart was made.

```auto
STATUS | wrapper | 2023/09/13 15:34:59 | on_exit trigger matched. Restarting the JVM. (Exit code: 2)
STATUS | wrapper | 2023/09/13 15:35:04 | Reloading Wrapper configuration...
STATUS | wrapper | 2023/09/13 15:35:04 | JVM process is gone.
STATUS | wrapper | 2023/09/13 15:35:04 | Launching a JVM...
INFO | jvm 2 | 2023/09/13 15:35:05 | WrapperManager: Initializing...
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,530 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [data//logback.xml] at [file:/usr/local/bin/ignition/data/logback.xml]
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,598 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,601 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [SysoutAppender]
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,605 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,621 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [com.inductiveautomation.logging.SQLiteAppender]
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,627 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [DB]
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,714 |-INFO in ch.qos.logback.core.db.DataSourceConnectionSource@7a29f573 - Driver name=SQLite JDBC
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,714 |-INFO in ch.qos.logback.core.db.DataSourceConnectionSource@7a29f573 - Driver version=3.39.2.0
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,714 |-INFO in ch.qos.logback.core.db.DataSourceConnectionSource@7a29f573 - supportsGetGeneratedKeys=true
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,720 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.AsyncAppender]
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,722 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [SysoutAsync]
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,722 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [SysoutAppender] to ch.qos.logback.classic.AsyncAppender[SysoutAsync]
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,722 |-INFO in ch.qos.logback.classic.AsyncAppender[SysoutAsync] - Attaching appender named [SysoutAppender] to AsyncAppender.
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,722 |-INFO in ch.qos.logback.classic.AsyncAppender[SysoutAsync] - Setting discardingThreshold to 51
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,722 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.AsyncAppender]
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,723 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [DBAsync]
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,723 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [DB] to ch.qos.logback.classic.AsyncAppender[DBAsync]
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,723 |-INFO in ch.qos.logback.classic.AsyncAppender[DBAsync] - Attaching appender named [DB] to AsyncAppender.
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,723 |-INFO in ch.qos.logback.classic.AsyncAppender[DBAsync] - Setting discardingThreshold to 51
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,723 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,723 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [SysoutAsync] to Logger[ROOT]
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,723 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [DBAsync] to Logger[ROOT]
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,723 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,724 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@66b5361b - Registering current configuration as safe fallback point
INFO | jvm 2 | 2023/09/13 15:35:05 | Scheduling logfile maintenance. Last maintenance: Thu Jan 01 09:00:00 KST 1970, events since then: 0
INFO | jvm 2 | 2023/09/13 15:35:05 | Starting logfile maintenance. Max entries: 50000, Max filesize: 104857600
INFO | jvm 2 | 2023/09/13 15:35:05 | 15:35:05,766 |-INFO in ch.qos.logback.classic.jul.LevelChangePropagator@61f2b067 - Propagating INFO level on Logger[ROOT] onto the JUL framework
INFO | jvm 2 | 2023/09/13 15:35:05 | W [WebResourceManagerImpl] [06:35:05]: Unable to read "gateway.metroKeystoreAlias" gateway.xml property. Assuming metro keystore alias is: metro-key 
INFO | jvm 2 | 2023/09/13 15:35:05 | Cleaned up 2496 rows in 60 ms. Vacuum performed: false
INFO | jvm 2 | 2023/09/13 15:35:06 | I [g.WebServerManager] [06:35:05]: Starting setup 
INFO | jvm 2 | 2023/09/13 15:35:06 | I [g.WebServerManager] [06:35:05]: Setup complete 
INFO | jvm 2 | 2023/09/13 15:35:06 | I [g.WebServerManager] [06:35:06]: Starting up 
INFO | jvm 2 | 2023/09/13 15:35:06 | I [g.SslManager] [06:35:06]: State refreshed state=SELF_SIGNED_CERTIFICATE
INFO | jvm 2 | 2023/09/13 15:35:06 | I [C.SecureRandomProvider] [06:35:06]: Secure random seed generated in 1ms 
INFO | jvm 2 | 2023/09/13 15:35:06 | I [o.e.j.s.Server] [06:35:06]: jetty-10.0.13; built: 2022-12-07T20:13:20.134Z; git: 1c2636ea05c0ca8de1ffd6ca7f3a98ac084c766d; jvm 11.0.18+10-LTS 
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp: 
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: Encountered an error running main:
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: MultiException[java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:80, java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:443]
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at org.eclipse.jetty.util.MultiException.ifExceptionThrow(MultiException.java:117)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at org.eclipse.jetty.server.Server.doStart(Server.java:410)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at com.inductiveautomation.catapult.IgnitionServer.start(IgnitionServer.java:1158)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at com.inductiveautomation.ignition.gateway.web.WebResourceManagerImpl.start(WebResourceManagerImpl.java:351)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at com.inductiveautomation.ignition.gateway.IgnitionGateway.start(IgnitionGateway.java:578)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at com.inductiveautomation.ignition.gateway.IgnitionGateway.main(IgnitionGateway.java:300)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at com.inductiveautomation.catapult.Catapult.main(Catapult.java:8)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.lang.reflect.Method.invoke(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:349)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.lang.Thread.run(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: Suppressed: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:443
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at org.eclipse.jetty.server.Server.lambda$doStart$0(Server.java:402)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at org.eclipse.jetty.server.Server.doStart(Server.java:398)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: ... 12 more
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: Caused by: java.net.SocketException: 허가 거부
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/sun.nio.ch.Net.bind0(Native Method)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/sun.nio.ch.Net.bind(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/sun.nio.ch.Net.bind(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: ... 25 more
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: Caused by: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:80
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at org.eclipse.jetty.server.Server.lambda$doStart$0(Server.java:402)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at org.eclipse.jetty.server.Server.doStart(Server.java:398)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: ... 12 more
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: Caused by: java.net.SocketException: 허가 거부
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/sun.nio.ch.Net.bind0(Native Method)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/sun.nio.ch.Net.bind(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/sun.nio.ch.Net.bind(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:339)
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: ... 25 more
STATUS | wrapper | 2023/09/13 15:35:08 | <-- Wrapper Stopped
STATUS | wrapper | 2023/09/13 15:56:24 | --> Wrapper Started as Daemon

```

---

<div class="post-metadata">

**Author:** ![UnSuk\_Song](https://avatars.discourse-cdn.com/v4/letter/u/3ab097/32.png) [@UnSuk\_Song](https://forum.inductiveautomation.com/u/UnSuk_Song)\
**Post date:** [September 13, 2023, 8:35am UTC](https://forum.inductiveautomation.com/t/gateway-restarting-is-failed-and-starting-script-is-not-working-too-after-changing-http-https-port-from-8080-8043-to-80-443/79060/2 "2023-09-13T08:35:48Z")

</div>

Solved it myself by referencing other posts.  
Thanks to those posts and others.

> [@Unable to set port 80 on Ubuntu 20.04](https://forum.inductiveautomation.com/t/unable-to-set-port-80-on-ubuntu-20-04/53307):
>
> Trying to set the default port to 80 on a gateway but getting the following error message: The Entered http port 1-1023 is not allowed by the system. Please enter a different one I am fairly certain its just a linux issue, but I cannot seem to find the command to fix it! I found the following command referenced, but I can’t figure out what the path to ignitions executable is, I tried /usr/local/bin/ignition/ignition-gateway but no luck setcap cap\_net\_bind\_service=ep /path/to/server/executabl…

> [@\[BUG-5735\] Upgrade Bug with AmbientCapabilities](https://forum.inductiveautomation.com/t/bug-5735-upgrade-bug-with-ambientcapabilities/57368):
>
> I upgraded a system from v7.9 to v8.1.15 this morning and ran into an annoyance. The system runs on the default HTTP and HTTPS ports but with the standard “ignition” service user name. This is possible by adding AmbientCapabilities=CAP\_NET\_BIND\_SERVICE to the [Service] section of the SystemD unit file. After upgrade, instead of just running as expected, I was diverted to the ports page of Commissioning. That page was served up from the standard ports, pre-filled with the running values (stan…

**[Causes]**  
Ports 80 and 443 are 'privileged' or 'well-known' ports commonly used at the system level.  
End-user or end-of-life applications cannot bind directly to these ports, **usually requiring administrator privileges(`sudo`)**.  
When Ignition Gateway attempted to bind to these ports, an error such as `Failed to bind to 0.0.0.0/0.0.0.0:80` occurred because it did not have the required privileges.

**[Trouble shooting]**  
On wrapper.log, there are noticeable log in it.

```auto
INFO | jvm 2 | 2023/09/13 15:35:06 | I [g.WebServerManager] [06:35:05]: Starting setup 
INFO | jvm 2 | 2023/09/13 15:35:06 | I [g.WebServerManager] [06:35:05]: Setup complete 
INFO | jvm 2 | 2023/09/13 15:35:06 | I [g.WebServerManager] [06:35:06]: Starting up 
INFO | jvm 2 | 2023/09/13 15:35:06 | I [g.SslManager] [06:35:06]: State refreshed state=SELF_SIGNED_CERTIFICATE
INFO | jvm 2 | 2023/09/13 15:35:06 | I [C.SecureRandomProvider] [06:35:06]: Secure random seed generated in 1ms 
INFO | jvm 2 | 2023/09/13 15:35:06 | I [o.e.j.s.Server] [06:35:06]: jetty-10.0.13; built: 2022-12-07T20:13:20.134Z; git: 1c2636ea05c0ca8de1ffd6ca7f3a98ac084c766d; jvm 11.0.18+10-LTS 
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp: 
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: Encountered an error running main:
INFO | jvm 2 | 2023/09/13 15:35:06 | WrapperSimpleApp Error: MultiException[java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:80, java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:443]

```

Judging from these logs, it is clear that I changed the HTTP/HTTPS port caused the error.

Search for forums with these phrase:  
`java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:80`  
`java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:443`.

I found posts above and edited service file on `/etc/systemd/system/Ignition-Gateway.service`.

Add following string: `AmbientCapabilities=CAP_NET_BIND_SERVICE`

```auto
[Unit]
Description=Ignition-Gateway
After=syslog.target

[Service]
Type=forking
ExecStart=/usr/local/bin/ignition/ignition.sh start sysd
ExecStop=/usr/local/bin/ignition/ignition.sh stop sysd
User=fci
KillMode=process
AmbientCapabilities=CAP_NET_BIND_SERVICE

[Install]
WantedBy=multi-user.target

```

As this service file is updated, following command is required:  
`sudo systemctl daemon-reload`

Restart the Ignition Gateway again:

```auto
me@myserver:~$ /usr/local/bin/ignition/ignition.sh start
Starting Ignition-Gateway with systemd...
Waiting for Ignition-Gateway...
running: PID:11935

```

Now I can see the process listening on 80/443

```auto
me@myserver:~$ sudo lsof -i :80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 11956 me xxxx IPv6 72669 0t0 TCP *:http (LISTEN)

me@myserver:~$ sudo lsof -i :443
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 11956 me xxxx IPv6 72670 0t0 TCP *:https (LISTEN)

```

---

<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 22, 2023, 3:46pm UTC](https://forum.inductiveautomation.com/t/gateway-restarting-is-failed-and-starting-script-is-not-working-too-after-changing-http-https-port-from-8080-8043-to-80-443/79060/3 "2023-10-22T15:46:20Z")

</div>

Split this topic on October 22, 2023, 3:46pm UTC

2 posts were split to a new topic: [Matplotlib failure](https://forum.inductiveautomation.com/t/matplotlib-failure/80822)
