# Problem with environment variables

**URL:** <https://forum.genieacs.com/t/problem-with-environment-variables/2524>\
**Category:** Uncategorized\
**Created:** [March 28, 2022, 6:21am UTC](https://forum.genieacs.com/t/problem-with-environment-variables/2524 "2022-03-28T06:21:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jfdumont](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/jfdumont/32/815_2.png) [@jfdumont](https://forum.genieacs.com/u/jfdumont)\
**Post date:** [March 28, 2022, 6:21am UTC](https://forum.genieacs.com/t/problem-with-environment-variables/2524/1 "2022-03-28T06:21:47Z")

</div>

Hello,

I have a problem with environment variables.  
All are not taken into account

I am working on a deployment of GenieACS in a Kubernetes cluster. And Kubernetes doesn’t have IPv6 support.

And since version 1.2.6 commit “Default to dual stack interface binding” IPv6 is enabled by default and is mandatory.  
If there is no IPv6 the application crashes with the message  
exceptionName=“Error” exceptionMessage=“bind EAFNOSUPPORT:::3000”

So I tested by adding in genieacs.env UI\_INTERFACE=“0.0.0.0”  
to force IPv4 only. But it does not change anything.

For double check, I did another installation of GenieACS on an Ubuntu 20 VM without ipv4, following the documentation

As expected by default the application does not launch because of non IPv6.

I add UI\_INTERFACE=“0.0.0.0” in genieacs.env  
and ditto it crashes.

For test, I made a build by modifying lib/config.ts  
UI\_INTERFACE: { type: “string”, default: “0.0.0.0” },

The UI launches fine

I think this problem is not for all variables. for example GENIEACS\_MONGODB\_CONNECTION\_URL seems to be taken into account.

## Here is my configuration and logs

```auto
root@ubunutu-vm:~# cat /opt/genieacs/genieacs.env 
GENIEACS_CWMP_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-cwmp-access.log
GENIEACS_NBI_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-nbi-access.log
GENIEACS_FS_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-fs-access.log
GENIEACS_UI_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-ui-access.log
GENIEACS_DEBUG_FILE=/var/log/genieacs/genieacs-debug.yaml
NODE_OPTIONS=--enable-source-maps
GENIEACS_EXT_DIR=/opt/genieacs/ext
GENIEACS_UI_JWT_SECRET=secret
UI_INTERFACE="0.0.0.0"

```

* * *

```auto
root@ubunutu-vm:~# ls -alh /opt/genieacs/
total 16K
drwxr-xr-x 3 genieacs genieacs 4.0K Mar 26 19:14 .
drwxr-xr-x 4 root root 4.0K Mar 26 17:21 ..
drwxr-xr-x 2 genieacs genieacs 4.0K Mar 26 17:21 ext
-rw------- 1 genieacs genieacs 462 Mar 26 17:31 genieacs.env

```

* * *

```auto
/etc/systemd/system/.#genieacs-ui.servicea4ab2afb45c1caec                                                         
[Unit]
Description=GenieACS UI
After=network.target

[Service]
User=genieacs
EnvironmentFile=/opt/genieacs/genieacs.env
ExecStart=/usr/bin/genieacs-ui

[Install]
WantedBy=default.target

```

* * *

```auto
root@ubunutu-vm:~# systemctl status genieacs-ui
● genieacs-ui.service - GenieACS UI
     Loaded: loaded (/etc/systemd/system/genieacs-ui.service; disabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sat 2022-03-26 17:34:46 UTC; 1h 40min ago
    Process: 9616 ExecStart=/usr/bin/genieacs-ui (code=exited, status=1/FAILURE)
   Main PID: 9616 (code=exited, status=1/FAILURE)

Mar 26 17:34:27 ubunutu-vm genieacs-ui[9616]: 2022-03-26T17:34:27.823Z [ERROR] Worker died; pid=10615 exitCode=0
Mar 26 17:34:29 ubunutu-vm genieacs-ui[10630]: 2022-03-26T17:34:29.774Z [ERROR] Uncaught exception; pid=10630 exceptionName="Error" exceptionMessage="bind EAFNOSUPPORT :::3000" exceptionStack="Error: bind EAFNOSUPPORT :::3000\n at __nod>
Mar 26 17:34:29 ubunutu-vm genieacs-ui[9616]: 2022-03-26T17:34:29.845Z [ERROR] Worker died; pid=10630 exitCode=0
Mar 26 17:34:31 ubunutu-vm genieacs-ui[10645]: 2022-03-26T17:34:31.754Z [ERROR] Uncaught exception; pid=10645 exceptionName="Error" exceptionMessage="bind EAFNOSUPPORT :::3000" exceptionStack="Error: bind EAFNOSUPPORT :::3000\n at __nod>
Mar 26 17:34:31 ubunutu-vm genieacs-ui[9616]: 2022-03-26T17:34:31.839Z [ERROR] Worker died; pid=10645 exitCode=0
Mar 26 17:34:33 ubunutu-vm genieacs-ui[10660]: 2022-03-26T17:34:33.769Z [ERROR] Uncaught exception; pid=10660 exceptionName="Error" exceptionMessage="bind EAFNOSUPPORT :::3000" exceptionStack="Error: bind EAFNOSUPPORT :::3000\n at __nod>
Mar 26 17:34:33 ubunutu-vm genieacs-ui[9616]: 2022-03-26T17:34:33.840Z [ERROR] Worker died; pid=10660 exitCode=0
Mar 26 17:34:33 ubunutu-vm genieacs-ui[9616]: 2022-03-26T17:34:33.840Z [ERROR] Too many crashes, exiting; pid=9616
Mar 26 17:34:46 ubunutu-vm systemd[1]: genieacs-ui.service: Main process exited, code=exited, status=1/FAILURE
Mar 26 17:34:46 ubunutu-vm systemd[1]: genieacs-ui.service: Failed with result 'exit-code'.

```

---

<div class="post-metadata">

**Author:** ![JonasGhost](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/jonasghost/32/286_2.png) [@JonasGhost](https://forum.genieacs.com/u/JonasGhost)\
**Post date:** [March 28, 2022, 2:41pm UTC](https://forum.genieacs.com/t/problem-with-environment-variables/2524/2 "2022-03-28T14:41:24Z")

</div>

You have to use the prefix GENIEACS\_ otherwise it will not work.  
So it would be GENIEACS\_UI\_INTERFACE

---

<div class="post-metadata">

**Author:** ![jfdumont](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/jfdumont/32/815_2.png) [@jfdumont](https://forum.genieacs.com/u/jfdumont)\
**Post date:** [March 28, 2022, 3:59pm UTC](https://forum.genieacs.com/t/problem-with-environment-variables/2524/3 "2022-03-28T15:59:37Z")

</div>

> [@JonasGhost](#):
>
> GENIEACS

Ha damn now that you say it, actually, I read it and it must have slipped out of my head.

Thank you
