openbmc / bmcweb

A do everything Redfish, KVM, GUI, and DBus webserver for OpenBMC
Apache License 2.0
154 stars 131 forks source link

BMC Web builds but doesn't run #210

Closed paulnegz closed 3 years ago

paulnegz commented 3 years ago

Bug terminate called after throwing an instance of 'boost::wrapexcept' what(): assign: Bad file descriptor Aborted

Environment OpenBMC platform on Ubuntu focal OpenBMC current master branch?

To Reproduce Steps to reproduce the behavior: Ran sudo ./bmcweb Similar to #148

edtanous commented 3 years ago

Do you have a valid dbus configuration on your system? One source of this exception is when bmcweb can't connect to dbus on startup.

paulnegz commented 3 years ago

Do you have a valid dbus configuration on your system? One source of this exception is when bmcweb can't connect to dbus on startup.

yeah. I found out it was a permissions issue. However, when I try to make redfish request to all API's that aren't whitelisted I get an internal service error. I tried disabling authentication in the meson build but it still required log in credentials

paulnegz commented 3 years ago

error trace

edtanous commented 3 years ago

Have you installed bmcweb, or just run it from the build folder? Based on your error, I'm assuming the later. There are pam configurations that the install script needs for authentication to work. Alternatively you can just disable authentication altogether, but you haven't provided a lot of detail on what you're trying to accomplish, so I'm a little at a loss for how to help you more.

paulnegz commented 3 years ago

So I ran the build script build_x86.sh that created a builddir and inside of that directory I try to run ./bmcweb. I am able to make redfish request to whitelisted urls.

paulnegz commented 3 years ago

whitelist

edtanous commented 3 years ago

You need to run make/ninja install and restart PAM before pam will work on your machine. Yes, whitelisted urls will work just fine because they don't require any authentication.

paulnegz commented 3 years ago

yeah, I just mentioned whitelisted urls working fine because I don't think it's a problem with the installation of bmcweb. I did run ninja install. installBMC

edtanous commented 3 years ago

That last file (installed into /etc/pam.d) is usually the one that causes this problem. There's likely some incompatibility with your machines version of PAM. As an easy first step, you might try compiling bmcweb with logging enabled to see the exact return code PAM is giving you, but I suspect you'll need to debug some. If I had to guess, there's something messed up with your redfish group.

paulnegz commented 3 years ago

should the redfish group be set to root? I already have logging enabled loggin