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

**URL:** https://discuss.aerospike.com/t/amc-enterprise-edition-authorization-error-cant-connect-to-server-aer-3881/1311
**Category:** AMC
**Created:** [May 25, 2015, 7:57am UTC](https://discuss.aerospike.com/t/amc-enterprise-edition-authorization-error-cant-connect-to-server-aer-3881/1311 "2015-05-25T07:57:59Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![netstar](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/netstar/32/236_2.png) [@netstar](https://discuss.aerospike.com/u/netstar)
#### Post date: [May 25, 2015, 7:57am UTC](https://discuss.aerospike.com/t/amc-enterprise-edition-authorization-error-cant-connect-to-server-aer-3881/1311/1 "2015-05-25T07:57:59Z")

</div>

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/](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.

---

<div class="post-metadata">

### Author: ![kporter](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kporter/32/515_2.png) [@kporter](https://discuss.aerospike.com/u/kporter)
#### Post date: [May 26, 2015, 8:32pm UTC](https://discuss.aerospike.com/t/amc-enterprise-edition-authorization-error-cant-connect-to-server-aer-3881/1311/2 "2015-05-26T20:32:44Z")

</div>

Are you getting a prompt to log into AMC?

---

<div class="post-metadata">

### Author: ![netstar](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/netstar/32/236_2.png) [@netstar](https://discuss.aerospike.com/u/netstar)
#### Post date: [May 27, 2015, 7:25am UTC](https://discuss.aerospike.com/t/amc-enterprise-edition-authorization-error-cant-connect-to-server-aer-3881/1311/3 "2015-05-27T07:25:13Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Aditi\_Avalkar](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@Aditi\_Avalkar](https://discuss.aerospike.com/u/Aditi_Avalkar)
#### Post date: [May 27, 2015, 1:42pm UTC](https://discuss.aerospike.com/t/amc-enterprise-edition-authorization-error-cant-connect-to-server-aer-3881/1311/4 "2015-05-27T13:42:00Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![netstar](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/netstar/32/236_2.png) [@netstar](https://discuss.aerospike.com/u/netstar)
#### Post date: [May 28, 2015, 9:15am UTC](https://discuss.aerospike.com/t/amc-enterprise-edition-authorization-error-cant-connect-to-server-aer-3881/1311/5 "2015-05-28T09:15:48Z")

</div>

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](http://joxi.ru/dp27DXNh7b4xA7)

```auto
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

```auto
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

---

<div class="post-metadata">

### Author: ![Aditi\_Avalkar](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@Aditi\_Avalkar](https://discuss.aerospike.com/u/Aditi_Avalkar)
#### Post date: [June 2, 2015, 9:05am UTC](https://discuss.aerospike.com/t/amc-enterprise-edition-authorization-error-cant-connect-to-server-aer-3881/1311/6 "2015-06-02T09:05:21Z")

</div>

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

---

<div class="post-metadata">

### Author: ![rbotzer](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/rbotzer/32/2114_2.png) [@rbotzer](https://discuss.aerospike.com/u/rbotzer)
#### Post date: [June 2, 2015, 4:58pm UTC](https://discuss.aerospike.com/t/amc-enterprise-edition-authorization-error-cant-connect-to-server-aer-3881/1311/7 "2015-06-02T16:58:51Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![kporter](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kporter/32/515_2.png) [@kporter](https://discuss.aerospike.com/u/kporter)
#### Post date: [June 2, 2015, 5:09pm UTC](https://discuss.aerospike.com/t/amc-enterprise-edition-authorization-error-cant-connect-to-server-aer-3881/1311/8 "2015-06-02T17:09:44Z")

</div>

@rbotzer

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

---

<div class="post-metadata">

### Author: ![rbotzer](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/rbotzer/32/2114_2.png) [@rbotzer](https://discuss.aerospike.com/u/rbotzer)
#### Post date: [June 2, 2015, 5:25pm UTC](https://discuss.aerospike.com/t/amc-enterprise-edition-authorization-error-cant-connect-to-server-aer-3881/1311/9 "2015-06-02T17:25:59Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Aditi\_Avalkar](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@Aditi\_Avalkar](https://discuss.aerospike.com/u/Aditi_Avalkar)
#### Post date: [June 23, 2015, 5:36am UTC](https://discuss.aerospike.com/t/amc-enterprise-edition-authorization-error-cant-connect-to-server-aer-3881/1311/11 "2015-06-23T05:36:14Z")

</div>

Hi

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

Thanks.

---

<div class="post-metadata">

### Author: ![netstar](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/netstar/32/236_2.png) [@netstar](https://discuss.aerospike.com/u/netstar)
#### Post date: [June 25, 2015, 1:19pm UTC](https://discuss.aerospike.com/t/amc-enterprise-edition-authorization-error-cant-connect-to-server-aer-3881/1311/12 "2015-06-25T13:19:19Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Mnemaudsyne](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/mnemaudsyne/32/200_2.png) [@Mnemaudsyne](https://discuss.aerospike.com/u/Mnemaudsyne)
#### Post date: [June 25, 2015, 8:32pm UTC](https://discuss.aerospike.com/t/amc-enterprise-edition-authorization-error-cant-connect-to-server-aer-3881/1311/13 "2015-06-25T20:32:40Z")

</div>

@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](http://www.aerospike.com/download/amc) on our website.

We also post all new release announcements in the [Announcements section](https://discuss.aerospike.com/c/announcements) 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.

---

<div class="post-metadata">

### Author: ![samir](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@samir](https://discuss.aerospike.com/u/samir)
#### Post date: [June 29, 2015, 6:22am UTC](https://discuss.aerospike.com/t/amc-enterprise-edition-authorization-error-cant-connect-to-server-aer-3881/1311/14 "2015-06-29T06:22:14Z")

</div>

@netstar,

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

thanks, samir
