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

Can not load endpoints after login. #7

Closed
john5du opened this issue Jan 30, 2022 · 5 comments
Closed

Can not load endpoints after login. #7

john5du opened this issue Jan 30, 2022 · 5 comments
Labels
Bug Something isn't working

Comments

@john5du
Copy link

john5du commented Jan 30, 2022

Describe the bug
Can not load endpoints after login. Same issue after every attempt. It looks as if the results returned by the endpoints interface cannot be parsed.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Log in' page
  2. Enter the correct url, credentials.
  3. Click on 'Log in'
  4. See error

Expected behavior
A dashboard page of all endpoints after login.

Details:

  • Device: iPhone 11
  • OS: iOS 15.3
  • Harbour version v2.0.0#5
  • Portainer version 2.11.0

Additional context
In my portainer instance there are three endpoints :

Endpoints interface return :

[
  {
    "Id": 1,
    "Name": "hass.io",
    "Type": 1,
    "URL": "unix:///var/run/docker.sock",
    "GroupId": 1,
    "PublicURL": "",
    "TLSConfig": {
      "TLS": false,
      "TLSSkipVerify": false
    },
    "Extensions": [],
    "AzureCredentials": {
      "ApplicationID": "",
      "TenantID": "",
      "AuthenticationKey": ""
    },
    "TagIds": [],
    "Status": 1,
    "Snapshots": [
      {
        "Time": 1643508346,
        "DockerVersion": "20.10.9",
        "Swarm": false,
        "TotalCPU": 2,
        "TotalMemory": 2076291072,
        "RunningContainerCount": 14,
        "StoppedContainerCount": 0,
        "HealthyContainerCount": 0,
        "UnhealthyContainerCount": 0,
        "VolumeCount": 0,
        "ImageCount": 23,
        "ServiceCount": 0,
        "StackCount": 0,
        "DockerSnapshotRaw": {
          "Containers": null,
          "Volumes": null,
          "Networks": null,
          "Images": null,
          "Info": null,
          "Version": null
        },
        "NodeCount": 0
      }
    ],
    "UserAccessPolicies": {},
    "TeamAccessPolicies": {},
    "EdgeKey": "",
    "EdgeCheckinInterval": 5,
    "Kubernetes": {
      "Snapshots": [],
      "Configuration": {
        "UseLoadBalancer": false,
        "UseServerMetrics": false,
        "StorageClasses": [],
        "IngressClasses": [],
        "RestrictDefaultNamespace": false
      }
    },
    "ComposeSyntaxMaxVersion": "3.9",
    "SecuritySettings": {
      "allowBindMountsForRegularUsers": true,
      "allowPrivilegedModeForRegularUsers": true,
      "allowVolumeBrowserForRegularUsers": false,
      "allowHostNamespaceForRegularUsers": true,
      "allowDeviceMappingForRegularUsers": true,
      "allowStackManagementForRegularUsers": true,
      "allowContainerCapabilitiesForRegularUsers": true,
      "allowSysctlSettingForRegularUsers": true,
      "enableHostManagementFeatures": false
    },
    "LastCheckInDate": 0,
    "AuthorizedUsers": null,
    "AuthorizedTeams": null,
    "Tags": null
  },
  {
    "Id": 4,
    "Name": "cloud",
    "Type": 4,
    "URL": "http://127.0.0.1:0",
    "GroupId": 1,
    "PublicURL": "xxx.xxx",
    "TLSConfig": {
      "TLS": false,
      "TLSSkipVerify": false
    },
    "Extensions": [],
    "AzureCredentials": {
      "ApplicationID": "",
      "TenantID": "",
      "AuthenticationKey": ""
    },
    "TagIds": [],
    "Status": 1,
    "Snapshots": [
      {
        "Time": 1643450007,
        "DockerVersion": "20.10.12",
        "Swarm": false,
        "TotalCPU": 1,
        "TotalMemory": 2083811328,
        "RunningContainerCount": 4,
        "StoppedContainerCount": 1,
        "HealthyContainerCount": 0,
        "UnhealthyContainerCount": 0,
        "VolumeCount": 2,
        "ImageCount": 8,
        "ServiceCount": 0,
        "StackCount": 1,
        "DockerSnapshotRaw": {
          "Containers": null,
          "Volumes": null,
          "Networks": null,
          "Images": null,
          "Info": null,
          "Version": null
        },
        "NodeCount": 0
      }
    ],
    "UserAccessPolicies": {},
    "TeamAccessPolicies": {},
    "EdgeID": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxx",
    "EdgeKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "EdgeCheckinInterval": 5,
    "Kubernetes": {
      "Snapshots": [],
      "Configuration": {
        "UseLoadBalancer": false,
        "UseServerMetrics": false,
        "StorageClasses": [],
        "IngressClasses": [],
        "RestrictDefaultNamespace": false
      }
    },
    "ComposeSyntaxMaxVersion": "3.9",
    "SecuritySettings": {
      "allowBindMountsForRegularUsers": true,
      "allowPrivilegedModeForRegularUsers": true,
      "allowVolumeBrowserForRegularUsers": false,
      "allowHostNamespaceForRegularUsers": true,
      "allowDeviceMappingForRegularUsers": true,
      "allowStackManagementForRegularUsers": true,
      "allowContainerCapabilitiesForRegularUsers": true,
      "allowSysctlSettingForRegularUsers": true,
      "enableHostManagementFeatures": true
    },
    "LastCheckInDate": 1643508545,
    "AuthorizedUsers": null,
    "AuthorizedTeams": null,
    "Tags": null
  },
  {
    "Id": 5,
    "Name": "nas",
    "Type": 2,
    "URL": "tcp://192.168.2.225:9001",
    "GroupId": 1,
    "PublicURL": "192.168.2.225",
    "TLSConfig": {
      "TLS": true,
      "TLSSkipVerify": true
    },
    "Extensions": [],
    "AzureCredentials": {
      "ApplicationID": "",
      "TenantID": "",
      "AuthenticationKey": ""
    },
    "TagIds": [],
    "Status": 1,
    "Snapshots": [
      {
        "Time": 1643508346,
        "DockerVersion": "20.10.3",
        "Swarm": false,
        "TotalCPU": 2,
        "TotalMemory": 10272227328,
        "RunningContainerCount": 7,
        "StoppedContainerCount": 4,
        "HealthyContainerCount": 1,
        "UnhealthyContainerCount": 0,
        "VolumeCount": 1,
        "ImageCount": 11,
        "ServiceCount": 0,
        "StackCount": 0,
        "DockerSnapshotRaw": {
          "Containers": null,
          "Volumes": null,
          "Networks": null,
          "Images": null,
          "Info": null,
          "Version": null
        },
        "NodeCount": 0
      }
    ],
    "UserAccessPolicies": {},
    "TeamAccessPolicies": {},
    "EdgeKey": "",
    "EdgeCheckinInterval": 5,
    "Kubernetes": {
      "Snapshots": [],
      "Configuration": {
        "UseLoadBalancer": false,
        "UseServerMetrics": false,
        "StorageClasses": [],
        "IngressClasses": [],
        "RestrictDefaultNamespace": false
      }
    },
    "ComposeSyntaxMaxVersion": "3.9",
    "SecuritySettings": {
      "allowBindMountsForRegularUsers": true,
      "allowPrivilegedModeForRegularUsers": true,
      "allowVolumeBrowserForRegularUsers": false,
      "allowHostNamespaceForRegularUsers": true,
      "allowDeviceMappingForRegularUsers": true,
      "allowStackManagementForRegularUsers": true,
      "allowContainerCapabilitiesForRegularUsers": true,
      "allowSysctlSettingForRegularUsers": true,
      "enableHostManagementFeatures": false
    },
    "LastCheckInDate": 0,
    "AuthorizedUsers": null,
    "AuthorizedTeams": null,
    "Tags": null
  }
]
@rrroyal rrroyal added the Bug Something isn't working label Jan 30, 2022
@rrroyal
Copy link
Owner

rrroyal commented Jan 30, 2022

will try to fix today! noted!

@ExtremTechniker
Copy link

Hey. I'd dive deeper into it and it is the Portainer Edge Agent.
In your case its Type 4. (Which Version is running on it e.g. Kubernets or standard Docker).

I'd tested it with my Portainer with an Edge Agent to Kubernets and there is the type 7

So I think those types aren't supported yet.

@rrroyal
Copy link
Owner

rrroyal commented Mar 30, 2022

type 4 should be supported now - can you tell me more about type 7? i haven't found anything regarding it (even type 4 isn't documented 😕)

@john5du
Copy link
Author

john5du commented Mar 30, 2022

Thank you for the fix. In my environment, types 1, 2 and 4 now load endpoint correctly.image

@ExtremTechniker
Copy link

I have installed the Portainer Edge Agent on my VM running Docker with Kubernets and there i installed using the script provided by Portainer (https://downloads.portainer.io/portainer-ce211-edge-agent-setup.sh)

Attached is my endpoints as json if that will help you finding the bug
api_endpoints.json.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants