Skip to content

Exception in thread "main" AuthenticationException{message=Unauthorized, status=401} #741

@jianke221

Description

@jianke221

i,please help me,I'm new to openstack and face a question and i don't know how to solve it.

program as below

public class Openstack4J {
public static void main(String agrs[]){
String domainIdentifier = "821bc14bee664077897ab4f54f029106";
OSClientV3 os = OSFactory.builderV3()
.endpoint("http://192.168.252.1:5000/v3")
.credentials("admin", "secret", Identifier.byName("admin"))
.scopeToProject(Identifier.byId(domainIdentifier))
.authenticate();
List<? extends SwiftContainer> containers = os.objectStorage().containers().list();
for (SwiftContainer currentContainer : containers) {
System.out.println(currentContainer.getName());
}
}
}

and i use Identity Service (Keystone) V3 ,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions