Log errors after update

Posted on
Fri May 01, 2020 4:23 pm
Ramias offline
Posts: 272
Joined: Nov 24, 2015

Log errors after update

Updated the plugin today to version 7.30.196.

UDM Pro.

Now getting these errors repeating in the logs:

Code: Select all
   uniFiAP Error                   Connection: in Line 3966 has error='meta'   Connection


Running this:

/usr/bin/curl --insecure -c /tmp/unifiCookie -H "Content-Type: application/json" --data '{"username": “xx", "strict": "False", "password": “xx"}' '192.168.0.1:443/api/auth/login'

returns this:
curl: (52) Empty reply from server

Any ideas? Thanks

Posted on
Sat May 02, 2020 7:17 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Log errors after update

1. It looks as if https:// is missing
2.
/usr/bin/curl --insecure -c /tmp/unifiCookie -H "Content-Type: application/json" --data '{"username": “xx", "strict": false, "password": “xx"}' '192.168.0.1:443/api/auth/login'
false is not a string and in json it is false not False.. while in python it is False, and if it is false you could drop it
try:
Code: Select all
/usr/bin/curl --insecure -c /tmp/unifiCookie -H "Content-Type: application/json" --data '{"username": “xx", "password": “xx"}'  'https://192.168.0.1:443/api/auth/login'

Sent from my iPhone using Tapatalk

Posted on
Sat May 02, 2020 9:48 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Log errors after update

and please try v .198

Posted on
Sat May 02, 2020 2:28 pm
Ramias offline
Posts: 272
Joined: Nov 24, 2015

Re: Log errors after update

Here is the curl syntax that works (straight from the log file the plugin creates:

/usr/bin/curl --insecure -c /tmp/unifiCookie -H "Content-Type: application/json" --data '{"username": "xx", "strict": true, "password": "xx"}' 'https://192.168.0.1:443/api/auth/login'

It works from the command line. Butthis is what the debug log shows with v .198.

Code: Select all
16:20:27 unifi-Report getting _id for AP AP_fc:ec:xx  /stat/device/fc:ec:xx
16:20:27 Connection: /usr/bin/curl --insecure -c /tmp/unifiCookie -H "Content-Type: application/json" --data '{"username": "xx", "strict": true, "password": "xx"}' 'https://192.168.0.1:443/api/auth/login'
2020-05-02 16:20:27.845   ERROR          Plugin.executeCMDOnController    Connection: in Line 3966 has error='meta'   Connection
16:20:27 unifi-Report getting _id for AP AP_fc:ec:xx  /stat/device/fc:ec:xx
16:20:27 Connection: /usr/bin/curl --insecure -c /tmp/unifiCookie -H "Content-Type: application/json" --data '{"username": "xx", "strict": true, "password": "xx"}' 'https://192.168.0.1:443/api/auth/login'
2020-05-02 16:20:28.048   ERROR          Plugin.executeCMDOnController    Connection: in Line 3966 has error='meta'   Connection
16:20:28 unifi-Report getting _id for AP AP_fc:ec:Xx  /stat/device/fc:ec:xx
16:20:28 Connection: /usr/bin/curl --insecure -c /tmp/unifiCookie -H "Content-Type: application/json" --data '{"username": "xx", "strict": true, "password": "xx"}' 'https://192.168.0.1:443/api/auth/login'
2020-05-02 16:20:28.257   ERROR          Plugin.executeCMDOnController    Connection: in Line 3966 has error='meta'   Connection

Posted on
Sat May 02, 2020 3:55 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Log errors after update

when you do the command on the command line, what does it return?
mine returns:
Code: Select all
{"meta":{"rc":"ok"},"data":[]}


and with my the cloudy key controller I need to do:
Code: Select all
/usr/bin/curl --insecure -c /tmp/unifiCookie -H "Content-Type: application/json" --data '{"username": "xx", "password": "xx"}' 'https://192.168.1.2:8443/api/login'
(strict:true is not needed.)

it seems that your does not have the "meta" key in the json.

Karl

Posted on
Sat May 02, 2020 6:28 pm
Ramias offline
Posts: 272
Joined: Nov 24, 2015

Re: Log errors after update

No Meta RC info; just json for the authentication. Looks like the error now only occurs on plugin start.

Code: Select all
{
  "unique_id": "XXX",
  "username": "XX",
  "first_name": "XX",
  "last_name": "XX",
  "full_name": "XX XX",
  "email": "",
  "email_status": "UNVERIFIED",
  "phone": "",
  "avatar": "",
  "avatar_relative_path": "",
  "status": "ACTIVE",
  "sso_account": "",
  "sso_uuid": "",
  "sso_username": "",
  "create_time": XX,
  "local_account_exist": true,
  "uid_sso_id": "",
  "uid_sso_account": "",
  "password_revision": XX,
  "extras": null,
  "nfc_token": "",
  "nfc_display_id": "",
  "update_time": XX,
  "groups": [],
  "roles": [
    {
      "unique_id": "XX",
      "name": "Xx",
      "system_role": true,
      "system_key": "XX",
      "level": 3
    }
  ],
  "permissions": {
    "network.management": [
      "admin"
    ]
  },
  "scopes": [
    "view:controller:network",
    "manage:controller:network"
  ],
  "cloud_access_granted": false,
  "id": "XX",
  "isOwner": false,
  "isSuperAdmin": false
}%

Posted on
Sat May 02, 2020 8:23 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Log errors after update

you have UDM-PRO?

I believe that is different for UDM and cloudKey controller they send back {meta:ok.....

will add both options., try: v .207

Karl

Posted on
Sun May 03, 2020 10:20 am
Ramias offline
Posts: 272
Joined: Nov 24, 2015

Re: Log errors after update

That did it. Thanks

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests