# Sensu web error on launch/setup

**URL:** <https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016>\
**Category:** Sensu Go\
**Tags:** sensu-go, web\
**Created:** [August 20, 2020, 7:17pm UTC](https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016 "2020-08-20T19:17:31Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![swapzero](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/swapzero/32/529_2.png) [@swapzero](https://discourse.sensu.io/u/swapzero)\
**Post date:** [August 20, 2020, 7:17pm UTC](https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016/1 "2020-08-20T19:17:32Z")

</div>

Hi,

I just upgraded from Sensu Go 5.21 to 6.0 and one of the changes is the need for setting up Sensu Web separately. Here are the steps i took to launch the web module on my AWS EC2 medium instance running Centos 7.6

```auto
cd /tmp

curl -s --location https://rpm.nodesource.com/setup_10.x | bash -
yum install -y nodejs
curl -s --location https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo
yum install -y yarn

wget https://github.com/sensu/web/archive/v1.0.1.tar.gz
tar -xvf v1.0.1.tar.gz
cd web-1.0.1
yarn install
NODE_ENV=production PORT=80 API_URL=https://<MY BACKEND URL>:8080 yarn node scripts serve

```

When i try to access the UI on the browser, i get timed out and looking at the logs i see the following

```auto
yarn node v1.22.4[HPM] Proxy created: ['/auth', '/graphql', '/api'] -> https://<MY BACKEND URL>:8080
clean-webpack-plugin: /tmp/web-1.0.1/build/app has been removed.listening on 80
(node:12179) DeprecationWarning: Tapable.apply is deprecated. Call apply on the plugin directly instead(node:12179) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
<e> [webpack-dev-middleware] Child "app":<e> ERROR in ./src/lib/buildInfo.macro.js
<e> Module build failed (from ./config/macroLoader.js):<e> Error: [git-rev-sync] no git repository found
<e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:47:11)<e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:75:10)
<e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:75:10)<e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:75:10)
<e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:75:10)<e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:75:10)
<e> at branch (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:79:16)<e> at long (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:92:11)
<e> at Object.short (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:118:10)<e> at Module.module.exports.1Icq. __webpack_exports__.default (/tmp/web-1.0.1/src/lib/buildInfo.macro.js:98:34)
<e> at Object.default (/tmp/web-1.0.1/config/macroLoader.js:9:27)<e> @ ./src/lib/buildInfo.tsx 6:0-37 8:30-34
<e> @ ./src/lib/component/util/useBuildInfo.js<e> @ ./src/lib/component/util/index.tsx
<e> @ ./src/app/index.js<e> @ multi ./src/app
<i> [webpack-dev-middleware] Child "app": Failed to compile.Error from chokidar (/tmp/web-1.0.1/node_modules/intl/locale-data/jsonp): Error: ENOSPC: System limit for number of file watchers reached, watch '/tmp/web-1.0.1/node_modules/intl/locale
-data/jsonp/smn-FI.js'Error from chokidar (/tmp/web-1.0.1/node_modules/intl/locale-data/jsonp): Error: ENOSPC: System limit for number of file watchers reached, watch '/tmp/web-1.0.1/node_modules/intl/locale
-data/jsonp/smn.js'

```

From the logs it seems like the module needs more space and possibly a minimum spec for the machine which i do not see in the repository or docs. Any help on this is appreciated since i would really want to use the Sensu Go 6.0 version but without the UI setup it becomes difficult. Is there any steps that i am missing or are there docs that i can be pointed to?

---

<div class="post-metadata">

**Author:** ![todd](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/todd/32/936_2.png) [@todd](https://discourse.sensu.io/u/todd)\
**Post date:** [August 20, 2020, 7:20pm UTC](https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016/2 "2020-08-20T19:20:47Z")

</div>

> [@swapzero](#):
>
> `ENOSPC: System limit for number of file watchers reached`

> **[NPM — npm start Error: ENOSPC: System limit for number of file watchers reached](https://bestafiko.medium.com/npm-npm-start-error-enospc-system-limit-for-number-of-file-watchers-reached-bdc0eab0a159)**
>
> If you are facing this error, it’s because of your max\_user\_watches was reached the maximum number. Simply you can increase the…

---

<div class="post-metadata">

**Author:** ![swapzero](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/swapzero/32/529_2.png) [@swapzero](https://discourse.sensu.io/u/swapzero)\
**Post date:** [August 20, 2020, 7:36pm UTC](https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016/3 "2020-08-20T19:36:17Z")

</div>

Even with increasing the limit to 2048+, the error persists.

```auto
yarn node v1.22.4
[HPM] Proxy created: ['/auth', '/graphql', '/api'] -> https://10.153.1.228:8080
clean-webpack-plugin: /tmp/web-1.0.1/build/app has been removed.
listening on 80
(node:17629) DeprecationWarning: Tapable.apply is deprecated. Call apply on the plugin directly instead
(node:17629) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
<i> [webpack-dev-middleware] wait until bundle finished: /index.html
<e> [webpack-dev-middleware] Child "app":
<e> ERROR in ./src/lib/buildInfo.macro.js
<e> Module build failed (from ./config/macroLoader.js):
<e> Error: [git-rev-sync] no git repository found
<e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:47:11)
<e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:75:10)
<e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:75:10)
<e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:75:10)
<e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:75:10)
<e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:75:10)
<e> at branch (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:79:16)
<e> at long (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:92:11)
<e> at Object.short (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:118:10)
<e> at Module.module.exports.1Icq. __webpack_exports__.default (/tmp/web-1.0.1/src/lib/buildInfo.macro.js:98:34)
<e> at Object.default (/tmp/web-1.0.1/config/macroLoader.js:9:27)
<e> @ ./src/lib/buildInfo.tsx 6:0-37 8:30-34
<e> @ ./src/lib/component/util/useBuildInfo.js
<e> @ ./src/lib/component/util/index.tsx
<e> @ ./src/app/index.js
<e> @ multi ./src/app
<i> [webpack-dev-middleware] Child "app": Failed to compile.
Error from chokidar (/tmp/web-1.0.1/node_modules/@material-ui/icons): Error: ENOSPC: System limit for number of file watchers reached, watch '/tmp/web-1.0.1/node_modules/@material-ui/icons/Battery90Outlined.js'
........

```

Is there a specific number that is needed?

---

<div class="post-metadata">

**Author:** ![todd](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/todd/32/936_2.png) [@todd](https://discourse.sensu.io/u/todd)\
**Post date:** [August 20, 2020, 7:46pm UTC](https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016/4 "2020-08-20T19:46:24Z")

</div>

> [@swapzero](#):
>
> Is there a specific number that is needed?

I’m not sure of that. However, I was able to run it on a CentOS 7 server with it set to 8192.

---

<div class="post-metadata">

**Author:** ![swapzero](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/swapzero/32/529_2.png) [@swapzero](https://discourse.sensu.io/u/swapzero)\
**Post date:** [August 20, 2020, 7:52pm UTC](https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016/5 "2020-08-20T19:52:52Z")

</div>

Unfortunately it is the same error.

---

<div class="post-metadata">

**Author:** ![todd](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/todd/32/936_2.png) [@todd](https://discourse.sensu.io/u/todd)\
**Post date:** [August 20, 2020, 8:17pm UTC](https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016/6 "2020-08-20T20:17:57Z")

</div>

Yes, I thought it was working but it took quite a while for mine to error out with that same message.

I was, after some more tuning, able to get rid of that error message with the value set to 160000.

---

<div class="post-metadata">

**Author:** ![swapzero](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/swapzero/32/529_2.png) [@swapzero](https://discourse.sensu.io/u/swapzero)\
**Post date:** [August 20, 2020, 8:33pm UTC](https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016/7 "2020-08-20T20:33:28Z")

</div>

> [@todd](#):
>
> 160000

I got it running with 524288 which is the max possible number allowed. Thank you for your help

---

<div class="post-metadata">

**Author:** ![todd](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/todd/32/936_2.png) [@todd](https://discourse.sensu.io/u/todd)\
**Post date:** [August 20, 2020, 8:33pm UTC](https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016/8 "2020-08-20T20:33:59Z")

</div>

> [@swapzero](#):
>
> ```auto
> <e> [webpack-dev-middleware] Child "app":
> <e> ERROR in ./src/lib/buildInfo.macro.js
> <e> Module build failed (from ./config/macroLoader.js):
> <e> Error: [git-rev-sync] no git repository found
> <e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:47:11)
> <e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:75:10)
> <e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:75:10)
> <e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:75:10)
> <e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:75:10)
> <e> at _getGitDirectory (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:75:10)
> <e> at branch (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:79:16)
> <e> at long (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:92:11)
> <e> at Object.short (/tmp/web-1.0.1/node_modules/git-rev-sync/index.js:118:10)
> <e> at Module.module.exports.1Icq. __webpack_exports__.default (/tmp/web-1.0.1/src/lib/buildInfo.macro.js:98:34)
> <e> at Object.default (/tmp/web-1.0.1/config/macroLoader.js:9:27)
> 
> ```

Also, to get rid of this error, you need to be working from a clone of the git repo, not an un-tar’ed version of the release.

---

<div class="post-metadata">

**Author:** ![swapzero](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/swapzero/32/529_2.png) [@swapzero](https://discourse.sensu.io/u/swapzero)\
**Post date:** [August 20, 2020, 8:48pm UTC](https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016/9 "2020-08-20T20:48:39Z")

</div>

That is correct. I did have to make that change to get it working. Is that always going to be the case? Seems odd that i would need to git clone the repo over a untar version of the release. For my backend i use a compiled version of the application without any issues. Any chance that will be the case in the future for Sensu Web?

---

<div class="post-metadata">

**Author:** ![jspaleta](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/jspaleta/32/141_2.png) [@jspaleta](https://discourse.sensu.io/u/jspaleta)\
**Post date:** [August 20, 2020, 8:48pm UTC](https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016/10 "2020-08-20T20:48:49Z")

</div>

> [@swapzero](#):
>
> `System limit for number of file watchers reached`

This is a pretty common problem with React framework as it seems that rely on chokidar through watchpack.  
Ref: [https://developer.aliyun.com/mirror/npm/package/chokidar/](https://developer.aliyun.com/mirror/npm/package/chokidar/)

But i don’t think these are fatal errors. Im able to use the 1.0.1 release on a centos 7.6 small EC2 instance with 2000 user watch inode limit and login to the web-ui without issue.

I generate the file watch errors at web-ui service start up, but I don’t think these errors are operational impact, i think it just has to do with some of the node package management yarn is doing behind the scenes to make sure all the node modules are in place. Yarn does a lot of package management actions on top of running the requested nodejs application service.

If you want to prevent the errors, its common practice is to increase the limit to a large number. The chokidar troubleshooting section in the link above suggests a very large number… as per common practice.

Because the watchers appear to be associated with the node module dependencies and not in the application code as housed in the repo… I’m not really sure what the sufficient number is… I don’t think anyone does…because the node dep tree can be well… large. That being said, setting the limit to 20000 appears to have prevented the errors for me for this node application.

---

<div class="post-metadata">

**Author:** ![jspaleta](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/jspaleta/32/141_2.png) [@jspaleta](https://discourse.sensu.io/u/jspaleta)\
**Post date:** [August 20, 2020, 8:51pm UTC](https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016/11 "2020-08-20T20:51:25Z")

</div>

To be clear I was able to get inode watch errors from the git clone.  
So there’s nothing special about the git versus tarball, except maybe the number of files that chokidar is trying to set watches on.

---

<div class="post-metadata">

**Author:** ![todd](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/todd/32/936_2.png) [@todd](https://discourse.sensu.io/u/todd)\
**Post date:** [August 20, 2020, 11:23pm UTC](https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016/12 "2020-08-20T23:23:09Z")

</div>

I didn’t mean to correlate the git errors with the inode errors.

---

<div class="post-metadata">

**Author:** ![swapzero](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/swapzero/32/529_2.png) [@swapzero](https://discourse.sensu.io/u/swapzero)\
**Post date:** [August 21, 2020, 12:49am UTC](https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016/13 "2020-08-21T00:49:57Z")

</div>

Without the git clone route, i was not able to get it working. Now that i do have the UI up and running, it seems to disregard the users created via sensuctl.

```auto
[root@ip-10-153-1-201 bin]# sensuctl version
sensuctl version 6.0.0+ee, enterprise edition, build 98694fcc4ee5552bcdd4f394aa39e4f0466cbaf2, built 2020-08-07T19:07:20Z, built with go1.13.15
[root@ip-10-153-1-201 bin]# sensu-agent version
sensu-agent version 6.0.0+ee, enterprise edition, build 98694fcc4ee5552bcdd4f394aa39e4f0466cbaf2, built 2020-08-07T19:07:18Z, built with go1.13.15
[root@ip-10-153-1-201 bin]# sensu-backend version
sensu-backend version (devel)+ce, community edition, built with go1.13

```

These are my app versions. These are the ports open on my instances (including port 80 of the web UI which is hosted on backend server instance)

```auto
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1176/master
tcp 0 0 127.0.0.1:2379 0.0.0.0:* LISTEN 9878/sensu-backend
tcp 0 0 127.0.0.1:2380 0.0.0.0:* LISTEN 9878/sensu-backend
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1256/sshd
tcp6 0 0 ::1:25 :::* LISTEN 1176/master
tcp6 0 0 :::111 :::* LISTEN 1/systemd
tcp6 0 0 :::80 :::* LISTEN 11861/node
tcp6 0 0 :::8080 :::* LISTEN 9878/sensu-backend
tcp6 0 0 :::8081 :::* LISTEN 9878/sensu-backend
tcp6 0 0 :::22 :::* LISTEN 1256/sshd

```

The web UI is extremely slow (as previously noted by Todd) and trying to login with credentials which work for sensuctl seems not work with the UI

```auto
t: 500
    at http://<MY BACKEND URL>/static/js/app_0f63.js:2:773725
    at f (http://<MY BACKEND URL>/static/js/vendors~app_999e.js:2:566485)
    at T._settlePromiseFromHandler (http://<MY BACKEND URL>/static/js/vendors~app_999e.js:2:555000)
    at T._settlePromise (http://<MY BACKEND URL>/static/js/vendors~app_999e.js:2:555800)
    at T._settlePromise0 (http://<MY BACKEND URL>/static/js/vendors~app_999e.js:2:556499)
    at T._settlePromises (http://<MY BACKEND URL>/static/js/vendors~app_999e.js:2:557826)
    at u._drainQueue (http://<MY BACKEND URL>/static/js/vendors~app_999e.js:2:520188)
    at u._drainQueues (http://<MY BACKEND URL>/static/js/vendors~app_999e.js:2:520249)
    at drainQueues (http://<MY BACKEND URL>/static/js/vendors~app_999e.js:2:518460)
    at MutationObserver.<anonymous> (http://<MY BACKEND URL>/static/js/vendors~app_999e.js:2:563422)

```

Can i know either of your setup which has the Sensu Web working?

---

<div class="post-metadata">

**Author:** ![jspaleta](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/jspaleta/32/141_2.png) [@jspaleta](https://discourse.sensu.io/u/jspaleta)\
**Post date:** [August 21, 2020, 1:29am UTC](https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016/14 "2020-08-21T01:29:08Z")

</div>

My initial test was against a sensu-backend installed from the official packages.

Building sensu-backend now from the open source repository to retest.

---

<div class="post-metadata">

**Author:** ![jspaleta](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/jspaleta/32/141_2.png) [@jspaleta](https://discourse.sensu.io/u/jspaleta)\
**Post date:** [August 21, 2020, 2:01am UTC](https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016/15 "2020-08-21T02:01:06Z")

</div>

@swapzero

So i just built a fresh sensu-backend from the sensu-go repository using the v6.0.0 tag. I’m able to login via the web-ui just fine.

Got it up and running, added a user named test\_user with sensuctl  
and I’m able to login as test\_user using the web\_ui no problem at all.

My only thought is you have TLS secured backend api enabled (https::/whatever:8080) and are using self signed certs using a private CA that the web\_ui isn’t aware of and you’ve either disabled tls verification in your sensuctl or have given your sensuctl the optional private CA file to use to verify the self-signed keys.

I’ve tested my local setup using a secured backend api using certs from Let’s Encrypt, so the root CA is trusted by the operating system so my web-ui has no problems verifying the api endpoint. I’ve also tested a setup with no TLS security on the api endpoint in place just for completeness.

Other than a TSL issue, I’m not why you are having a problem and I am not.

---

<div class="post-metadata">

**Author:** ![swapzero](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/swapzero/32/529_2.png) [@swapzero](https://discourse.sensu.io/u/swapzero)\
**Post date:** [August 21, 2020, 3:48am UTC](https://discourse.sensu.io/t/sensu-web-error-on-launch-setup/2016/16 "2020-08-21T03:48:13Z")

</div>

I was incorrect in my assumption. I didnot have TLS enabled which meant the issue persisted. I just set the API\_URL to http instead of https and it worked fine. Thank you @jspaleta and @todd for your assistance. I do hope the documentation will be updated separately for sensu web on the site in future. Looking forward to the new features
