Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDM Pro - 500 Server Error #705

Open
luthes opened this issue Apr 24, 2024 · 1 comment
Open

UDM Pro - 500 Server Error #705

luthes opened this issue Apr 24, 2024 · 1 comment

Comments

@luthes
Copy link

luthes commented Apr 24, 2024

It seems like there might have been change in the API... maybe? I'm not able to connect with the Unpoller Docker image to my UDM Pro.

Logs:

2024/04/25 06:33:49 [INFO] Loading Configuration File: /etc/unpoller/up.conf
2024/04/25 06:33:49 [INFO] UniFi Poller v2.11.2 Starting Up! PID: 1
2024/04/25 06:33:49 [ERROR] Controller 1 of 1 Auth or Connection Error, retrying: unifi controller: (user: unpoller
): https://192.168.8.1/api/auth/login (status: 500 Internal Server Error): authentication failed
2024/04/25 06:33:49 [INFO] Prometheus is enabled
2024/04/25 06:33:49 [INFO] InfluxDB enabled
2024/04/25 06:33:49 [INFO] Poller->InfluxDB started, version: 1, interval: 30s, dp: false, db: unifi, url: http://127.0.0.1:8086, bucket: , org:
2024/04/25 06:33:49 [INFO] Prometheus exported at http://0.0.0.0:9130/ - namespace: unpoller

I am, however, able to curl the same path (with the same user info):

curl --insecure -X POST -H "Content-Type: application/json" https://192.168.8.1/api/auth/login --data '{"username":"unpoller", "password":"somepassword"}

And get a response:

{
  "id": "9b11e83b-3911-43f1-a155-1a6f8c3a66f8",
  "unique_id": "9b11e83b-3911-43f1-a155-1a6f8c3a66f8",
  "first_name": "unpoller",
  "last_name": " ",
  "alias": "",
  "full_name": "unpoller  ",
  "email": "",
  "user_email": "",
  "radius_username": "",
  "email_status": "UNVERIFIED",
  "email_is_null": true,
  "phone": "",
  "avatar_relative_path": "",
  "avatar_rpath2": "",
  "avatar_encoded": "",
  "status": "ACTIVE",
  "employee_number": "",
  "create_time": 1713998473,
  "extras": {},
  "username": "unpoller",
  "local_account_exist": true,
  "password_revision": 1713998473,
  "only_ui_account": false,
  "only_local_account": true,
  "sso_account": "",
  "sso_uuid": "",
  "sso_username": "",
  "sso_picture": "",
  "uid_sso_id": "",
  "uid_sso_account": "",
  "uid_account_status": "",
  "groups": [
    {
      "unique_id": "51dd0597-c11e-49a4-9981-e631f21664cc",
      "name": "UDM-Pro",
      "up_id": "",
      "up_ids": null,
      "system_name": "UDM-Pro",
      "create_time": "2024-02-21T16:40:58-08:00"
    }
  ],
  "roles": [
    {
      "unique_id": "d9b0bf19-5efd-4074-b195-622d6978c5ef",
      "name": "role_private_1713998471",
      "system_role": false,
      "system_key": "custom_administrator_cf9b0787-7bb8-4941-8f3a-fab5fddee185",
      "level": 5,
      "create_time": "2024-04-24T15:41:13-07:00",
      "update_time": "2024-04-24T15:41:13-07:00",
      "is_private": true
    }
  ],
  "permissions": {
    "network.management": [
      "readonly"
    ],
    "system.management.user": [
      "readonly"
    ]
  },
  "scopes": [
    "view:wifi",
    "view:vpn",
    "view:user",
    "view:unifi-os:user",
    "view:talk",
    "view:systemlog",
    "view:settings",
    "view:role",
    "view:permission",
    "view:os-menu:user",
    "view:os-menu:system-log",
    "view:os-menu:storage",
    "view:os-menu:map",
    "view:os-menu:devices",
    "view:os-menu:about",
    "view:organization_info",
    "view:group",
    "view:controller:network",
    "view:app:users",
    "view:app:settings",
    "view:access.policy",
    "view:access.pin_code",
    "view:access.nfc_card",
    "view:access.dashboard",
    "systemlog:user",
    "systemlog:system",
    "systemlog:network",
    "systemlog:location",
    "systemlog:connect",
    "systemlog:access",
    "read:network-site:all",
    "read:network-site:65d68211ba8f0776c60dd410",
    "notify:user"
  ],
  "cloud_access_granted": false,
  "update_time": 1713998473,
  "need_popup_ids_introduce": true,
  "avatar": null,
  "nfc_token": "",
  "nfc_display_id": "",
  "nfc_card_type": "",
  "nfc_card_status": "",
  "invalid_wg_ip": false,
  "invitation": null,
  "role": "custom",
  "roleId": "d9b0bf19-5efd-4074-b195-622d6978c5ef",
  "isOwner": false,
  "isSuperAdmin": false,
  "isMember": false,
  "maskedEmail": "",
  "accessMask": 1088,
  "permissionMask": 0,
  "deviceToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI0NTU5MjMwZC1jNDk0LTQ2MGQtOWMyNi03MDU0NjEzOTA1MjgiLCJpYXQiOjE3MTM5OTg1NDksImlzcyI6IlVMUC1HTyIsInVzZXJfaWQiOiI5YjExZTgzYi0zOTExLTQzZjEtYTE1NS0xYTZmOGMzYTY2ZjgifQ.jaVhnPIRVmGoFP1c2lE0jGegf0BiWp80Gt7uIm6cxxU",
  "ssoAuth": {}
}

User set up here. I'm not sure if maybe the permissions have changed.
image

I saw in another similar issue that there might be some sites scopes needed, and I don't see those in the JSON scopes that I have here, but am unsure how to edit that, or if that's even possible.

@davidnewhall
Copy link
Member

Your controller is returning a 500 for an auth request. That seems to be a bug in the api. I think the last time I saw someone with this issue, they wound up factory resetting their controller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants