You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/01/16 21:15:40 UTC

[GitHub] [incubator-superset] bharath0208 opened a new issue #8980: Can't contact LDAP server

bharath0208 opened a new issue #8980: Can't contact LDAP server
URL: https://github.com/apache/incubator-superset/issues/8980
 
 
   Hi Team,
   I have modified the superset_config.py to connect to my ldap server. When i run this as a docker pod i m able to connect to the LDAP server and the logging is working fine. But when i deploy this on a Kubernetes cluster   using helm charts it throws the below error.
   
         
   ```
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/security/manager.py", line 909, in auth_user_ldap
       if not self._bind_ldap(ldap, con, username, password):
     File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/security/manager.py", line 825, in _bind_ldap
       self._bind_indirect_user(ldap, con)
     File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/security/manager.py", line 810, in _bind_indirect_user
       con.bind_s(indirect_user, indirect_password)
     File "/usr/local/lib/python3.6/site-packages/ldap/ldapobject.py", line 397, in bind_s
       msgid = self.bind(who,cred,method)
     File "/usr/local/lib/python3.6/site-packages/ldap/ldapobject.py", line 391, in bind
       return self.simple_bind(who,cred)
     File "/usr/local/lib/python3.6/site-packages/ldap/ldapobject.py", line 376, in simple_bind
       return self._ldap_call(self._l.simple_bind,who,cred,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
     File "/usr/local/lib/python3.6/site-packages/ldap/ldapobject.py", line 263, in _ldap_call
       result = func(*args,**kwargs)
   ldap.SERVER_DOWN: {'desc': "Can't contact LDAP server"}
   ```
   
   Note: The ldap server is up and running and we are able to contact it from other kube pods not sure why it is not working from superset pod.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] issue-label-bot[bot] commented on issue #8980: Can't contact LDAP server

Posted by GitBox <gi...@apache.org>.
issue-label-bot[bot] commented on issue #8980: Can't contact LDAP server
URL: https://github.com/apache/incubator-superset/issues/8980#issuecomment-575350218
 
 
   Issue Label Bot is not confident enough to auto-label this issue. See [dashboard](https://mlbot.net/data/apache/incubator-superset) for more details.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] bharath0208 edited a comment on issue #8980: Can't contact LDAP server

Posted by GitBox <gi...@apache.org>.
bharath0208 edited a comment on issue #8980: Can't contact LDAP server
URL: https://github.com/apache/incubator-superset/issues/8980#issuecomment-576751206
 
 
   @PeterCahn @dpgaspar 
   
   Thanks peter I have added this value already when AUTH_LDAP_BIND_USER is set to True. I fixed this error by adding this property in my deployment YAML file. 
   
       **spec:
         hostAliases:
           - ip: "8888888888888"
             hostnames:
               - "google.com"**
   
   I see the authentication is going through now but I am getting the below error.  Any help can be highly appreciated.
   
   ```  
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app
       response = self.full_dispatch_request()
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1951, in full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1820, in handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
       raise value
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request
       rv = self.dispatch_request()
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File "/usr/local/lib/python3.6/site-packages/superset/views/core.py", line 2806, in welcome
       "common": common_bootstrap_payload(),
     File "/usr/local/lib/python3.6/site-packages/superset/views/base.py", line 258, in common_bootstrap_payload
       "menu_data": menu_data(),
     File "/usr/local/lib/python3.6/site-packages/superset/views/base.py", line 200, in menu_data
       menu = appbuilder.menu.get_data()
     File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/menu.py", line 62, in get_data
       allowed_menus = current_app.appbuilder.sm.get_user_menu_access(
   AttributeError: 'SupersetSecurityManager' object has no attribute 'get_user_menu_access'
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] bharath0208 commented on issue #8980: Can't contact LDAP server

Posted by GitBox <gi...@apache.org>.
bharath0208 commented on issue #8980: Can't contact LDAP server
URL: https://github.com/apache/incubator-superset/issues/8980#issuecomment-576377299
 
 
   @dpgaspar I tried that it connects 1 out of 10 times. But when i ping it from some other pod running on my k8 cluster it connects fine. I am using the helm charts provided here in Github.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] dpgaspar commented on issue #8980: Can't contact LDAP server

Posted by GitBox <gi...@apache.org>.
dpgaspar commented on issue #8980: Can't contact LDAP server
URL: https://github.com/apache/incubator-superset/issues/8980#issuecomment-576172028
 
 
   Hi @bharath0208,
   
   This does not seem like a superset issue. You need to troubleshoot your environment, for example start by accessing your pod on kubernetes and test if you can connect yo your LDAP server

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] dpgaspar edited a comment on issue #8980: Can't contact LDAP server

Posted by GitBox <gi...@apache.org>.
dpgaspar edited a comment on issue #8980: Can't contact LDAP server
URL: https://github.com/apache/incubator-superset/issues/8980#issuecomment-576172028
 
 
   Hi @bharath0208,
   
   This does not seem like a superset issue. You need to troubleshoot your environment, for example start by accessing your container on kubernetes and test if you can connect to your LDAP server

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] PeterCahn commented on issue #8980: Can't contact LDAP server

Posted by GitBox <gi...@apache.org>.
PeterCahn commented on issue #8980: Can't contact LDAP server
URL: https://github.com/apache/incubator-superset/issues/8980#issuecomment-576687376
 
 
   I also had this problem and I fixed it by changing the assignment of the variable `username` in `_bind_ldap` (when `AUTH_LDAP_BIND_USER` is set to `True`)
   
   I use the following command:
   
   `sed -i 's/username = user\[0\]\[0\]/username = user\[1\]\[0\]/' /usr/local/lib/python3.6/site-packages/flask_appbuilder/security/manager.py`
   
   Though this is probably a problem of Flask Appbuilder or of an LDAP misconfiguration, I hope it helps.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] dpgaspar edited a comment on issue #8980: Can't contact LDAP server

Posted by GitBox <gi...@apache.org>.
dpgaspar edited a comment on issue #8980: Can't contact LDAP server
URL: https://github.com/apache/incubator-superset/issues/8980#issuecomment-576172028
 
 
   Hi @bharath0208,
   
   This does not seem like a superset issue. You need to troubleshoot your environment, for example start by accessing your pod on kubernetes and test if you can connect to your LDAP server

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] bharath0208 commented on issue #8980: Can't contact LDAP server

Posted by GitBox <gi...@apache.org>.
bharath0208 commented on issue #8980: Can't contact LDAP server
URL: https://github.com/apache/incubator-superset/issues/8980#issuecomment-576751206
 
 
   @PeterCahn @dpgaspar 
   
   Thanks peter I have added this value already when AUTH_LDAP_BIND_USER is set to True. I fixed this error by adding this property in my deployment YAML file. 
   
       **spec:
         hostAliases:
           - ip: "9.57.182.78"
             hostnames:
               - "bluepages.ibm.com"**
   
   I see the authentication is going through now but I am getting the below error.  Any help can be highly appreciated.
   
   ```  
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app
       response = self.full_dispatch_request()
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1951, in full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1820, in handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
       raise value
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request
       rv = self.dispatch_request()
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File "/usr/local/lib/python3.6/site-packages/superset/views/core.py", line 2806, in welcome
       "common": common_bootstrap_payload(),
     File "/usr/local/lib/python3.6/site-packages/superset/views/base.py", line 258, in common_bootstrap_payload
       "menu_data": menu_data(),
     File "/usr/local/lib/python3.6/site-packages/superset/views/base.py", line 200, in menu_data
       menu = appbuilder.menu.get_data()
     File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/menu.py", line 62, in get_data
       allowed_menus = current_app.appbuilder.sm.get_user_menu_access(
   AttributeError: 'SupersetSecurityManager' object has no attribute 'get_user_menu_access'
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] bharath0208 closed issue #8980: Can't contact LDAP server

Posted by GitBox <gi...@apache.org>.
bharath0208 closed issue #8980: Can't contact LDAP server
URL: https://github.com/apache/incubator-superset/issues/8980
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] manisha-tanwar commented on issue #8980: Can't contact LDAP server

Posted by GitBox <gi...@apache.org>.
manisha-tanwar commented on issue #8980:
URL: https://github.com/apache/superset/issues/8980#issuecomment-1032720850


   I'm also facing same issue.. same LDAP settings works fine on docker but not on K8.
   But if I change AUTH_LDAP_SERVER from ldaps(or port 636) to ldap(port 389) and disable TLS, it works fine. I think I need to configure cert, cacert etc but not sure how to pass cert path with ldap.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] bharath0208 edited a comment on issue #8980: Can't contact LDAP server

Posted by GitBox <gi...@apache.org>.
bharath0208 edited a comment on issue #8980: Can't contact LDAP server
URL: https://github.com/apache/incubator-superset/issues/8980#issuecomment-576751206
 
 
   @PeterCahn @dpgaspar 
   
   Thanks peter I have added this value already when AUTH_LDAP_BIND_USER is set to True. I fixed this error by adding this property in my deployment YAML file. 
   
       spec:
         hostAliases:
           - ip: "8888888888888"
             hostnames:
               - "google.com"
   
   I see the authentication is going through now but I am getting the below error.  Any help can be highly appreciated.
   
   ```  
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app
       response = self.full_dispatch_request()
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1951, in full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1820, in handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
       raise value
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request
       rv = self.dispatch_request()
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File "/usr/local/lib/python3.6/site-packages/superset/views/core.py", line 2806, in welcome
       "common": common_bootstrap_payload(),
     File "/usr/local/lib/python3.6/site-packages/superset/views/base.py", line 258, in common_bootstrap_payload
       "menu_data": menu_data(),
     File "/usr/local/lib/python3.6/site-packages/superset/views/base.py", line 200, in menu_data
       menu = appbuilder.menu.get_data()
     File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/menu.py", line 62, in get_data
       allowed_menus = current_app.appbuilder.sm.get_user_menu_access(
   AttributeError: 'SupersetSecurityManager' object has no attribute 'get_user_menu_access'
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org