I'm experiencing the a similar issue with a fresh install of Plone and adding pas.plugins.ldap. My LDAP variables are the same as used on other Linux boxes which authenticate with AD without issue.
I don't see anything about an integer, however.
I just see "ERROR: Exception in Users" on the web interface and the following appears on the Plone server:
2017-03-29 13:45:35 ERROR pas.plugins.ldap Non-LDAP error while connection test!
Traceback (most recent call last):
File "/opt/plone/buildout-cache/eggs/pas.plugins.ldap-1.5.1-py2.7.egg/pas/plugins/ldap/properties.py", line 153, in connection_test
ugm.users.iterkeys().next()
StopIteration
My guess is that your ldap server does not contain any users.
ugm.users.iterkeys().next()
A StopIteration exception is thrown by iterators when there a no items (left) to be consumed by a .next() call.
In this case it implies that users.iterkeys() has no users at all.