Git Product home page Git Product logo

Comments (14)

dan-m-joh avatar dan-m-joh commented on August 22, 2024

Is the redfish "service" enabled for this user?
Just because you can login to the BMC with this user/password does not mean that redfish also works.

Just a though...

from redfish-mockup-creator.

wushuzh avatar wushuzh commented on August 22, 2024

I think redfish is enabled.

Also this is the only user available on this server. This very "admin" user belongs to "gAdministrator" group with highest privillieges.

Maybe I can try with the tool like postman to check the redfish access ?

Any other suggestion ?

from redfish-mockup-creator.

dan-m-joh avatar dan-m-joh commented on August 22, 2024

I would still check that the user has "redfish" permission.
I assume you are using LDAP-authentication as you say the user belongs to the gAdministrator group.
Login in using the web-interface and navigate to Configuration -> LDAP, Scroll down to the last part and check that "redfish" is enabled (green) for that group.
We only have Local-Users, but it looks almost the same:
image

from redfish-mockup-creator.

mraineri avatar mraineri commented on August 22, 2024

@dan-m-joh is correct; the first thing would be to try checking that Redfish is enabled. You could also attempt to access Redfish in a browser or Postman to see if it's successful there.

I think to help with some of these types of issues that are coming up, I'll be adding the debugging capabilities to get traces of the library to the tool for a post-mortem.

from redfish-mockup-creator.

mraineri avatar mraineri commented on August 22, 2024

@wushuzh I created the branch "Add-Library-Trace-Support" to capture what's going on. If you run the tool with the newly added --trace option in that branch, it will capture all HTTP traffic between the tool and the service.

from redfish-mockup-creator.

wushuzh avatar wushuzh commented on August 22, 2024

I just pulled the latest docker image and tried.

I did not see more detail trace info, is it the correct way to use the tool ?

# docker run --rm --user="$(id -u):$(id -g)" -v "/root/redfish-debug/":/mockup dmtf/redfish-mockup-creator:latest -u admin -p "mypassword" -r myipv6  -S --trace
Redfish Mockup Creator, Version 1.1.2
Address: https://myipv6  
Full Output Path: /mockup
Description:
Starting mockup creation...
ERROR: Aborting; could not authenticate with the Redfish service:

Here is screenshot of BMC setting for redfish. It's enabled.

1631926034(1)

from redfish-mockup-creator.

wushuzh avatar wushuzh commented on August 22, 2024

There is another application which is accessing the server redfish service periodically with the same user and password.

Based on the audit log available from BMC Web GUI, our own application works well.

1631927911(1)

from redfish-mockup-creator.

mraineri avatar mraineri commented on August 22, 2024

@wushuzh you will need to look in the rf-mockup-create.log file in the output directory for the additional trace info.

from redfish-mockup-creator.

wushuzh avatar wushuzh commented on August 22, 2024

Thanks. I pasted the header of the log as following.

It seems that the redfish service did not response to the request of /redfish/v1/.

Does "/redfish/v1/" need the authentication ?

     1  2021-09-22 08:50:49,992 - redfish.rest.v1 - DEBUG - HTTP REQUEST: GET
     2          PATH: /redfish/v1/
     3          BODY: None
     4  2021-09-22 08:50:49,992 - redfish.rest.v1 - INFO - Attempt 1 of /redfish/v1/
     5  2021-09-22 08:50:49,996 - redfish.rest.v1 - INFO - Retrying /redfish/v1/ [[Errno -2] Name or service not known]
     6  2021-09-22 08:50:50,998 - redfish.rest.v1 - DEBUG - HTTP REQUEST: GET
     7          PATH: /redfish/v1/
     8          BODY: None
     9  2021-09-22 08:50:50,998 - redfish.rest.v1 - INFO - Attempt 2 of /redfish/v1/
    10  2021-09-22 08:50:50,999 - redfish.rest.v1 - INFO - Retrying /redfish/v1/ [[Errno -2] Name or service not known]
    11  2021-09-22 08:50:52,000 - redfish.rest.v1 - DEBUG - HTTP REQUEST: GET
    12          PATH: /redfish/v1/
    13          BODY: None
    14  2021-09-22 08:50:52,001 - redfish.rest.v1 - INFO - Attempt 3 of /redfish/v1/
    15  2021-09-22 08:50:52,001 - redfish.rest.v1 - INFO - Retrying /redfish/v1/ [[Errno -2] Name or service not known]
    16  2021-09-22 08:50:53,003 - redfish.rest.v1 - DEBUG - HTTP REQUEST: GET
    17          PATH: /redfish/v1/
    18          BODY: None
... up to 11 times retrying ...

from redfish-mockup-creator.

mraineri avatar mraineri commented on August 22, 2024

Yes, /redfish/v1/ is a mandatory URI and is used for service discovery. It's also needed to find all supported resources in the service, and find the session collection in order to log in.

from redfish-mockup-creator.

mraineri avatar mraineri commented on August 22, 2024

Are you able to access /redfish/v1/ from your browser? Is there a timeout message, HTTP response of some sort, or other trace after all of the retries? The message "Name or service not known" indicates to me that the service probably is not even reachable by the tool. Is some sort of proxy required to access the service?

from redfish-mockup-creator.

wushuzh avatar wushuzh commented on August 22, 2024

I don't think there is proxy needed from my host to target server. (Any good way to confirm this ?)

Anyway, I just tried with curl with the same url, It seems that curl can retrieve the content without user/pass without much delay (or timeout).

Is this issue related to ipv6 address ?

# curl --globoff --insecure https://[ipv6]/redfish/v1 | json_reformat
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1036    0  1036    0     0    766      0 --:--:--  0:00:01 --:--:--   767
{
    "@odata.context": "/redfish/v1/$metadata#ServiceRoot.ServiceRoot",
    "@odata.id": "/redfish/v1",
    "@odata.type": "#ServiceRoot.v1_5_1.ServiceRoot",
    "Id": "RootService",
    "Name": "Root Service",
    "Vendor": "ZTE",
    "Product": "R5930G1",
    "RedfishVersion": "1.5.0",
    "UUID": "F02F7496-2615-E603-0010-DF2C40F954CB",
    "Systems": {
        "@odata.id": "/redfish/v1/Systems"
    },
    "Chassis": {
        "@odata.id": "/redfish/v1/Chassis"
    },
    "Managers": {
        "@odata.id": "/redfish/v1/Managers"
    },
    "SessionService": {
        "@odata.id": "/redfish/v1/SessionService"
    },
    "AccountService": {
        "@odata.id": "/redfish/v1/AccountService"
    },
    "EventService": {
        "@odata.id": "/redfish/v1/EventService"
    },
    "UpdateService": {
        "@odata.id": "/redfish/v1/UpdateService"
    },
    "JsonSchemas": {
        "@odata.id": "/redfish/v1/JsonSchemas"
    },
    "CompositionService": {
        "@odata.id": "/redfish/v1/CompositionService"
    },
    "TelemetryService": {
        "@odata.id": "/redfish/v1/TelemetryService"
    },
    "Links": {
        "Sessions": {
            "@odata.id": "/redfish/v1/SessionService/Sessions"
        }
    }
}

from redfish-mockup-creator.

mraineri avatar mraineri commented on August 22, 2024

It's entirely possible it's IPv6 related; I haven't tried using the tool (and Redfish library) with an IPv6 target before. I'll see if I can find a device on IPv6 and do some testing.

from redfish-mockup-creator.

mraineri avatar mraineri commented on August 22, 2024

Closing; no updates to further debug this. Changes in the library were made since this issue to leverage requests instead of replicating the functionality, which should address IPv6-related issues.

If you're using the latest version of the library and still hit this issue, please reopen.

from redfish-mockup-creator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.