Reports Failing to process - undefined method allowed_to? for nil:NilClass

hi all,

I have setup a small POC env with foreman and puppet etc

Puppetmaster and Foreman are using the same mysql backend and running
on the same machine.

The puppet clients are successfully dropping off the reports as I can
see them in the logs and in the $REPORTSDIR when store is enabled.

The problem is, the reports fail to show on the foreman fronend…

I have checked the foreman logs and discovered this entry:

Processing ReportsController#create to yml (for x.x.x.x at 2011-12-02
17:01:53) [POST]
Parameters: {"format"=>"yml", "action"=>"create",
"controller"=>"reports", "report"=>"[FILTERED]"}
processing report for s0034sbl3814.x.x.x
Failed to process report for s0034sbl3814.x.x.x due to:undefined
method `allowed_to?' for nil:NilClass
Completed in 6ms (View: 0, DB: 2) | 500 Internal Server Error [http://
S0034SBL3814.x.x.x/reports/create?format=yml]

Cant figure out how to resolve it, any ideas?

Regards

Matt

> hi all,
>
> I have setup a small POC env with foreman and puppet etc
>
> Puppetmaster and Foreman are using the same mysql backend and running
> on the same machine.
>
> The puppet clients are successfully dropping off the reports as I can
> see them in the logs and in the $REPORTSDIR when store is enabled.
>
> The problem is, the reports fail to show on the foreman fronend…
>
> I have checked the foreman logs and discovered this entry:
>
>
> Processing ReportsController#create to yml (for x.x.x.x at 2011-12-02
> 17:01:53) [POST]
> Parameters: {"format"=>"yml", "action"=>"create",
> "controller"=>"reports", "report"=>"[FILTERED]"}
> processing report for s0034sbl3814.x.x.x
> Failed to process report for s0034sbl3814.x.x.x due to:undefined
> method `allowed_to?' for nil:NilClass
> Completed in 6ms (View: 0, DB: 2) | 500 Internal Server Error [http://
> S0034SBL3814.x.x.x/reports/create?format=yml]
>
>
> Cant figure out how to resolve it, any ideas?
>
any chance you removed all of your users from the system? can you try running
rake permissions:reset RAILS_ENV=production

Ohad

··· On Fri, Dec 2, 2011 at 8:08 AM, MattW wrote: > Regards > > Matt > > -- > You received this message because you are subscribed to the Google Groups "Foreman users" group. > To post to this group, send email to foreman-users@googlegroups.com. > To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en. >

Ohad,

Thats correct. I tried migrating the sqlite3 DB to the puppet shared
mysql DB using the db:dump/db:load utility mentioned in the wiki but
it failed.

So I reset foreman and pointed it to the mysql production DB.

I have run the "rake permissions:reset RAILS_ENV=production" after
migrating but will giving it another go seems to have rectified the
issue.

I will monitor it throughout the day to see if it continues to work.

Thank You

Regards

Matt

··· On Dec 2, 5:29 pm, Ohad Levy wrote: > On Fri, Dec 2, 2011 at 8:08 AM, MattW wrote: > > hi all, > > > I have setup a small POC env with foreman and puppet etc > > > Puppetmaster and Foreman are using the same mysql backend and running > > on the same machine. > > > The puppet clients are successfully dropping off the reports as I can > > see them in the logs and in the $REPORTSDIR when store is enabled. > > > The problem is, the reports fail to show on the foreman fronend.... > > > I have checked the foreman logs and discovered this entry: > > > Processing ReportsController#create to yml (for x.x.x.x at 2011-12-02 > > 17:01:53) [POST] > > Parameters: {"format"=>"yml", "action"=>"create", > > "controller"=>"reports", "report"=>"[FILTERED]"} > > processing report for s0034sbl3814.x.x.x > > Failed to process report for s0034sbl3814.x.x.x due to:undefined > > method `allowed_to?' for nil:NilClass > > Completed in 6ms (View: 0, DB: 2) | 500 Internal Server Error [http:// > > S0034SBL3814.x.x.x/reports/create?format=yml] > > > Cant figure out how to resolve it, any ideas? > > any chance you removed all of your users from the system? can you try running > rake permissions:reset RAILS_ENV=production > > Ohad > > > > > > > > > Regards > > > Matt > > > -- > > You received this message because you are subscribed to the Google Groups "Foreman users" group. > > To post to this group, send email to foreman-users@googlegroups.com. > > To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com. > > For more options, visit this group athttp://groups.google.com/group/foreman-users?hl=en.

Been working perfectly since this morning!

Thanks

Matt

··· On Dec 5, 9:06 am, MattW wrote: > Ohad, > > Thats correct. I tried migrating the sqlite3 DB to the puppet shared > mysql DB using the db:dump/db:load utility mentioned in the wiki but > it failed. > > So I reset foreman and pointed it to the mysql production DB. > > I have run the "rake permissions:reset RAILS_ENV=production" after > migrating but will giving it another go seems to have rectified the > issue. > > I will monitor it throughout the day to see if it continues to work. > > Thank You > > Regards > > Matt > > On Dec 2, 5:29 pm, Ohad Levy wrote: > > > > > > > > > On Fri, Dec 2, 2011 at 8:08 AM, MattW wrote: > > > hi all, > > > > I have setup a small POC env with foreman and puppet etc > > > > Puppetmaster and Foreman are using the same mysql backend and running > > > on the same machine. > > > > The puppet clients are successfully dropping off the reports as I can > > > see them in the logs and in the $REPORTSDIR when store is enabled. > > > > The problem is, the reports fail to show on the foreman fronend.... > > > > I have checked the foreman logs and discovered this entry: > > > > Processing ReportsController#create to yml (for x.x.x.x at 2011-12-02 > > > 17:01:53) [POST] > > > Parameters: {"format"=>"yml", "action"=>"create", > > > "controller"=>"reports", "report"=>"[FILTERED]"} > > > processing report for s0034sbl3814.x.x.x > > > Failed to process report for s0034sbl3814.x.x.x due to:undefined > > > method `allowed_to?' for nil:NilClass > > > Completed in 6ms (View: 0, DB: 2) | 500 Internal Server Error [http:// > > > S0034SBL3814.x.x.x/reports/create?format=yml] > > > > Cant figure out how to resolve it, any ideas? > > > any chance you removed all of your users from the system? can you try running > > rake permissions:reset RAILS_ENV=production > > > Ohad > > > > Regards > > > > Matt > > > > -- > > > You received this message because you are subscribed to the Google Groups "Foreman users" group. > > > To post to this group, send email to foreman-users@googlegroups.com. > > > To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com. > > > For more options, visit this group athttp://groups.google.com/group/foreman-users?hl=en.