Login to Kibana fails over Nginx with affinity disabled

When asking questions, please provide the following information:

  • Search Guard and Elasticsearch version

SearchGuard 6 - 6.2.2-21
Search-guard-kibana-plugin-6.2.2-10

Elasticsearch & Kibana - 6.2.2

  • Installed and used enterprise modules, if any

none

  • JVM version and operating system version

OpenJDK Runtime Environment (build 1.8.0_161-b14)

   OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode) 

   Red Hat Enterprise Linux Server release 7.4 (Maipo)
  • Search Guard configuration files

  • Elasticsearch log messages on debug level

  • Other installed Elasticsearch or Kibana plugins, if any

Hi,

I have multiple Kibana instances with Kibana Searchguard plugin load balanced over Nginx.
I get the following error when I try to login to Kibana from the Searchguard login page.

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89)
at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

``

If I enable session affinity on the Nginx then I don’t see this issue but I need to keep the session affinity disabled on the Nginx for my solution.

Also I see this only on one of the cluster in my lab while other clusters with the same solution do not have this issue.

So does Kibana Searchguard plugin require affinity or stickiness to be enabled on the load balancer? Or is there anything else I’m missing here as this issue is not seen on other clusters with affinity disabled?

Hi,

I’ve found some difference between the working setup and the setup that is throwing this error.

│ 192.168.10.39 ──https─► 192.168.10.80

├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot80c.server35.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│Connection: keep-alive

│Origin: https://host10dot80c.server35.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

``

Shown above is the login request from the setup where I’m facing this issue and as you can see that there is no cookie field.

Login request shown below is from the working setup and it has a cookie field.

│ 192.168.10.39 ──https─► 192.168.10.51

``
├─────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot51c.server36.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

│Connection: keep-alive

│Origin: https://host10dot51c.server36.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

Is the missing cookie resulting in this Error? Also why is the Cookie field missing on that particular setup?

···

On Tuesday, July 31, 2018 at 7:50:54 PM UTC+5:30, ihjaz Mohamed wrote:

When asking questions, please provide the following information:

  • Search Guard and Elasticsearch version

SearchGuard 6 - 6.2.2-21
Search-guard-kibana-plugin-6.2.2-10

Elasticsearch & Kibana - 6.2.2

  • Installed and used enterprise modules, if any

none

  • JVM version and operating system version

OpenJDK Runtime Environment (build 1.8.0_161-b14)

   OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode) 
   Red Hat Enterprise Linux Server release 7.4 (Maipo)
  • Search Guard configuration files
  • Elasticsearch log messages on debug level
  • Other installed Elasticsearch or Kibana plugins, if any

Hi,

I have multiple Kibana instances with Kibana Searchguard plugin load balanced over Nginx.
I get the following error when I try to login to Kibana from the Searchguard login page.

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89)
at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

``

If I enable session affinity on the Nginx then I don’t see this issue but I need to keep the session affinity disabled on the Nginx for my solution.

Also I see this only on one of the cluster in my lab while other clusters with the same solution do not have this issue.

So does Kibana Searchguard plugin require affinity or stickiness to be enabled on the load balancer? Or is there anything else I’m missing here as this issue is not seen on other clusters with affinity disabled?

Super expression must either be null or a function, not undefined

``

This is the first time I see this error. It comes from:

commons.bundle.js

``

which is the webpack optimized Kibana bundle. That makes it very hard to track where the issue is really coming from. Is this the complete output in the Kibana logs?

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89) at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

Regarding session stickiness: No, that should not matter. The credentials are stored in an encrypted cookie. Kibana itself or our plugin do not hold any state.

But - the cookie you are seeing:

**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

has nothing to do with Search Guard or Kibana. The Search Guard cookies all start with “searchguard_”. So at the moment I am bit of a loss where this error actually comes from.

If the cookie would be missing the effect would be that you are constanly redirected to the login page, which is not the case here.

···

On Wednesday, August 1, 2018 at 10:31:11 AM UTC+2, ihjaz Mohamed wrote:

Hi,

I’ve found some difference between the working setup and the setup that is throwing this error.

│ 192.168.10.39 ──https─► 192.168.10.80

├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot80c.server35.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│Connection: keep-alive

│Origin: https://host10dot80c.server35.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

``

Shown above is the login request from the setup where I’m facing this issue and as you can see that there is no cookie field. For 6.2.2-10 (which is quite old BTW, current version would be 13) we write cookies for multi tenancy and for Basic Auth. So maybe the root cause is that nginx does not handle cookies correctly?

Login request shown below is from the working setup and it has a cookie field.

│ 192.168.10.39 ──https─► 192.168.10.51

``
├─────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot51c.server36.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

│Connection: keep-alive

│Origin: https://host10dot51c.server36.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

Is the missing cookie resulting in this Error? Also why is the Cookie field missing on that particular setup?

On Tuesday, July 31, 2018 at 7:50:54 PM UTC+5:30, ihjaz Mohamed wrote:

When asking questions, please provide the following information:

  • Search Guard and Elasticsearch version

SearchGuard 6 - 6.2.2-21
Search-guard-kibana-plugin-6.2.2-10

Elasticsearch & Kibana - 6.2.2

  • Installed and used enterprise modules, if any

none

  • JVM version and operating system version

OpenJDK Runtime Environment (build 1.8.0_161-b14)

   OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode) 
   Red Hat Enterprise Linux Server release 7.4 (Maipo)
  • Search Guard configuration files
  • Elasticsearch log messages on debug level
  • Other installed Elasticsearch or Kibana plugins, if any

Hi,

I have multiple Kibana instances with Kibana Searchguard plugin load balanced over Nginx.
I get the following error when I try to login to Kibana from the Searchguard login page.

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89)
at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

``

If I enable session affinity on the Nginx then I don’t see this issue but I need to keep the session affinity disabled on the Nginx for my solution.

Also I see this only on one of the cluster in my lab while other clusters with the same solution do not have this issue.

So does Kibana Searchguard plugin require affinity or stickiness to be enabled on the load balancer? Or is there anything else I’m missing here as this issue is not seen on other clusters with affinity disabled?

Hi,

I either get the “Super expression must either be null or a function, not undefined.” error or the below error:

Uncaught TypeError: Cannot read property ‘call’ of undefined (https://host10dot80c.server35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:1)
Version: 6.2.2
Build: 16588

Error: Uncaught TypeError: Cannot read property ‘call’ of undefined (https://host10dot80c.server35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:1)
at window.onerror (https://host10dot80c.server35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506238)

``


Below is the complete log from Chrome’s console for the error:

Uncaught TypeError: Cannot read property ‘call’ of undefined

``
at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1496 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1468 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1164 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at window.webpackJsonp (vendors.bundle.js?v=16588:1)

at searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1496 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1468 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1164 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

window.webpackJsonp @ vendors.bundle.js?v=16588:1

(anonymous) @ searchguard-login.bundle.js?v=16588:1

Any idea when you would see the above error?

Again I don’t see this error if enable affinity or remove other kibana instances and keep only one instance behind the nginx load balancer.

···

On Wednesday, August 1, 2018 at 6:28:44 PM UTC+5:30, Jochen Kressin wrote:

Super expression must either be null or a function, not undefined

``

This is the first time I see this error. It comes from:

commons.bundle.js

``

which is the webpack optimized Kibana bundle. That makes it very hard to track where the issue is really coming from. Is this the complete output in the Kibana logs?

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89) at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

Regarding session stickiness: No, that should not matter. The credentials are stored in an encrypted cookie. Kibana itself or our plugin do not hold any state.

But - the cookie you are seeing:

**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

has nothing to do with Search Guard or Kibana. The Search Guard cookies all start with “searchguard_”. So at the moment I am bit of a loss where this error actually comes from.

If the cookie would be missing the effect would be that you are constanly redirected to the login page, which is not the case here.

On Wednesday, August 1, 2018 at 10:31:11 AM UTC+2, ihjaz Mohamed wrote:

Hi,

I’ve found some difference between the working setup and the setup that is throwing this error.

│ 192.168.10.39 ──https─► 192.168.10.80

├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot80c.server35.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│Connection: keep-alive

│Origin: https://host10dot80c.server35.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

``

Shown above is the login request from the setup where I’m facing this issue and as you can see that there is no cookie field. For 6.2.2-10 (which is quite old BTW, current version would be 13) we write cookies for multi tenancy and for Basic Auth. So maybe the root cause is that nginx does not handle cookies correctly?

Login request shown below is from the working setup and it has a cookie field.

│ 192.168.10.39 ──https─► 192.168.10.51

``
├─────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot51c.server36.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

│Connection: keep-alive

│Origin: https://host10dot51c.server36.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

Is the missing cookie resulting in this Error? Also why is the Cookie field missing on that particular setup?

On Tuesday, July 31, 2018 at 7:50:54 PM UTC+5:30, ihjaz Mohamed wrote:

When asking questions, please provide the following information:

  • Search Guard and Elasticsearch version

SearchGuard 6 - 6.2.2-21
Search-guard-kibana-plugin-6.2.2-10

Elasticsearch & Kibana - 6.2.2

  • Installed and used enterprise modules, if any

none

  • JVM version and operating system version

OpenJDK Runtime Environment (build 1.8.0_161-b14)

   OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode) 
   Red Hat Enterprise Linux Server release 7.4 (Maipo)
  • Search Guard configuration files
  • Elasticsearch log messages on debug level
  • Other installed Elasticsearch or Kibana plugins, if any

Hi,

I have multiple Kibana instances with Kibana Searchguard plugin load balanced over Nginx.
I get the following error when I try to login to Kibana from the Searchguard login page.

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89)
at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

``

If I enable session affinity on the Nginx then I don’t see this issue but I need to keep the session affinity disabled on the Nginx for my solution.

Also I see this only on one of the cluster in my lab while other clusters with the same solution do not have this issue.

So does Kibana Searchguard plugin require affinity or stickiness to be enabled on the load balancer? Or is there anything else I’m missing here as this issue is not seen on other clusters with affinity disabled?

Weird. I guess we need to investigate this. At the moment I don’t have a solution for this. Let me take that to the dev team.

···

On Wednesday, August 1, 2018 at 3:29:32 PM UTC+2, ihjaz Mohamed wrote:

Hi,

I either get the “Super expression must either be null or a function, not undefined.” error or the below error:

Uncaught TypeError: Cannot read property ‘call’ of undefined (https://host10dot80c.server35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:1)
Version: 6.2.2
Build: 16588

Error: Uncaught TypeError: Cannot read property ‘call’ of undefined (https://host10dot80c.server35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:1)
at window.onerror (https://host10dot80c.server35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506238)

``



Below is the complete log from Chrome’s console for the error:

Uncaught TypeError: Cannot read property ‘call’ of undefined

``
at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1496 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1468 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1164 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at window.webpackJsonp (vendors.bundle.js?v=16588:1)

at searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1496 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1468 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1164 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

window.webpackJsonp @ vendors.bundle.js?v=16588:1

(anonymous) @ searchguard-login.bundle.js?v=16588:1

Any idea when you would see the above error?

Again I don’t see this error if enable affinity or remove other kibana instances and keep only one instance behind the nginx load balancer.

On Wednesday, August 1, 2018 at 6:28:44 PM UTC+5:30, Jochen Kressin wrote:

Super expression must either be null or a function, not undefined

``

This is the first time I see this error. It comes from:

commons.bundle.js

``

which is the webpack optimized Kibana bundle. That makes it very hard to track where the issue is really coming from. Is this the complete output in the Kibana logs?

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89) at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

Regarding session stickiness: No, that should not matter. The credentials are stored in an encrypted cookie. Kibana itself or our plugin do not hold any state.

But - the cookie you are seeing:

**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

has nothing to do with Search Guard or Kibana. The Search Guard cookies all start with “searchguard_”. So at the moment I am bit of a loss where this error actually comes from.

If the cookie would be missing the effect would be that you are constanly redirected to the login page, which is not the case here.

On Wednesday, August 1, 2018 at 10:31:11 AM UTC+2, ihjaz Mohamed wrote:

Hi,

I’ve found some difference between the working setup and the setup that is throwing this error.

│ 192.168.10.39 ──https─► 192.168.10.80

├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot80c.server35.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│Connection: keep-alive

│Origin: https://host10dot80c.server35.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

``

Shown above is the login request from the setup where I’m facing this issue and as you can see that there is no cookie field. For 6.2.2-10 (which is quite old BTW, current version would be 13) we write cookies for multi tenancy and for Basic Auth. So maybe the root cause is that nginx does not handle cookies correctly?

Login request shown below is from the working setup and it has a cookie field.

│ 192.168.10.39 ──https─► 192.168.10.51

``
├─────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot51c.server36.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

│Connection: keep-alive

│Origin: https://host10dot51c.server36.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

Is the missing cookie resulting in this Error? Also why is the Cookie field missing on that particular setup?

On Tuesday, July 31, 2018 at 7:50:54 PM UTC+5:30, ihjaz Mohamed wrote:

When asking questions, please provide the following information:

  • Search Guard and Elasticsearch version

SearchGuard 6 - 6.2.2-21
Search-guard-kibana-plugin-6.2.2-10

Elasticsearch & Kibana - 6.2.2

  • Installed and used enterprise modules, if any

none

  • JVM version and operating system version

OpenJDK Runtime Environment (build 1.8.0_161-b14)

   OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode) 
   Red Hat Enterprise Linux Server release 7.4 (Maipo)
  • Search Guard configuration files
  • Elasticsearch log messages on debug level
  • Other installed Elasticsearch or Kibana plugins, if any

Hi,

I have multiple Kibana instances with Kibana Searchguard plugin load balanced over Nginx.
I get the following error when I try to login to Kibana from the Searchguard login page.

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89)
at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

``

If I enable session affinity on the Nginx then I don’t see this issue but I need to keep the session affinity disabled on the Nginx for my solution.

Also I see this only on one of the cluster in my lab while other clusters with the same solution do not have this issue.

So does Kibana Searchguard plugin require affinity or stickiness to be enabled on the load balancer? Or is there anything else I’m missing here as this issue is not seen on other clusters with affinity disabled?

Hi,

Were you able to get any information on this error from the dev team?

···

On Wednesday, August 1, 2018 at 8:05:17 PM UTC+5:30, Jochen Kressin wrote:

Weird. I guess we need to investigate this. At the moment I don’t have a solution for this. Let me take that to the dev team.

On Wednesday, August 1, 2018 at 3:29:32 PM UTC+2, ihjaz Mohamed wrote:

Hi,

I either get the “Super expression must either be null or a function, not undefined.” error or the below error:

Uncaught TypeError: Cannot read property ‘call’ of undefined (https://host10dot80c.server35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:1)
Version: 6.2.2
Build: 16588

Error: Uncaught TypeError: Cannot read property ‘call’ of undefined (https://host10dot80c.server35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:1)
at window.onerror (https://host10dot80c.server35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506238)

``



Below is the complete log from Chrome’s console for the error:

Uncaught TypeError: Cannot read property ‘call’ of undefined

``
at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1496 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1468 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1164 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at window.webpackJsonp (vendors.bundle.js?v=16588:1)

at searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1496 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1468 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1164 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

window.webpackJsonp @ vendors.bundle.js?v=16588:1

(anonymous) @ searchguard-login.bundle.js?v=16588:1

Any idea when you would see the above error?

Again I don’t see this error if enable affinity or remove other kibana instances and keep only one instance behind the nginx load balancer.

On Wednesday, August 1, 2018 at 6:28:44 PM UTC+5:30, Jochen Kressin wrote:

Super expression must either be null or a function, not undefined

``

This is the first time I see this error. It comes from:

commons.bundle.js

``

which is the webpack optimized Kibana bundle. That makes it very hard to track where the issue is really coming from. Is this the complete output in the Kibana logs?

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89) at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

Regarding session stickiness: No, that should not matter. The credentials are stored in an encrypted cookie. Kibana itself or our plugin do not hold any state.

But - the cookie you are seeing:

**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

has nothing to do with Search Guard or Kibana. The Search Guard cookies all start with “searchguard_”. So at the moment I am bit of a loss where this error actually comes from.

If the cookie would be missing the effect would be that you are constanly redirected to the login page, which is not the case here.

On Wednesday, August 1, 2018 at 10:31:11 AM UTC+2, ihjaz Mohamed wrote:

Hi,

I’ve found some difference between the working setup and the setup that is throwing this error.

│ 192.168.10.39 ──https─► 192.168.10.80

├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot80c.server35.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│Connection: keep-alive

│Origin: https://host10dot80c.server35.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

``

Shown above is the login request from the setup where I’m facing this issue and as you can see that there is no cookie field. For 6.2.2-10 (which is quite old BTW, current version would be 13) we write cookies for multi tenancy and for Basic Auth. So maybe the root cause is that nginx does not handle cookies correctly?

Login request shown below is from the working setup and it has a cookie field.

│ 192.168.10.39 ──https─► 192.168.10.51

``
├─────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot51c.server36.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

│Connection: keep-alive

│Origin: https://host10dot51c.server36.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

Is the missing cookie resulting in this Error? Also why is the Cookie field missing on that particular setup?

On Tuesday, July 31, 2018 at 7:50:54 PM UTC+5:30, ihjaz Mohamed wrote:

When asking questions, please provide the following information:

  • Search Guard and Elasticsearch version

SearchGuard 6 - 6.2.2-21
Search-guard-kibana-plugin-6.2.2-10

Elasticsearch & Kibana - 6.2.2

  • Installed and used enterprise modules, if any

none

  • JVM version and operating system version

OpenJDK Runtime Environment (build 1.8.0_161-b14)

   OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode) 
   Red Hat Enterprise Linux Server release 7.4 (Maipo)
  • Search Guard configuration files
  • Elasticsearch log messages on debug level
  • Other installed Elasticsearch or Kibana plugins, if any

Hi,

I have multiple Kibana instances with Kibana Searchguard plugin load balanced over Nginx.
I get the following error when I try to login to Kibana from the Searchguard login page.

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89)
at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

``

If I enable session affinity on the Nginx then I don’t see this issue but I need to keep the session affinity disabled on the Nginx for my solution.

Also I see this only on one of the cluster in my lab while other clusters with the same solution do not have this issue.

So does Kibana Searchguard plugin require affinity or stickiness to be enabled on the load balancer? Or is there anything else I’m missing here as this issue is not seen on other clusters with affinity disabled?

No, unfortunately not yet, still investigating

···

On Friday, August 3, 2018 at 12:52:10 PM UTC+2, ihjaz Mohamed wrote:

Hi,

Were you able to get any information on this error from the dev team?

On Wednesday, August 1, 2018 at 8:05:17 PM UTC+5:30, Jochen Kressin wrote:

Weird. I guess we need to investigate this. At the moment I don’t have a solution for this. Let me take that to the dev team.

On Wednesday, August 1, 2018 at 3:29:32 PM UTC+2, ihjaz Mohamed wrote:

Hi,

I either get the “Super expression must either be null or a function, not undefined.” error or the below error:

Uncaught TypeError: Cannot read property ‘call’ of undefined (https://host10dot80c.server35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:1)
Version: 6.2.2
Build: 16588

Error: Uncaught TypeError: Cannot read property ‘call’ of undefined (https://host10dot80c.server35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:1)
at window.onerror (https://host10dot80c.server35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506238)

``



Below is the complete log from Chrome’s console for the error:

Uncaught TypeError: Cannot read property ‘call’ of undefined

``
at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1496 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1468 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1164 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at window.webpackJsonp (vendors.bundle.js?v=16588:1)

at searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1496 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1468 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1164 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

window.webpackJsonp @ vendors.bundle.js?v=16588:1

(anonymous) @ searchguard-login.bundle.js?v=16588:1

Any idea when you would see the above error?

Again I don’t see this error if enable affinity or remove other kibana instances and keep only one instance behind the nginx load balancer.

On Wednesday, August 1, 2018 at 6:28:44 PM UTC+5:30, Jochen Kressin wrote:

Super expression must either be null or a function, not undefined

``

This is the first time I see this error. It comes from:

commons.bundle.js

``

which is the webpack optimized Kibana bundle. That makes it very hard to track where the issue is really coming from. Is this the complete output in the Kibana logs?

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89) at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

Regarding session stickiness: No, that should not matter. The credentials are stored in an encrypted cookie. Kibana itself or our plugin do not hold any state.

But - the cookie you are seeing:

**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

has nothing to do with Search Guard or Kibana. The Search Guard cookies all start with “searchguard_”. So at the moment I am bit of a loss where this error actually comes from.

If the cookie would be missing the effect would be that you are constanly redirected to the login page, which is not the case here.

On Wednesday, August 1, 2018 at 10:31:11 AM UTC+2, ihjaz Mohamed wrote:

Hi,

I’ve found some difference between the working setup and the setup that is throwing this error.

│ 192.168.10.39 ──https─► 192.168.10.80

├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot80c.server35.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│Connection: keep-alive

│Origin: https://host10dot80c.server35.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

``

Shown above is the login request from the setup where I’m facing this issue and as you can see that there is no cookie field. For 6.2.2-10 (which is quite old BTW, current version would be 13) we write cookies for multi tenancy and for Basic Auth. So maybe the root cause is that nginx does not handle cookies correctly?

Login request shown below is from the working setup and it has a cookie field.

│ 192.168.10.39 ──https─► 192.168.10.51

``
├─────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot51c.server36.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

│Connection: keep-alive

│Origin: https://host10dot51c.server36.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

Is the missing cookie resulting in this Error? Also why is the Cookie field missing on that particular setup?

On Tuesday, July 31, 2018 at 7:50:54 PM UTC+5:30, ihjaz Mohamed wrote:

When asking questions, please provide the following information:

  • Search Guard and Elasticsearch version

SearchGuard 6 - 6.2.2-21
Search-guard-kibana-plugin-6.2.2-10

Elasticsearch & Kibana - 6.2.2

  • Installed and used enterprise modules, if any

none

  • JVM version and operating system version

OpenJDK Runtime Environment (build 1.8.0_161-b14)

   OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode) 
   Red Hat Enterprise Linux Server release 7.4 (Maipo)
  • Search Guard configuration files
  • Elasticsearch log messages on debug level
  • Other installed Elasticsearch or Kibana plugins, if any

Hi,

I have multiple Kibana instances with Kibana Searchguard plugin load balanced over Nginx.
I get the following error when I try to login to Kibana from the Searchguard login page.

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89)
at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

``

If I enable session affinity on the Nginx then I don’t see this issue but I need to keep the session affinity disabled on the Nginx for my solution.

Also I see this only on one of the cluster in my lab while other clusters with the same solution do not have this issue.

So does Kibana Searchguard plugin require affinity or stickiness to be enabled on the load balancer? Or is there anything else I’m missing here as this issue is not seen on other clusters with affinity disabled?

Hi,

Any update on this issue? Were you able to reproduce this?

···

On Friday, August 3, 2018 at 5:56:25 PM UTC+5:30, Jochen Kressin wrote:

No, unfortunately not yet, still investigating

On Friday, August 3, 2018 at 12:52:10 PM UTC+2, ihjaz Mohamed wrote:

Hi,

Were you able to get any information on this error from the dev team?

On Wednesday, August 1, 2018 at 8:05:17 PM UTC+5:30, Jochen Kressin wrote:

Weird. I guess we need to investigate this. At the moment I don’t have a solution for this. Let me take that to the dev team.

On Wednesday, August 1, 2018 at 3:29:32 PM UTC+2, ihjaz Mohamed wrote:

Hi,

I either get the “Super expression must either be null or a function, not undefined.” error or the below error:

Uncaught TypeError: Cannot read property ‘call’ of undefined (https://host10dot80c.server35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:1)
Version: 6.2.2
Build: 16588

Error: Uncaught TypeError: Cannot read property ‘call’ of undefined (https://host10dot80c.server35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:1)
at window.onerror (https://host10dot80c.server35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506238)

``



Below is the complete log from Chrome’s console for the error:

Uncaught TypeError: Cannot read property ‘call’ of undefined

``
at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1496 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1468 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1164 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at window.webpackJsonp (vendors.bundle.js?v=16588:1)

at searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1496 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1468 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1164 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

window.webpackJsonp @ vendors.bundle.js?v=16588:1

(anonymous) @ searchguard-login.bundle.js?v=16588:1

Any idea when you would see the above error?

Again I don’t see this error if enable affinity or remove other kibana instances and keep only one instance behind the nginx load balancer.

On Wednesday, August 1, 2018 at 6:28:44 PM UTC+5:30, Jochen Kressin wrote:

Super expression must either be null or a function, not undefined

``

This is the first time I see this error. It comes from:

commons.bundle.js

``

which is the webpack optimized Kibana bundle. That makes it very hard to track where the issue is really coming from. Is this the complete output in the Kibana logs?

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89) at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

Regarding session stickiness: No, that should not matter. The credentials are stored in an encrypted cookie. Kibana itself or our plugin do not hold any state.

But - the cookie you are seeing:

**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

has nothing to do with Search Guard or Kibana. The Search Guard cookies all start with “searchguard_”. So at the moment I am bit of a loss where this error actually comes from.

If the cookie would be missing the effect would be that you are constanly redirected to the login page, which is not the case here.

On Wednesday, August 1, 2018 at 10:31:11 AM UTC+2, ihjaz Mohamed wrote:

Hi,

I’ve found some difference between the working setup and the setup that is throwing this error.

│ 192.168.10.39 ──https─► 192.168.10.80

├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot80c.server35.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│Connection: keep-alive

│Origin: https://host10dot80c.server35.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

``

Shown above is the login request from the setup where I’m facing this issue and as you can see that there is no cookie field. For 6.2.2-10 (which is quite old BTW, current version would be 13) we write cookies for multi tenancy and for Basic Auth. So maybe the root cause is that nginx does not handle cookies correctly?

Login request shown below is from the working setup and it has a cookie field.

│ 192.168.10.39 ──https─► 192.168.10.51

``
├─────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot51c.server36.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

│Connection: keep-alive

│Origin: https://host10dot51c.server36.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

Is the missing cookie resulting in this Error? Also why is the Cookie field missing on that particular setup?

On Tuesday, July 31, 2018 at 7:50:54 PM UTC+5:30, ihjaz Mohamed wrote:

When asking questions, please provide the following information:

  • Search Guard and Elasticsearch version

SearchGuard 6 - 6.2.2-21
Search-guard-kibana-plugin-6.2.2-10

Elasticsearch & Kibana - 6.2.2

  • Installed and used enterprise modules, if any

none

  • JVM version and operating system version

OpenJDK Runtime Environment (build 1.8.0_161-b14)

   OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode) 
   Red Hat Enterprise Linux Server release 7.4 (Maipo)
  • Search Guard configuration files
  • Elasticsearch log messages on debug level
  • Other installed Elasticsearch or Kibana plugins, if any

Hi,

I have multiple Kibana instances with Kibana Searchguard plugin load balanced over Nginx.
I get the following error when I try to login to Kibana from the Searchguard login page.

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89)
at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

``

If I enable session affinity on the Nginx then I don’t see this issue but I need to keep the session affinity disabled on the Nginx for my solution.

Also I see this only on one of the cluster in my lab while other clusters with the same solution do not have this issue.

So does Kibana Searchguard plugin require affinity or stickiness to be enabled on the load balancer? Or is there anything else I’m missing here as this issue is not seen on other clusters with affinity disabled?

Hi,

Any progress on this issue?

···

On Wednesday, September 5, 2018 at 12:29:07 PM UTC+5:30, ihjaz Mohamed wrote:

Hi,

Any update on this issue? Were you able to reproduce this?

On Friday, August 3, 2018 at 5:56:25 PM UTC+5:30, Jochen Kressin wrote:

No, unfortunately not yet, still investigating

On Friday, August 3, 2018 at 12:52:10 PM UTC+2, ihjaz Mohamed wrote:

Hi,

Were you able to get any information on this error from the dev team?

On Wednesday, August 1, 2018 at 8:05:17 PM UTC+5:30, Jochen Kressin wrote:

Weird. I guess we need to investigate this. At the moment I don’t have a solution for this. Let me take that to the dev team.

On Wednesday, August 1, 2018 at 3:29:32 PM UTC+2, ihjaz Mohamed wrote:

Hi,

I either get the “Super expression must either be null or a function, not undefined.” error or the below error:

Uncaught TypeError: Cannot read property ‘call’ of undefined (https://host10dot80c.server35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:1)
Version: 6.2.2
Build: 16588

Error: Uncaught TypeError: Cannot read property ‘call’ of undefined (https://host10dot80c.server35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:1)
at window.onerror (https://host10dot80c.server35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506238)

``



Below is the complete log from Chrome’s console for the error:

Uncaught TypeError: Cannot read property ‘call’ of undefined

``
at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1496 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1468 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1164 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at window.webpackJsonp (vendors.bundle.js?v=16588:1)

at searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1496 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1468 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1164 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

window.webpackJsonp @ vendors.bundle.js?v=16588:1

(anonymous) @ searchguard-login.bundle.js?v=16588:1

Any idea when you would see the above error?

Again I don’t see this error if enable affinity or remove other kibana instances and keep only one instance behind the nginx load balancer.

On Wednesday, August 1, 2018 at 6:28:44 PM UTC+5:30, Jochen Kressin wrote:

Super expression must either be null or a function, not undefined

``

This is the first time I see this error. It comes from:

commons.bundle.js

``

which is the webpack optimized Kibana bundle. That makes it very hard to track where the issue is really coming from. Is this the complete output in the Kibana logs?

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89) at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

Regarding session stickiness: No, that should not matter. The credentials are stored in an encrypted cookie. Kibana itself or our plugin do not hold any state.

But - the cookie you are seeing:

**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

has nothing to do with Search Guard or Kibana. The Search Guard cookies all start with “searchguard_”. So at the moment I am bit of a loss where this error actually comes from.

If the cookie would be missing the effect would be that you are constanly redirected to the login page, which is not the case here.

On Wednesday, August 1, 2018 at 10:31:11 AM UTC+2, ihjaz Mohamed wrote:

Hi,

I’ve found some difference between the working setup and the setup that is throwing this error.

│ 192.168.10.39 ──https─► 192.168.10.80

├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot80c.server35.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│Connection: keep-alive

│Origin: https://host10dot80c.server35.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

``

Shown above is the login request from the setup where I’m facing this issue and as you can see that there is no cookie field. For 6.2.2-10 (which is quite old BTW, current version would be 13) we write cookies for multi tenancy and for Basic Auth. So maybe the root cause is that nginx does not handle cookies correctly?

Login request shown below is from the working setup and it has a cookie field.

│ 192.168.10.39 ──https─► 192.168.10.51

``
├─────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot51c.server36.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

│Connection: keep-alive

│Origin: https://host10dot51c.server36.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

Is the missing cookie resulting in this Error? Also why is the Cookie field missing on that particular setup?

On Tuesday, July 31, 2018 at 7:50:54 PM UTC+5:30, ihjaz Mohamed wrote:

When asking questions, please provide the following information:

  • Search Guard and Elasticsearch version

SearchGuard 6 - 6.2.2-21
Search-guard-kibana-plugin-6.2.2-10

Elasticsearch & Kibana - 6.2.2

  • Installed and used enterprise modules, if any

none

  • JVM version and operating system version

OpenJDK Runtime Environment (build 1.8.0_161-b14)

   OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode) 
   Red Hat Enterprise Linux Server release 7.4 (Maipo)
  • Search Guard configuration files
  • Elasticsearch log messages on debug level
  • Other installed Elasticsearch or Kibana plugins, if any

Hi,

I have multiple Kibana instances with Kibana Searchguard plugin load balanced over Nginx.
I get the following error when I try to login to Kibana from the Searchguard login page.

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89)
at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

``

If I enable session affinity on the Nginx then I don’t see this issue but I need to keep the session affinity disabled on the Nginx for my solution.

Also I see this only on one of the cluster in my lab while other clusters with the same solution do not have this issue.

So does Kibana Searchguard plugin require affinity or stickiness to be enabled on the load balancer? Or is there anything else I’m missing here as this issue is not seen on other clusters with affinity disabled?

Hi,

Has there been any investigation on this?

···

On Thursday, September 27, 2018 at 12:40:18 PM UTC+5:30, ihjaz Mohamed wrote:

Hi,

Any progress on this issue?

On Wednesday, September 5, 2018 at 12:29:07 PM UTC+5:30, ihjaz Mohamed wrote:

Hi,

Any update on this issue? Were you able to reproduce this?

On Friday, August 3, 2018 at 5:56:25 PM UTC+5:30, Jochen Kressin wrote:

No, unfortunately not yet, still investigating

On Friday, August 3, 2018 at 12:52:10 PM UTC+2, ihjaz Mohamed wrote:

Hi,

Were you able to get any information on this error from the dev team?

On Wednesday, August 1, 2018 at 8:05:17 PM UTC+5:30, Jochen Kressin wrote:

Weird. I guess we need to investigate this. At the moment I don’t have a solution for this. Let me take that to the dev team.

On Wednesday, August 1, 2018 at 3:29:32 PM UTC+2, ihjaz Mohamed wrote:

Hi,

I either get the “Super expression must either be null or a function, not undefined.” error or the below error:

Uncaught TypeError: Cannot read property ‘call’ of undefined (https://host10dot80c.server35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:1)
Version: 6.2.2
Build: 16588

Error: Uncaught TypeError: Cannot read property ‘call’ of undefined (https://host10dot80c.server35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:1)
at window.onerror (https://host10dot80c.server35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506238)

``



Below is the complete log from Chrome’s console for the error:

Uncaught TypeError: Cannot read property ‘call’ of undefined

``
at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1496 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1468 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1164 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at window.webpackJsonp (vendors.bundle.js?v=16588:1)

at searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1496 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1468 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1164 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

window.webpackJsonp @ vendors.bundle.js?v=16588:1

(anonymous) @ searchguard-login.bundle.js?v=16588:1

Any idea when you would see the above error?

Again I don’t see this error if enable affinity or remove other kibana instances and keep only one instance behind the nginx load balancer.

On Wednesday, August 1, 2018 at 6:28:44 PM UTC+5:30, Jochen Kressin wrote:

Super expression must either be null or a function, not undefined

``

This is the first time I see this error. It comes from:

commons.bundle.js

``

which is the webpack optimized Kibana bundle. That makes it very hard to track where the issue is really coming from. Is this the complete output in the Kibana logs?

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89) at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

Regarding session stickiness: No, that should not matter. The credentials are stored in an encrypted cookie. Kibana itself or our plugin do not hold any state.

But - the cookie you are seeing:

**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

has nothing to do with Search Guard or Kibana. The Search Guard cookies all start with “searchguard_”. So at the moment I am bit of a loss where this error actually comes from.

If the cookie would be missing the effect would be that you are constanly redirected to the login page, which is not the case here.

On Wednesday, August 1, 2018 at 10:31:11 AM UTC+2, ihjaz Mohamed wrote:

Hi,

I’ve found some difference between the working setup and the setup that is throwing this error.

│ 192.168.10.39 ──https─► 192.168.10.80

├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot80c.server35.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│Connection: keep-alive

│Origin: https://host10dot80c.server35.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

``

Shown above is the login request from the setup where I’m facing this issue and as you can see that there is no cookie field. For 6.2.2-10 (which is quite old BTW, current version would be 13) we write cookies for multi tenancy and for Basic Auth. So maybe the root cause is that nginx does not handle cookies correctly?

Login request shown below is from the working setup and it has a cookie field.

│ 192.168.10.39 ──https─► 192.168.10.51

``
├─────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot51c.server36.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

│Connection: keep-alive

│Origin: https://host10dot51c.server36.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

Is the missing cookie resulting in this Error? Also why is the Cookie field missing on that particular setup?

On Tuesday, July 31, 2018 at 7:50:54 PM UTC+5:30, ihjaz Mohamed wrote:

When asking questions, please provide the following information:

  • Search Guard and Elasticsearch version

SearchGuard 6 - 6.2.2-21
Search-guard-kibana-plugin-6.2.2-10

Elasticsearch & Kibana - 6.2.2

  • Installed and used enterprise modules, if any

none

  • JVM version and operating system version

OpenJDK Runtime Environment (build 1.8.0_161-b14)

   OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode) 
   Red Hat Enterprise Linux Server release 7.4 (Maipo)
  • Search Guard configuration files
  • Elasticsearch log messages on debug level
  • Other installed Elasticsearch or Kibana plugins, if any

Hi,

I have multiple Kibana instances with Kibana Searchguard plugin load balanced over Nginx.
I get the following error when I try to login to Kibana from the Searchguard login page.

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89)
at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

``

If I enable session affinity on the Nginx then I don’t see this issue but I need to keep the session affinity disabled on the Nginx for my solution.

Also I see this only on one of the cluster in my lab while other clusters with the same solution do not have this issue.

So does Kibana Searchguard plugin require affinity or stickiness to be enabled on the load balancer? Or is there anything else I’m missing here as this issue is not seen on other clusters with affinity disabled?

Hi there,

Is there any way you can click on the error message in the browser console and have the corresponding code line opened up?

It would be useful to see exactly what is undefined and the stack trace up until then.

Do you see the same error if you don’t have SearchGuard installed?

I’m really just guessing here, but it almost sounds like if something went wrong in Kibana’s optimize step where those bundles are built…

Regards

Mike

···

On Thursday, 21 February 2019 06:42:47 UTC+1, ihjaz Mohamed wrote:

Hi,

Has there been any investigation on this?

On Thursday, September 27, 2018 at 12:40:18 PM UTC+5:30, ihjaz Mohamed wrote:

Hi,

Any progress on this issue?

On Wednesday, September 5, 2018 at 12:29:07 PM UTC+5:30, ihjaz Mohamed wrote:

Hi,

Any update on this issue? Were you able to reproduce this?

On Friday, August 3, 2018 at 5:56:25 PM UTC+5:30, Jochen Kressin wrote:

No, unfortunately not yet, still investigating

On Friday, August 3, 2018 at 12:52:10 PM UTC+2, ihjaz Mohamed wrote:

Hi,

Were you able to get any information on this error from the dev team?

On Wednesday, August 1, 2018 at 8:05:17 PM UTC+5:30, Jochen Kressin wrote:

Weird. I guess we need to investigate this. At the moment I don’t have a solution for this. Let me take that to the dev team.

On Wednesday, August 1, 2018 at 3:29:32 PM UTC+2, ihjaz Mohamed wrote:

Hi,

I either get the “Super expression must either be null or a function, not undefined.” error or the below error:

Uncaught TypeError: Cannot read property ‘call’ of undefined (https://host10dot80c.server35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:1)
Version: 6.2.2
Build: 16588

Error: Uncaught TypeError: Cannot read property ‘call’ of undefined (https://host10dot80c.server35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:1)
at window.onerror (https://host10dot80c.server35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506238)

``



Below is the complete log from Chrome’s console for the error:

Uncaught TypeError: Cannot read property ‘call’ of undefined

``
at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1496 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1468 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at Object.1164 (searchguard-login.bundle.js?v=16588:1)

at webpack_require (vendors.bundle.js?v=16588:1)

at window.webpackJsonp (vendors.bundle.js?v=16588:1)

at searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1496 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1468 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

1164 @ searchguard-login.bundle.js?v=16588:1

webpack_require @ vendors.bundle.js?v=16588:1

window.webpackJsonp @ vendors.bundle.js?v=16588:1

(anonymous) @ searchguard-login.bundle.js?v=16588:1

Any idea when you would see the above error?

Again I don’t see this error if enable affinity or remove other kibana instances and keep only one instance behind the nginx load balancer.

On Wednesday, August 1, 2018 at 6:28:44 PM UTC+5:30, Jochen Kressin wrote:

Super expression must either be null or a function, not undefined

``

This is the first time I see this error. It comes from:

commons.bundle.js

``

which is the webpack optimized Kibana bundle. That makes it very hard to track where the issue is really coming from. Is this the complete output in the Kibana logs?

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89) at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

Regarding session stickiness: No, that should not matter. The credentials are stored in an encrypted cookie. Kibana itself or our plugin do not hold any state.

But - the cookie you are seeing:

**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

has nothing to do with Search Guard or Kibana. The Search Guard cookies all start with “searchguard_”. So at the moment I am bit of a loss where this error actually comes from.

If the cookie would be missing the effect would be that you are constanly redirected to the login page, which is not the case here.

On Wednesday, August 1, 2018 at 10:31:11 AM UTC+2, ihjaz Mohamed wrote:

Hi,

I’ve found some difference between the working setup and the setup that is throwing this error.

│ 192.168.10.39 ──https─► 192.168.10.80

├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot80c.server35.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│Connection: keep-alive

│Origin: https://host10dot80c.server35.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

``

Shown above is the login request from the setup where I’m facing this issue and as you can see that there is no cookie field. For 6.2.2-10 (which is quite old BTW, current version would be 13) we write cookies for multi tenancy and for Basic Auth. So maybe the root cause is that nginx does not handle cookies correctly?

Login request shown below is from the working setup and it has a cookie field.

│ 192.168.10.39 ──https─► 192.168.10.51

``
├─────────────────────────────────────────────────────────────────────────────────────────────────────

│POST /app/kibana/api/v1/auth/login HTTP/1.1

│Host: host10dot51c.server36.lab

│User-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

│Accept: application/json, text/plain, /

│Accept-Language: en-US,en;q=0.9

│Accept-Encoding: gzip, deflate, br

│**Cookie: JSESSIONID=0000ApvHwDtXcCbc2O0KUhKo_8H:-1 **

│Connection: keep-alive

│Origin: https://host10dot51c.server36.lab

│Content-Type: application/json;charset=UTF-8

│Content-Length: 50

│{

│ “password” : “Password1”,

│ “username” : “kibanaadmin”

│}

Is the missing cookie resulting in this Error? Also why is the Cookie field missing on that particular setup?

On Tuesday, July 31, 2018 at 7:50:54 PM UTC+5:30, ihjaz Mohamed wrote:

When asking questions, please provide the following information:

  • Search Guard and Elasticsearch version

SearchGuard 6 - 6.2.2-21
Search-guard-kibana-plugin-6.2.2-10

Elasticsearch & Kibana - 6.2.2

  • Installed and used enterprise modules, if any

none

  • JVM version and operating system version

OpenJDK Runtime Environment (build 1.8.0_161-b14)

   OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode) 
   Red Hat Enterprise Linux Server release 7.4 (Maipo)
  • Search Guard configuration files
  • Elasticsearch log messages on debug level
  • Other installed Elasticsearch or Kibana plugins, if any

Hi,

I have multiple Kibana instances with Kibana Searchguard plugin load balanced over Nginx.
I get the following error when I try to login to Kibana from the Searchguard login page.

Error: Uncaught TypeError: Super expression must either be null or a function, not undefined (https://elite10dot80c.elite35.lab/app/kibana/bundles/vendors.bundle.js?v=16588:89)
at window.onerror (https://elite10dot80c.elite35.lab/app/kibana/bundles/commons.bundle.js?v=16588:1:506240)

``

If I enable session affinity on the Nginx then I don’t see this issue but I need to keep the session affinity disabled on the Nginx for my solution.

Also I see this only on one of the cluster in my lab while other clusters with the same solution do not have this issue.

So does Kibana Searchguard plugin require affinity or stickiness to be enabled on the load balancer? Or is there anything else I’m missing here as this issue is not seen on other clusters with affinity disabled?

Hi,

This is the screenshot from before. I’ve not been able to reproduce this issue after that.