AMC Enterprise Edition authorization error: can't connect to server (AER-3881)

I have a doubts with an enterprise AMC version.

I set security enabled and have created new user with all roles enabled, when I try to log in through aql or php client - my user passes authorization as well. But when I try to connect through AMC - I geting an error - Can’t connect to server. I read manual http://www.aerospike.com/docs/amc/troubleshoot/ and tried to set access-address - but server still returning can’t connect to server error message. Please help.

Are you getting a prompt to log into AMC?

I get the login prompt like this http://joxi.ru/XYmEX6PIoWJEr6 (server localhost, port 3000, and not only for admin user)

Hi, Can you please provide us below details:

  • Log file (/var/log/amc/error.log)
  • AMC Version
  • Aerospike Version
  • Is bcrypt installed on the system where amc is running?

AMC Version: 3.6.0

Aerospike version: Aerospike Enterprise Edition build 3.5.9

contents from /var/log/amc/error.log : http://joxi.ru/dp27DXNh7b4xA7

2015-05-28 12:10:08 [379] [ERROR] Error handling request
Traceback (most recent call last):
  File "/opt/amc/server/site-packages/gunicorn/workers/async.py", line 45, in handle
    self.handle_request(listener, req, client, addr)
  File "/opt/amc/server/site-packages/gunicorn/workers/async.py", line 93, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/opt/amc/server//site-packages/flask/app.py", line 1701, in __call__
    return self.wsgi_app(environ, start_response)
  File "/opt/amc/server//site-packages/flask/app.py", line 1689, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/opt/amc/server//site-packages/flask/app.py", line 1687, in wsgi_app
    response = self.full_dispatch_request()
  File "/opt/amc/server//site-packages/flask/app.py", line 1360, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/opt/amc/server//site-packages/flask/app.py", line 1358, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/amc/server//site-packages/flask/app.py", line 1344, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/opt/amc/server/flaskapp.py", line 316, in get_cluster_id
    password=cl.hashpassword(str(request.form['password'])))
  File "/opt/amc/server/utilities/cluster_manager.py", line 167, in get_cluster_info
    cluster = self.create_cluster(node_address, user=user, password=password)
  File "/opt/amc/server/helpers/synchronizing.py", line 33, in _synchronizer
    return func(self, *args, **kwargs)
  File "/opt/amc/server/utilities/cluster_manager.py", line 56, in create_cluster
    return cluster.Cluster(ip, port, user=user, password=password)
  File "/opt/amc/server/models/cluster.py", line 85, in __init__
    self.update_user_roles(user)
  File "/opt/amc/server/models/cluster.py", line 749, in update_user_roles
    user_info["roles"] = user_obj.get_roles(str(self._ip), str(self._port))
  File "/opt/amc/server/models/user.py", line 115, in get_roles
    self._fetch_roles(ip, port)
  File "/opt/amc/server/models/user.py", line 110, in _fetch_roles
    user=self.get_id(), password=self.get_password())
  File "/opt/amc/server/helpers/caching.py", line 45, in decorator
    value = fn(*args, **kwargs)
  File "/opt/amc/server/libs/base.py", line 493, in get_cluster_userroles
    user = get_citrusleaf_cluster_user(ip, port, user=user, password=password, sock=sock)
  File "/opt/amc/server/helpers/caching.py", line 45, in decorator
    value = fn(*args, **kwargs)
  File "/opt/amc/server/libs/base.py", line 516, in get_citrusleaf_cluster_user
    user_data = cl.queryUser(citrusleaf_cluster, user)
  File "/opt/amc/server/libs/citrusleaf.py", line 1812, in queryUser
    status, users = readUsers(cluster, send_buf)
  File "/opt/amc/server/libs/citrusleaf.py", line 1761, in readUsers
    sock = cluster.getConnection()
  File "/opt/amc/server/libs/citrusleaf.py", line 555, in getConnection
    c = host.getConnection()
  File "/opt/amc/server/libs/citrusleaf.py", line 430, in getConnection
    if s.connect() == True:
  File "/opt/amc/server/libs/citrusleaf.py", line 256, in connect
    self.s.connect(self.host_obj.sockaddr[0])
  File "/opt/amc/server/site-packages/eventlet/greenio.py", line 196, in connect
    if socket_connect(fd, address):
  File "/opt/amc/server/site-packages/eventlet/greenio.py", line 35, in socket_connect
    err = descriptor.connect_ex(address)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
TypeError: an integer is required

apt-cache policy python-bcrypt

python-bcrypt:
  Installed: 0.4-1ubuntu2
  Candidate: 0.4-1ubuntu2
  Version table:
 *** 0.4-1ubuntu2 0
        500 http://ru.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status

Perhaps there is something wrong in python on server

Hi,

We checked again for the above mentioned setup of Aerospike and AMC but everything works smoothly. May be there is something wrong with user-role-privileges mapping or with python on server. Could you please restart AMC once and check if it works ? Also if you could provide us user-role-privileges mapping, then that would be great.

Thanks,

Aditi

Hey, do you mind stating the version of Python and which aerospike client you have (pip list | grep aero)? Also, a code sample of the script would help in debugging this.

@rbotzer

The problem @netstar is having is with AMC, not the Python client. AMC uses citrusleaf.py.

Damn, my fingers were itching for a new JIRA ticket. I’m sure something else will come along :stuck_out_tongue_winking_eye:

1 Like

Hi

We reproduced this issue in one of our instance, we fixed this issue and will add fix in next AMC release.

Thanks.

1 Like

Thank you! please let me know when this release will be able to download.

@netstar,

We will update this post once we have an AMC release that fixes this issue.

Once we have a new AMC release, we will announce it on the AMC download page on our website.

We also post all new release announcements in the Announcements section of the forum. To watch for new announcements, you may customize your forum preferences by adding “Announcements” to your watched categories. To access your forum preferences, simply click on your profile icon at the top right of this page and click on “Preferences” on the drop-down menu.

For quick and effortless notification about AMC releases (and any Aerospike releases in general), follow me on Twitter at @Mnemaudsyne, Aerospike’s Community Manager account; I tweet out new releases as they occur. For all notifications about Aerospike, you can follow our company on Twitter at @Aerospikedb.

@netstar,

The issue has been filed as AER-3881 and once resolved, it will be mentioned in the release notes.

thanks, samir

1 Like