All of lore.kernel.org
 help / color / mirror / Atom feed
* Infinite redirect.
@ 2020-07-27 19:01 Mike Jones
  2020-07-27 19:09 ` Ed Tanous
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Jones @ 2020-07-27 19:01 UTC (permalink / raw)
  To: openbmc

[-- Attachment #1: Type: text/plain, Size: 869 bytes --]

I need help debugging an infinite redirect.

Using tag 2.8.0

I built meta-phosphor with raspberrypi4. See https://github.com/Proclivis/conf-meta-rasberrypi-evb.git

I setup a host entry on my ubuntu laptop in /etc/hosts

10.0.1.72 bmc

Then with firefox use url

https://bmc:18080

I get a redirect to 

https://bmc:18080/#/login?next=%2F

Which also redirects again.

bmcweb is not sending a cookie on the first request.

On the target, token_authorization_middleware.hpp:187 is failing the cookie authorization, probably because Firefox is not sending back the cookie it never received.

There are two failed services not running:

obmc-phosphor-sysd.service
start-ipkvm-.service

I assume these would not interfere with something as basic as cookies.

Is there something I need to configure on the target?

Mike

Sent from my iPad

[-- Attachment #2: Type: text/html, Size: 1465 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Infinite redirect.
  2020-07-27 19:01 Infinite redirect Mike Jones
@ 2020-07-27 19:09 ` Ed Tanous
  2020-07-27 23:06   ` Mike
  0 siblings, 1 reply; 5+ messages in thread
From: Ed Tanous @ 2020-07-27 19:09 UTC (permalink / raw)
  To: Mike Jones; +Cc: OpenBMC Maillist

On Mon, Jul 27, 2020 at 12:03 PM Mike Jones <proclivis@gmail.com> wrote:
>
> I need help debugging an infinite redirect.

Without reading the rest of your email, there is a 95% chance that
this means you didn't include phosphor-webui component in your build.
It is a known "bug" that has bit several people, and I've been meaning
to fix it so it at least gives you some better error and/or at least
doesn't redirect, but architecturally it breaks some weird boundaries
a little bit (the login routes have to be aware of which other routes
have been registered, which imposes an unintended ordering on the
route handler) , and I've just never had the chance.

>
> Using tag 2.8.0
>
> I built meta-phosphor with raspberrypi4. See https://github.com/Proclivis/conf-meta-rasberrypi-evb.git
>
> I setup a host entry on my ubuntu laptop in /etc/hosts
>
> 10.0.1.72 bmc
>
> Then with firefox use url
>
> https://bmc:18080
>
> I get a redirect to
>
> https://bmc:18080/#/login?next=%2F
>
> Which also redirects again.
>
> bmcweb is not sending a cookie on the first request.

Nor should it.  You're not logged in yet, nor have you given valid
login credentials.  The redirect is trying to move you to the webui,
which can then present a pretty login screen.  Unfortunately the webui
doesn't exist, so you hit another redirect.

>
> On the target, token_authorization_middleware.hpp:187 is failing the cookie authorization, probably because Firefox is not sending back the cookie it never received.
>
> There are two failed services not running:
>
> obmc-phosphor-sysd.service
> start-ipkvm-.service

Those should be irrelevant to this issue.

>
> I assume these would not interfere with something as basic as cookies.
>
> Is there something I need to configure on the target?

See above.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Infinite redirect.
  2020-07-27 19:09 ` Ed Tanous
@ 2020-07-27 23:06   ` Mike
  2020-07-27 23:11     ` Ed Tanous
  0 siblings, 1 reply; 5+ messages in thread
From: Mike @ 2020-07-27 23:06 UTC (permalink / raw)
  To: Ed Tanous; +Cc: OpenBMC Maillist

Ed,

That fixed it.

Committed to the repo below.

Still fails to start the service without /var/log/redfish

Adding -DBMCWEB_ENABLE_REDFISH_DBUS_LOG=ON will fix it. Otherwise someone might consider modifying event_service_manager.hpp to create the file when missing.

 I still can’t l ssh to port 2200, but my goal is to add pmbus sensors and the webui will do for that.

Anyone that wants to get raspberrypi4 running can use the repo below and it’s Readme. It will get it compiled and the webui up. Mainly is just working config files and a readme with every command I used including making the image.

Sent from my iPhone

> On Jul 27, 2020, at 1:09 PM, Ed Tanous <ed@tanous.net> wrote:
> 
> On Mon, Jul 27, 2020 at 12:03 PM Mike Jones <proclivis@gmail.com> wrote:
>> 
>> I need help debugging an infinite redirect.
> 
> Without reading the rest of your email, there is a 95% chance that
> this means you didn't include phosphor-webui component in your build.
> It is a known "bug" that has bit several people, and I've been meaning
> to fix it so it at least gives you some better error and/or at least
> doesn't redirect, but architecturally it breaks some weird boundaries
> a little bit (the login routes have to be aware of which other routes
> have been registered, which imposes an unintended ordering on the
> route handler) , and I've just never had the chance.
> 
>> 
>> Using tag 2.8.0
>> 
>> I built meta-phosphor with raspberrypi4. See https://github.com/Proclivis/conf-meta-rasberrypi-evb.git
>> 
>> I setup a host entry on my ubuntu laptop in /etc/hosts
>> 
>> 10.0.1.72 bmc
>> 
>> Then with firefox use url
>> 
>> https://bmc:18080
>> 
>> I get a redirect to
>> 
>> https://bmc:18080/#/login?next=%2F
>> 
>> Which also redirects again.
>> 
>> bmcweb is not sending a cookie on the first request.
> 
> Nor should it.  You're not logged in yet, nor have you given valid
> login credentials.  The redirect is trying to move you to the webui,
> which can then present a pretty login screen.  Unfortunately the webui
> doesn't exist, so you hit another redirect.
> 
>> 
>> On the target, token_authorization_middleware.hpp:187 is failing the cookie authorization, probably because Firefox is not sending back the cookie it never received.
>> 
>> There are two failed services not running:
>> 
>> obmc-phosphor-sysd.service
>> start-ipkvm-.service
> 
> Those should be irrelevant to this issue.
> 
>> 
>> I assume these would not interfere with something as basic as cookies.
>> 
>> Is there something I need to configure on the target?
> 
> See above.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Infinite redirect.
  2020-07-27 23:06   ` Mike
@ 2020-07-27 23:11     ` Ed Tanous
  2020-07-27 23:27       ` Mike
  0 siblings, 1 reply; 5+ messages in thread
From: Ed Tanous @ 2020-07-27 23:11 UTC (permalink / raw)
  To: Mike; +Cc: OpenBMC Maillist

I had a reply to your other email in my drafts that I forgot to send.

-Ed

On Mon, Jul 27, 2020 at 4:06 PM Mike <proclivis@gmail.com> wrote:
>
> Ed,
>
> That fixed it.
>
> Committed to the repo below.
>
> Still fails to start the service without /var/log/redfish

Make sure you have this revert in your tree:
https://github.com/openbmc/bmcweb/commit/7f4eb5887f9a52a2832ee9b6e06749575903128a

If it still doesn't work, there's something that's a bigger problem
than I thought.

>
> Adding -DBMCWEB_ENABLE_REDFISH_DBUS_LOG=ON will fix it. Otherwise someone might consider modifying event_service_manager.hpp to create the file when missing.
>
>  I still can’t l ssh to port 2200, but my goal is to add pmbus sensors and the webui will do for that.

I thought by default we were on normal port 22, not 2200.  Maybe you
have a slightly different config.

>
> Anyone that wants to get raspberrypi4 running can use the repo below and it’s Readme. It will get it compiled and the webui up. Mainly is just working config files and a readme with every command I used including making the image.
>

If you are able, consider opening these as patches against
meta-phosphor to get it building again on mainline.  (note, I haven't
actually looked at the repo yet, but I suspect there were some recipe
edits?)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Infinite redirect.
  2020-07-27 23:11     ` Ed Tanous
@ 2020-07-27 23:27       ` Mike
  0 siblings, 0 replies; 5+ messages in thread
From: Mike @ 2020-07-27 23:27 UTC (permalink / raw)
  To: Ed Tanous; +Cc: OpenBMC Maillist

Ed,

The repo is only config, but some of it could be moved into existing layers. Being new here, I’ll let someone with experience review it and guide me.

I still have yocto vertigo! All the loose coupling is crazy as bad as Verilog UVM test benches.

I’m longing for a good Haskel project where I feel more grounded 😀

Port 22 is a general linux login. 2200 should be a management console. It may require adding a new user. Running the console from a normal shell fails to. So I believe it is all an authentication or user setup issue.

Mike 

Sent from my iPhone

> On Jul 27, 2020, at 5:11 PM, Ed Tanous <ed@tanous.net> wrote:
> 
> I had a reply to your other email in my drafts that I forgot to send.
> 
> -Ed
> 
>> On Mon, Jul 27, 2020 at 4:06 PM Mike <proclivis@gmail.com> wrote:
>> 
>> Ed,
>> 
>> That fixed it.
>> 
>> Committed to the repo below.
>> 
>> Still fails to start the service without /var/log/redfish
> 
> Make sure you have this revert in your tree:
> https://github.com/openbmc/bmcweb/commit/7f4eb5887f9a52a2832ee9b6e06749575903128a
> 
> If it still doesn't work, there's something that's a bigger problem
> than I thought.
> 
>> 
>> Adding -DBMCWEB_ENABLE_REDFISH_DBUS_LOG=ON will fix it. Otherwise someone might consider modifying event_service_manager.hpp to create the file when missing.
>> 
>> I still can’t l ssh to port 2200, but my goal is to add pmbus sensors and the webui will do for that.
> 
> I thought by default we were on normal port 22, not 2200.  Maybe you
> have a slightly different config.
> 
>> 
>> Anyone that wants to get raspberrypi4 running can use the repo below and it’s Readme. It will get it compiled and the webui up. Mainly is just working config files and a readme with every command I used including making the image.
>> 
> 
> If you are able, consider opening these as patches against
> meta-phosphor to get it building again on mainline.  (note, I haven't
> actually looked at the repo yet, but I suspect there were some recipe
> edits?)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-27 23:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 19:01 Infinite redirect Mike Jones
2020-07-27 19:09 ` Ed Tanous
2020-07-27 23:06   ` Mike
2020-07-27 23:11     ` Ed Tanous
2020-07-27 23:27       ` Mike

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.