Foreman_openscap plugin not show reports

Hi,

My ENV:
Foreman – v1.8.2, Running on CentOS 6.6.

I've installed the foreman_openscap Plugin to my Foreman. I followed the
whole guide for how to deploy
<https://github.com/theforeman/foreman_openscap> but it’s not working I
can’t see any report from my client server.

My client server:

[root@client ~]# crontab -l

Puppet Name: foreman_scap_client_1

0 1 5 * * /usr/bin/foreman_scap_client 1

When I run it manually I get this

[root@client ~]# /usr/bin/foreman_scap_client 1
DEBUG: running: oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_server
–results-arf /tmp/d20150818-29015-u9lmiq/results.xml /var/lib/openscap/
content/56003534c5208da98ea3fb937a54dbe4f14001af111973a3ef6a17eec95d2e9d.xml

DEBUG: running: /usr/bin/bzip2 /tmp/d20150818-29015-u9lmiq/results.xml
Uploading results to https://foreman.corp.local:8443/compliance/arf/1

My Foreman server:

[root@foreman foreman-proxy]# pwd
/var/log/foreman-proxy
[root@foreman foreman-proxy]# tail -f proxy.log
10...* - - [18/Aug/2015 12:50:17] "PUT /arf/1 HTTP/1.1" 200 16 0.0074

But the reports are empty.

Any idea why?

Thanks,
EddieM

Hi,

Anyone?!

Thanks,
EddieM

··· On Tuesday, August 18, 2015 at 1:48:53 PM UTC+3, Eddie Mashayev wrote: > > Hi, > > > My ENV: > Foreman – v1.8.2, Running on CentOS 6.6. > > I've installed the foreman_openscap Plugin to my Foreman. I followed the > whole guide for how to deploy > but it’s not working I > can’t see any report from my client server. > > My client server: > > > [root@client ~]# crontab -l > # Puppet Name: foreman_scap_client_1 > 0 1 5 * * /usr/bin/foreman_scap_client 1 > > When I run it manually I get this > > [root@client ~]# /usr/bin/foreman_scap_client 1 > DEBUG: running: oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_server > --results-arf /tmp/d20150818-29015-u9lmiq/results.xml /var/lib/openscap/ > content/56003534c5208da98ea3fb937a54dbe4f14001af111973a3ef6a17eec95d2e9d.xml > > DEBUG: running: /usr/bin/bzip2 /tmp/d20150818-29015-u9lmiq/results.xml > Uploading results to https://foreman.corp.local:8443/compliance/arf/1 > > > My Foreman server: > > [root@foreman foreman-proxy]# pwd > /var/log/foreman-proxy > [root@foreman foreman-proxy]# tail -f proxy.log > 10.*.*.* - - [18/Aug/2015 12:50:17] "PUT /arf/1 HTTP/1.1" 200 16 0.0074 > > > But the reports are empty. > > Any idea why? > > Thanks, > EddieM >

Hi Eddie,
It seems that your proxy is not sending the reports back to Foreman.
To test this, can you please run "smart-proxy-openscap-send" on the proxy?

בתאריך יום שלישי, 18 באוגוסט 2015 בשעה 13:48:53 UTC+3, מאת Eddie Mashayev:

··· > > Hi, > > > My ENV: > Foreman – v1.8.2, Running on CentOS 6.6. > > I've installed the foreman_openscap Plugin to my Foreman. I followed the > whole guide for how to deploy > but it’s not working I > can’t see any report from my client server. > > My client server: > > > [root@client ~]# crontab -l > # Puppet Name: foreman_scap_client_1 > 0 1 5 * * /usr/bin/foreman_scap_client 1 > > When I run it manually I get this > > [root@client ~]# /usr/bin/foreman_scap_client 1 > DEBUG: running: oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_server > --results-arf /tmp/d20150818-29015-u9lmiq/results.xml /var/lib/openscap/ > content/56003534c5208da98ea3fb937a54dbe4f14001af111973a3ef6a17eec95d2e9d.xml > > DEBUG: running: /usr/bin/bzip2 /tmp/d20150818-29015-u9lmiq/results.xml > Uploading results to https://foreman.corp.local:8443/compliance/arf/1 > > > My Foreman server: > > [root@foreman foreman-proxy]# pwd > /var/log/foreman-proxy > [root@foreman foreman-proxy]# tail -f proxy.log > 10.*.*.* - - [18/Aug/2015 12:50:17] "PUT /arf/1 HTTP/1.1" 200 16 0.0074 > > > But the reports are empty. > > Any idea why? > > Thanks, > EddieM >

Hi Shlomi,

Good news - I've upgraded the Foreman to newer version 1.9 and it fixed the
issue. I can see the repots nun in Foreman WebUI (Screenshot attached).

Still I have few problems:

  1. When running the command “smart-proxy-openscap-send” on my Foreman
    server which is proxy server too I get:
    [root@foreman ~]# smart-proxy-openscap-send
    /usr/lib/ruby/1.8/logger.rb:524:in `initialize': No such file or directory
  • logs/openscap-send.log (Errno::ENOENT)
    from /usr/lib/ruby/1.8/logger.rb:524:in open&#39; from /usr/lib/ruby/1.8/logger.rb:524:increate_logfile'
    from /usr/lib/ruby/1.8/logger.rb:519:in open_logfile&#39; from /usr/lib/ruby/1.8/logger.rb:486:ininitialize'
    from /usr/lib/ruby/1.8/logger.rb:262:in new&#39; from /usr/lib/ruby/1.8/logger.rb:262:ininitialize'
    from /usr/bin/smart-proxy-openscap-send:26:in `new'
    from /usr/bin/smart-proxy-openscap-send:26

[root@foreman foreman-proxy]# cat openscap-send.log
E, [2015-08-19T09:30:01.408781 #25128] ERROR – : Failed to send SCAP
results to the Foreman server: Connection refused - connect(2)
E, [2015-08-19T10:00:38.153754 #28480] ERROR – : Failed to send SCAP
results to the Foreman server: 500 "Internal Server Error"

  1. When I'm pressing the button View Report I get the error:
    Warning!
    cannot load such file – uglifier (in /opt/rh/ruby193/root/usr/share/gems/
    gems/foreman_openscap-0.4.2/app/assets/javascript/foreman_openscap/
    load_report.js)

Please assist.

Thanks,
EddieM

··· On Wednesday, August 19, 2015 at 11:02:24 AM UTC+3, Shlomi Zadok wrote: > > Hi Eddie, > It seems that your proxy is not sending the reports back to Foreman. > To test this, can you please run "smart-proxy-openscap-send" on the proxy? > - this command sends the reports from the proxy to Foreman. > You could also add this to the proxy's cron (this should have been added > automatically if you installed via RPM) - see > https://github.com/theforeman/smart_proxy_openscap/blob/master/extra/smart-proxy-openscap-send.cron > Hope this helps. > > בתאריך יום שלישי, 18 באוגוסט 2015 בשעה 13:48:53 UTC+3, מאת Eddie Mashayev: >> >> Hi, >> >> >> My ENV: >> Foreman – v1.8.2, Running on CentOS 6.6. >> >> I've installed the foreman_openscap Plugin to my Foreman. I followed the >> whole guide for how to deploy >> but it’s not working I >> can’t see any report from my client server. >> >> My client server: >> >> >> [root@client ~]# crontab -l >> # Puppet Name: foreman_scap_client_1 >> 0 1 5 * * /usr/bin/foreman_scap_client 1 >> >> When I run it manually I get this >> >> [root@client ~]# /usr/bin/foreman_scap_client 1 >> DEBUG: running: oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_server >> --results-arf /tmp/d20150818-29015-u9lmiq/results.xml /var/lib/openscap/ >> content/56003534c5208da98ea3fb937a54dbe4f14001af111973a3ef6a17eec95d2e9d.xml >> >> DEBUG: running: /usr/bin/bzip2 /tmp/d20150818-29015-u9lmiq/results.xml >> Uploading results to https://foreman.corp.local:8443/compliance/arf/1 >> >> >> My Foreman server: >> >> [root@foreman foreman-proxy]# pwd >> /var/log/foreman-proxy >> [root@foreman foreman-proxy]# tail -f proxy.log >> 10.*.*.* - - [18/Aug/2015 12:50:17] "PUT /arf/1 HTTP/1.1" 200 16 0.0074 >> >> >> But the reports are empty. >> >> Any idea why? >> >> Thanks, >> EddieM >> >

Commented inline:

בתאריך יום רביעי, 19 באוגוסט 2015 בשעה 11:28:01 UTC+3, מאת Eddie Mashayev:
>
> Hi Shlomi,
>
> Good news - I've upgraded the Foreman to newer version 1.9 and it fixed
> the issue. I can see the repots nun in Foreman WebUI (Screenshot attached).
>
>
> Still I have few problems:
>
> 1) When running the command “smart-proxy-openscap-send” on my Foreman
> server which is proxy server too I get:
> [root@foreman ~]# smart-proxy-openscap-send
> /usr/lib/ruby/1.8/logger.rb:524:in initialize&#39;: No such file or &gt; directory - logs/openscap-send.log (Errno::ENOENT) &gt; from /usr/lib/ruby/1.8/logger.rb:524:inopen'
> from /usr/lib/ruby/1.8/logger.rb:524:in create_logfile&#39; &gt; from /usr/lib/ruby/1.8/logger.rb:519:inopen_logfile'
> from /usr/lib/ruby/1.8/logger.rb:486:in initialize&#39; &gt; from /usr/lib/ruby/1.8/logger.rb:262:innew'
> from /usr/lib/ruby/1.8/logger.rb:262:in initialize&#39; &gt; from /usr/bin/smart-proxy-openscap-send:26:innew'
> from /usr/bin/smart-proxy-openscap-send:26
>
Seems like in your foreman-proxy haven't created 'logs/openscap-send.log'
can you manually create it?

> [root@foreman foreman-proxy]# cat openscap-send.log
> E, [2015-08-19T09:30:01.408781 #25128] ERROR – : Failed to send SCAP
> results to the Foreman server: Connection refused - connect(2)
> E, [2015-08-19T10:00:38.153754 #28480] ERROR – : Failed to send SCAP
> results to the Foreman server: 500 "Internal Server Error"
>
Is foreman up? also, can you update the foreman_openscap gem to 0.4.3 (as
it works with Foreman 1.9)?

> 2) When I'm pressing the button View Report I get the error:
> Warning!
> cannot load such file – uglifier (in /opt/rh/ruby193/root/usr/share/gems/
> gems/foreman_openscap-0.4.2/app/assets/javascript/foreman_openscap/
> load_report.js)
>
> Please assist.
>
See if upgrading foreman_openscap to 0.4.3 with foreman 1.9 helps

Do you see the report when clicking on "View Report" ?

··· > > Thanks, > EddieM > > > On Wednesday, August 19, 2015 at 11:02:24 AM UTC+3, Shlomi Zadok wrote: >> >> Hi Eddie, >> It seems that your proxy is not sending the reports back to Foreman. >> To test this, can you please run "smart-proxy-openscap-send" on the >> proxy? - this command sends the reports from the proxy to Foreman. >> You could also add this to the proxy's cron (this should have been added >> automatically if you installed via RPM) - see >> https://github.com/theforeman/smart_proxy_openscap/blob/master/extra/smart-proxy-openscap-send.cron >> Hope this helps. >> >> בתאריך יום שלישי, 18 באוגוסט 2015 בשעה 13:48:53 UTC+3, מאת Eddie Mashayev: >>> >>> Hi, >>> >>> >>> My ENV: >>> Foreman – v1.8.2, Running on CentOS 6.6. >>> >>> I've installed the foreman_openscap Plugin to my Foreman. I followed the >>> whole guide for how to deploy >>> but it’s not working I >>> can’t see any report from my client server. >>> >>> My client server: >>> >>> >>> [root@client ~]# crontab -l >>> # Puppet Name: foreman_scap_client_1 >>> 0 1 5 * * /usr/bin/foreman_scap_client 1 >>> >>> When I run it manually I get this >>> >>> [root@client ~]# /usr/bin/foreman_scap_client 1 >>> DEBUG: running: oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_server >>> --results-arf /tmp/d20150818-29015-u9lmiq/results.xml /var/lib/openscap/ >>> content/56003534c5208da98ea3fb937a54dbe4f14001af111973a3ef6a17eec95d2e9d >>> .xml >>> DEBUG: running: /usr/bin/bzip2 /tmp/d20150818-29015-u9lmiq/results.xml >>> Uploading results to https://foreman.corp.local:8443/compliance/arf/1 >>> >>> >>> My Foreman server: >>> >>> [root@foreman foreman-proxy]# pwd >>> /var/log/foreman-proxy >>> [root@foreman foreman-proxy]# tail -f proxy.log >>> 10.*.*.* - - [18/Aug/2015 12:50:17] "PUT /arf/1 HTTP/1.1" 200 16 0.0074 >>> >>> >>> But the reports are empty. >>> >>> Any idea why? >>> >>> Thanks, >>> EddieM >>> >>

Hi,

** Seems like in your foreman-proxy haven't created
'logs/openscap-send.log' can you manually create it?*

The log was created by foreman-proxy the error was taken from there
E, [2015-08-19T09:30:01.408781 #25128] ERROR – : Failed to send SCAP
results to the Foreman server: Connection refused - connect(2)
E, [2015-08-19T10:00:38.153754 #28480] ERROR – : Failed to send SCAP
results to the Foreman server: 500 "Internal Server Error"

Adding the path:
[root@foreman logs]# ll /usr/share/foreman-proxy/logs/openscap-send.log
-rw-r–r-- 1 foreman-proxy foreman-proxy 1804 Aug 19 10:00 /usr/share/
foreman-proxy/logs/openscap-send.log

** Is foreman up? also, can you update the foreman_openscap gem to 0.4.3
(as it works with Foreman 1.9)?*

I can't update * foreman_openscap gem to 0.4.3 *because nothing to update:
[root@foreman foreman-proxy]# yum upgrade foreman_openscap
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Repository foreman-plugins is listed more than once in the configuration
Loading mirror speeds from cached hostfile

  • epel: mirror.23media.de
    No Match for argument: foreman_openscap
    No package foreman_openscap available.
    No Packages marked for Update

** Do you see the report when clicking on "View Report" ?*
As I mantioned in step 2, I'm getting the error once pressing the button
"View Report"
Warning!
cannot load such file – uglifier (in /opt/rh/ruby193/root/usr/share/gems/
gems/foreman_openscap-0.4.2/app/assets/javascript/foreman_openscap/
load_report.js)

Thanks,
EddieM

··· On Wednesday, August 19, 2015 at 11:48:01 AM UTC+3, Shlomi Zadok wrote: > > Commented inline: > > בתאריך יום רביעי, 19 באוגוסט 2015 בשעה 11:28:01 UTC+3, מאת Eddie Mashayev: >> >> Hi Shlomi, >> >> Good news - I've upgraded the Foreman to newer version 1.9 and it fixed >> the issue. I can see the repots nun in Foreman WebUI (Screenshot attached). >> >> >> Still I have few problems: >> >> 1) When running the command “smart-proxy-openscap-send” on my Foreman >> server which is proxy server too I get: >> [root@foreman ~]# smart-proxy-openscap-send >> /usr/lib/ruby/1.8/logger.rb:524:in `initialize': No such file or >> directory - logs/openscap-send.log (Errno::ENOENT) >> from /usr/lib/ruby/1.8/logger.rb:524:in `open' >> from /usr/lib/ruby/1.8/logger.rb:524:in `create_logfile' >> from /usr/lib/ruby/1.8/logger.rb:519:in `open_logfile' >> from /usr/lib/ruby/1.8/logger.rb:486:in `initialize' >> from /usr/lib/ruby/1.8/logger.rb:262:in `new' >> from /usr/lib/ruby/1.8/logger.rb:262:in `initialize' >> from /usr/bin/smart-proxy-openscap-send:26:in `new' >> from /usr/bin/smart-proxy-openscap-send:26 >> > Seems like in your foreman-proxy haven't created 'logs/openscap-send.log' > can you manually create it? > > >> [root@foreman foreman-proxy]# cat openscap-send.log >> E, [2015-08-19T09:30:01.408781 #25128] ERROR -- : Failed to send SCAP >> results to the Foreman server: Connection refused - connect(2) >> E, [2015-08-19T10:00:38.153754 #28480] ERROR -- : Failed to send SCAP >> results to the Foreman server: 500 "Internal Server Error" >> > Is foreman up? also, can you update the foreman_openscap gem to 0.4.3 (as > it works with Foreman 1.9)? > > >> 2) When I'm pressing the button *View Report* I get the error: >> Warning! >> cannot load such file -- uglifier (in /opt/rh/ruby193/root/usr/share/gems >> /gems/foreman_openscap-0.4.2/app/assets/javascript/foreman_openscap/ >> load_report.js) >> >> Please assist. >> > See if upgrading foreman_openscap to 0.4.3 with foreman 1.9 helps > > Do you see the report when clicking on "View Report" ? > >> >> Thanks, >> EddieM >> >> >> On Wednesday, August 19, 2015 at 11:02:24 AM UTC+3, Shlomi Zadok wrote: >>> >>> Hi Eddie, >>> It seems that your proxy is not sending the reports back to Foreman. >>> To test this, can you please run "smart-proxy-openscap-send" on the >>> proxy? - this command sends the reports from the proxy to Foreman. >>> You could also add this to the proxy's cron (this should have been added >>> automatically if you installed via RPM) - see >>> https://github.com/theforeman/smart_proxy_openscap/blob/master/extra/smart-proxy-openscap-send.cron >>> Hope this helps. >>> >>> בתאריך יום שלישי, 18 באוגוסט 2015 בשעה 13:48:53 UTC+3, מאת Eddie >>> Mashayev: >>>> >>>> Hi, >>>> >>>> >>>> My ENV: >>>> Foreman – v1.8.2, Running on CentOS 6.6. >>>> >>>> I've installed the foreman_openscap Plugin to my Foreman. I followed >>>> the whole guide for how to deploy >>>> but it’s not working >>>> I can’t see any report from my client server. >>>> >>>> My client server: >>>> >>>> >>>> [root@client ~]# crontab -l >>>> # Puppet Name: foreman_scap_client_1 >>>> 0 1 5 * * /usr/bin/foreman_scap_client 1 >>>> >>>> When I run it manually I get this >>>> >>>> [root@client ~]# /usr/bin/foreman_scap_client 1 >>>> DEBUG: running: oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_server >>>> --results-arf /tmp/d20150818-29015-u9lmiq/results.xml /var/lib/openscap >>>> /content/ >>>> 56003534c5208da98ea3fb937a54dbe4f14001af111973a3ef6a17eec95d2e9d.xml >>>> DEBUG: running: /usr/bin/bzip2 /tmp/d20150818-29015-u9lmiq/results.xml >>>> Uploading results to https://foreman.corp.local:8443/compliance/arf/1 >>>> >>>> >>>> My Foreman server: >>>> >>>> [root@foreman foreman-proxy]# pwd >>>> /var/log/foreman-proxy >>>> [root@foreman foreman-proxy]# tail -f proxy.log >>>> 10.*.*.* - - [18/Aug/2015 12:50:17] "PUT /arf/1 HTTP/1.1" 200 16 0.0074 >>>> >>>> >>>> But the reports are empty. >>>> >>>> Any idea why? >>>> >>>> Thanks, >>>> EddieM >>>> >>>

Can you try "yum upgrade rubygem-foreman_openscap" ?
Also, can you send a foreman-debug output? It is weird that it can't load
the javascript file.
Thanks

··· On Wednesday, August 19, 2015 at 12:13:58 PM UTC+3, Eddie Mashayev wrote: > > Hi, > > > > ** Seems like in your foreman-proxy haven't created > 'logs/openscap-send.log' can you manually create it?* > > The log was created by foreman-proxy the error was taken from there > E, [2015-08-19T09:30:01.408781 #25128] ERROR -- : Failed to send SCAP > results to the Foreman server: Connection refused - connect(2) > E, [2015-08-19T10:00:38.153754 #28480] ERROR -- : Failed to send SCAP > results to the Foreman server: 500 "Internal Server Error" > > Adding the path: > [root@foreman logs]# ll /usr/share/foreman-proxy/logs/openscap-send.log > -rw-r--r-- 1 foreman-proxy foreman-proxy 1804 Aug 19 10:00 /usr/share/ > foreman-proxy/logs/openscap-send.log > > > > ** Is foreman up? also, can you update the foreman_openscap gem to 0.4.3 > (as it works with Foreman 1.9)?* > > I can't update * foreman_openscap gem to 0.4.3 *because nothing to update: > [root@foreman foreman-proxy]# yum upgrade foreman_openscap > Loaded plugins: fastestmirror, security > Setting up Upgrade Process > Repository foreman-plugins is listed more than once in the configuration > Loading mirror speeds from cached hostfile > * epel: mirror.23media.de > No Match for argument: foreman_openscap > No package foreman_openscap available. > No Packages marked for Update > > > > ** Do you see the report when clicking on "View Report" ?* > As I mantioned in step 2, I'm getting the error once pressing the button > "View Report" > Warning! > cannot load such file -- uglifier (in /opt/rh/ruby193/root/usr/share/gems/ > gems/foreman_openscap-0.4.2/app/assets/javascript/foreman_openscap/ > load_report.js) > > > Thanks, > EddieM > > > > On Wednesday, August 19, 2015 at 11:48:01 AM UTC+3, Shlomi Zadok wrote: >> >> Commented inline: >> >> בתאריך יום רביעי, 19 באוגוסט 2015 בשעה 11:28:01 UTC+3, מאת Eddie Mashayev: >>> >>> Hi Shlomi, >>> >>> Good news - I've upgraded the Foreman to newer version 1.9 and it fixed >>> the issue. I can see the repots nun in Foreman WebUI (Screenshot attached). >>> >>> >>> Still I have few problems: >>> >>> 1) When running the command “smart-proxy-openscap-send” on my Foreman >>> server which is proxy server too I get: >>> [root@foreman ~]# smart-proxy-openscap-send >>> /usr/lib/ruby/1.8/logger.rb:524:in `initialize': No such file or >>> directory - logs/openscap-send.log (Errno::ENOENT) >>> from /usr/lib/ruby/1.8/logger.rb:524:in `open' >>> from /usr/lib/ruby/1.8/logger.rb:524:in `create_logfile' >>> from /usr/lib/ruby/1.8/logger.rb:519:in `open_logfile' >>> from /usr/lib/ruby/1.8/logger.rb:486:in `initialize' >>> from /usr/lib/ruby/1.8/logger.rb:262:in `new' >>> from /usr/lib/ruby/1.8/logger.rb:262:in `initialize' >>> from /usr/bin/smart-proxy-openscap-send:26:in `new' >>> from /usr/bin/smart-proxy-openscap-send:26 >>> >> Seems like in your foreman-proxy haven't created >> 'logs/openscap-send.log' can you manually create it? >> >> >>> [root@foreman foreman-proxy]# cat openscap-send.log >>> E, [2015-08-19T09:30:01.408781 #25128] ERROR -- : Failed to send SCAP >>> results to the Foreman server: Connection refused - connect(2) >>> E, [2015-08-19T10:00:38.153754 #28480] ERROR -- : Failed to send SCAP >>> results to the Foreman server: 500 "Internal Server Error" >>> >> Is foreman up? also, can you update the foreman_openscap gem to 0.4.3 (as >> it works with Foreman 1.9)? >> >> >>> 2) When I'm pressing the button *View Report* I get the error: >>> Warning! >>> cannot load such file -- uglifier (in /opt/rh/ruby193/root/usr/share/ >>> gems/gems/foreman_openscap-0.4.2/app/assets/javascript/foreman_openscap/ >>> load_report.js) >>> >>> Please assist. >>> >> See if upgrading foreman_openscap to 0.4.3 with foreman 1.9 helps >> >> Do you see the report when clicking on "View Report" ? >> >>> >>> Thanks, >>> EddieM >>> >>> >>> On Wednesday, August 19, 2015 at 11:02:24 AM UTC+3, Shlomi Zadok wrote: >>>> >>>> Hi Eddie, >>>> It seems that your proxy is not sending the reports back to Foreman. >>>> To test this, can you please run "smart-proxy-openscap-send" on the >>>> proxy? - this command sends the reports from the proxy to Foreman. >>>> You could also add this to the proxy's cron (this should have been >>>> added automatically if you installed via RPM) - see >>>> https://github.com/theforeman/smart_proxy_openscap/blob/master/extra/smart-proxy-openscap-send.cron >>>> Hope this helps. >>>> >>>> בתאריך יום שלישי, 18 באוגוסט 2015 בשעה 13:48:53 UTC+3, מאת Eddie >>>> Mashayev: >>>>> >>>>> Hi, >>>>> >>>>> >>>>> My ENV: >>>>> Foreman – v1.8.2, Running on CentOS 6.6. >>>>> >>>>> I've installed the foreman_openscap Plugin to my Foreman. I followed >>>>> the whole guide for how to deploy >>>>> but it’s not working >>>>> I can’t see any report from my client server. >>>>> >>>>> My client server: >>>>> >>>>> >>>>> [root@client ~]# crontab -l >>>>> # Puppet Name: foreman_scap_client_1 >>>>> 0 1 5 * * /usr/bin/foreman_scap_client 1 >>>>> >>>>> When I run it manually I get this >>>>> >>>>> [root@client ~]# /usr/bin/foreman_scap_client 1 >>>>> DEBUG: running: oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_server >>>>> --results-arf /tmp/d20150818-29015-u9lmiq/results.xml /var/lib/ >>>>> openscap/content/ >>>>> 56003534c5208da98ea3fb937a54dbe4f14001af111973a3ef6a17eec95d2e9d.xml >>>>> DEBUG: running: /usr/bin/bzip2 /tmp/d20150818-29015-u9lmiq/results.xml >>>>> >>>>> Uploading results to https://foreman.corp.local:8443/compliance/arf/1 >>>>> >>>>> >>>>> My Foreman server: >>>>> >>>>> [root@foreman foreman-proxy]# pwd >>>>> /var/log/foreman-proxy >>>>> [root@foreman foreman-proxy]# tail -f proxy.log >>>>> 10.*.*.* - - [18/Aug/2015 12:50:17] "PUT /arf/1 HTTP/1.1" 200 16 >>>>> 0.0074 >>>>> >>>>> >>>>> But the reports are empty. >>>>> >>>>> Any idea why? >>>>> >>>>> Thanks, >>>>> EddieM >>>>> >>>>

Hi,

[root@il-foreman-lp1 ~]# yum upgrade rubygem-foreman_openscap
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Repository foreman-plugins is listed more than once in the configuration
Loading mirror speeds from cached hostfile

Attached the debug files

Thanks for the help Shlomi! Very appreciate it.

foreman-debug-YH9Ow.tar.xz
<https://drive.google.com/file/d/0ByXqZPmfe5kiRGlFM2V4LVZZa1E/view?usp=drive_web>
​​
foreman-debug.txt
<https://drive.google.com/file/d/0ByXqZPmfe5kiU1BDVVpMbGhVM28/view?usp=drive_web>

Thanks,
Eddie Mashayev
Cell : 054-4692519

··· On Wed, Aug 19, 2015 at 12:28 PM, Shlomi Zadok wrote:

Can you try “yum upgrade rubygem-foreman_openscap” ?
Also, can you send a foreman-debug output? It is weird that it can’t load
the javascript file.
Thanks

On Wednesday, August 19, 2015 at 12:13:58 PM UTC+3, Eddie Mashayev wrote:

Hi,

** Seems like in your foreman-proxy haven’t created
’logs/openscap-send.log’ can you manually create it?*

The log was created by foreman-proxy the error was taken from there
E, [2015-08-19T09:30:01.408781 #25128] ERROR – : Failed to send SCAP
results to the Foreman server: Connection refused - connect(2)
E, [2015-08-19T10:00:38.153754 #28480] ERROR – : Failed to send SCAP
results to the Foreman server: 500 “Internal Server Error”

Adding the path:
[root@foreman logs]# ll /usr/share/foreman-proxy/logs/openscap-send.log
-rw-r–r-- 1 foreman-proxy foreman-proxy 1804 Aug 19 10:00 /usr/share/
foreman-proxy/logs/openscap-send.log

** Is foreman up? also, can you update the foreman_openscap gem to 0.4.3
(as it works with Foreman 1.9)?*

I can’t update * foreman_openscap gem to 0.4.3 *because nothing to
update:
[root@foreman foreman-proxy]# yum upgrade foreman_openscap
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Repository foreman-plugins is listed more than once in the configuration
Loading mirror speeds from cached hostfile

  • epel: mirror.23media.de
    No Match for argument: foreman_openscap
    No package foreman_openscap available.
    No Packages marked for Update

** Do you see the report when clicking on “View Report” ?*
As I mantioned in step 2, I’m getting the error once pressing the button
"View Report"
Warning!
cannot load such file – uglifier (in /opt/rh/ruby193/root/usr/share/gems
/gems/foreman_openscap-0.4.2/app/assets/javascript/foreman_openscap/
load_report.js)

Thanks,
EddieM

On Wednesday, August 19, 2015 at 11:48:01 AM UTC+3, Shlomi Zadok wrote:

Commented inline:

בתאריך יום רביעי, 19 באוגוסט 2015 בשעה 11:28:01 UTC+3, מאת Eddie
Mashayev:

Hi Shlomi,

Good news - I’ve upgraded the Foreman to newer version 1.9 and it fixed
the issue. I can see the repots nun in Foreman WebUI (Screenshot attached).

Still I have few problems:

  1. When running the command “smart-proxy-openscap-send” on my Foreman
    server which is proxy server too I get:
    [root@foreman ~]# smart-proxy-openscap-send
    /usr/lib/ruby/1.8/logger.rb:524:in initialize': No such file or directory - logs/openscap-send.log (Errno::ENOENT) from /usr/lib/ruby/1.8/logger.rb:524:inopen’
    from /usr/lib/ruby/1.8/logger.rb:524:in create_logfile' from /usr/lib/ruby/1.8/logger.rb:519:inopen_logfile’
    from /usr/lib/ruby/1.8/logger.rb:486:in initialize' from /usr/lib/ruby/1.8/logger.rb:262:innew’
    from /usr/lib/ruby/1.8/logger.rb:262:in initialize' from /usr/bin/smart-proxy-openscap-send:26:innew’
    from /usr/bin/smart-proxy-openscap-send:26

Seems like in your foreman-proxy haven’t created
’logs/openscap-send.log’ can you manually create it?

[root@foreman foreman-proxy]# cat openscap-send.log
E, [2015-08-19T09:30:01.408781 #25128] ERROR – : Failed to send SCAP
results to the Foreman server: Connection refused - connect(2)
E, [2015-08-19T10:00:38.153754 #28480] ERROR – : Failed to send SCAP
results to the Foreman server: 500 “Internal Server Error”

Is foreman up? also, can you update the foreman_openscap gem to 0.4.3
(as it works with Foreman 1.9)?

  1. When I’m pressing the button View Report I get the error:
    Warning!
    cannot load such file – uglifier (in /opt/rh/ruby193/root/usr/share/
    gems/gems/foreman_openscap-0.4.2/app/assets/javascript/foreman_openscap
    /load_report.js)

Please assist.

See if upgrading foreman_openscap to 0.4.3 with foreman 1.9 helps

Do you see the report when clicking on “View Report” ?

Thanks,
EddieM

On Wednesday, August 19, 2015 at 11:02:24 AM UTC+3, Shlomi Zadok wrote:

Hi Eddie,
It seems that your proxy is not sending the reports back to Foreman.
To test this, can you please run “smart-proxy-openscap-send” on the
proxy? - this command sends the reports from the proxy to Foreman.
You could also add this to the proxy’s cron (this should have been
added automatically if you installed via RPM) - see
https://github.com/theforeman/smart_proxy_openscap/blob/master/extra/smart-proxy-openscap-send.cron
Hope this helps.

בתאריך יום שלישי, 18 באוגוסט 2015 בשעה 13:48:53 UTC+3, מאת Eddie
Mashayev:

Hi,

My ENV:
Foreman – v1.8.2, Running on CentOS 6.6.

I’ve installed the foreman_openscap Plugin to my Foreman. I followed
the whole guide for how to deploy
https://github.com/theforeman/foreman_openscap but it’s not
working I can’t see any report from my client server.

My client server:

[root@client ~]# crontab -l

Puppet Name: foreman_scap_client_1

0 1 5 * * /usr/bin/foreman_scap_client 1

When I run it manually I get this

[root@client ~]# /usr/bin/foreman_scap_client 1
DEBUG: running: oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_server
–results-arf /tmp/d20150818-29015-u9lmiq/results.xml /var/lib/
openscap/content/
56003534c5208da98ea3fb937a54dbe4f14001af111973a3ef6a17eec95d2e9d.xml
DEBUG: running: /usr/bin/bzip2 /tmp/d20150818-29015-u9lmiq/results.xml

Uploading results to https://foreman.corp.local:8443/compliance/arf/1

My Foreman server:

[root@foreman foreman-proxy]# pwd
/var/log/foreman-proxy
[root@foreman foreman-proxy]# tail -f proxy.log
10...* - - [18/Aug/2015 12:50:17] “PUT /arf/1 HTTP/1.1” 200 16
0.0074

But the reports are empty.

Any idea why?

Thanks,
EddieM


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Eddie,
It seems that a file load_report.js was missing from rails'
assets:precompile in the engine.
I have created a pull request
<https://github.com/theforeman/foreman_openscap/pull/123> which fixes this
issue.
Shlomi

··· On Wednesday, August 19, 2015 at 12:51:08 PM UTC+3, Eddie Mashayev wrote: > > Hi, > > 1) > [root@il-foreman-lp1 ~]# yum upgrade rubygem-foreman_openscap > *Loaded plugins: fastestmirror, security* > *Setting up Upgrade Process* > *Repository foreman-plugins is listed more than once in the configuration* > *Loading mirror speeds from cached hostfile* > * * epel: mirror.23media.de * > *No Match for argument: rubygem-foreman_openscap* > *No package rubygem-foreman_openscap available.* > *No Packages marked for Update* > > 2) > Attached the debug files > > Thanks for the help Shlomi! Very appreciate it. > ​ > foreman-debug-YH9Ow.tar.xz > > ​​ > foreman-debug.txt > > ​ > > > > Thanks, > Eddie Mashayev > Cell : 054-4692519 > > On Wed, Aug 19, 2015 at 12:28 PM, Shlomi Zadok > wrote: > >> Can you try "yum upgrade rubygem-foreman_openscap" ? >> Also, can you send a foreman-debug output? It is weird that it can't load >> the javascript file. >> Thanks >> >> >> On Wednesday, August 19, 2015 at 12:13:58 PM UTC+3, Eddie Mashayev wrote: >>> >>> Hi, >>> >>> >>> >>> ** Seems like in your foreman-proxy haven't created >>> 'logs/openscap-send.log' can you manually create it?* >>> >>> The log was created by foreman-proxy the error was taken from there >>> E, [2015-08-19T09:30:01.408781 #25128] ERROR -- : Failed to send SCAP >>> results to the Foreman server: Connection refused - connect(2) >>> E, [2015-08-19T10:00:38.153754 #28480] ERROR -- : Failed to send SCAP >>> results to the Foreman server: 500 "Internal Server Error" >>> >>> Adding the path: >>> [root@foreman logs]# ll /usr/share/foreman-proxy/logs/openscap-send.log >>> -rw-r--r-- 1 foreman-proxy foreman-proxy 1804 Aug 19 10:00 /usr/share/ >>> foreman-proxy/logs/openscap-send.log >>> >>> >>> >>> ** Is foreman up? also, can you update the foreman_openscap gem to 0.4.3 >>> (as it works with Foreman 1.9)?* >>> >>> I can't update * foreman_openscap gem to 0.4.3 *because nothing to >>> update: >>> [root@foreman foreman-proxy]# yum upgrade foreman_openscap >>> Loaded plugins: fastestmirror, security >>> Setting up Upgrade Process >>> Repository foreman-plugins is listed more than once in the configuration >>> Loading mirror speeds from cached hostfile >>> * epel: mirror.23media.de >>> No Match for argument: foreman_openscap >>> No package foreman_openscap available. >>> No Packages marked for Update >>> >>> >>> >>> ** Do you see the report when clicking on "View Report" ?* >>> As I mantioned in step 2, I'm getting the error once pressing the button >>> "View Report" >>> Warning! >>> cannot load such file -- uglifier (in /opt/rh/ruby193/root/usr/share/ >>> gems/gems/foreman_openscap-0.4.2/app/assets/javascript/foreman_openscap/ >>> load_report.js) >>> >>> >>> Thanks, >>> EddieM >>> >>> >>> >>> On Wednesday, August 19, 2015 at 11:48:01 AM UTC+3, Shlomi Zadok wrote: >>>> >>>> Commented inline: >>>> >>>> בתאריך יום רביעי, 19 באוגוסט 2015 בשעה 11:28:01 UTC+3, מאת Eddie >>>> Mashayev: >>>>> >>>>> Hi Shlomi, >>>>> >>>>> Good news - I've upgraded the Foreman to newer version 1.9 and it >>>>> fixed the issue. I can see the repots nun in Foreman WebUI (Screenshot >>>>> attached). >>>>> >>>>> >>>>> Still I have few problems: >>>>> >>>>> 1) When running the command “smart-proxy-openscap-send” on my Foreman >>>>> server which is proxy server too I get: >>>>> [root@foreman ~]# smart-proxy-openscap-send >>>>> /usr/lib/ruby/1.8/logger.rb:524:in `initialize': No such file or >>>>> directory - logs/openscap-send.log (Errno::ENOENT) >>>>> from /usr/lib/ruby/1.8/logger.rb:524:in `open' >>>>> from /usr/lib/ruby/1.8/logger.rb:524:in `create_logfile' >>>>> from /usr/lib/ruby/1.8/logger.rb:519:in `open_logfile' >>>>> from /usr/lib/ruby/1.8/logger.rb:486:in `initialize' >>>>> from /usr/lib/ruby/1.8/logger.rb:262:in `new' >>>>> from /usr/lib/ruby/1.8/logger.rb:262:in `initialize' >>>>> from /usr/bin/smart-proxy-openscap-send:26:in `new' >>>>> from /usr/bin/smart-proxy-openscap-send:26 >>>>> >>>> Seems like in your foreman-proxy haven't created >>>> 'logs/openscap-send.log' can you manually create it? >>>> >>>> >>>>> [root@foreman foreman-proxy]# cat openscap-send.log >>>>> E, [2015-08-19T09:30:01.408781 #25128] ERROR -- : Failed to send SCAP >>>>> results to the Foreman server: Connection refused - connect(2) >>>>> E, [2015-08-19T10:00:38.153754 #28480] ERROR -- : Failed to send SCAP >>>>> results to the Foreman server: 500 "Internal Server Error" >>>>> >>>> Is foreman up? also, can you update the foreman_openscap gem to 0.4.3 >>>> (as it works with Foreman 1.9)? >>>> >>>> >>>>> 2) When I'm pressing the button *View Report* I get the error: >>>>> Warning! >>>>> cannot load such file -- uglifier (in /opt/rh/ruby193/root/usr/share/ >>>>> gems/gems/foreman_openscap-0.4.2/app/assets/javascript/ >>>>> foreman_openscap/load_report.js) >>>>> >>>>> Please assist. >>>>> >>>> See if upgrading foreman_openscap to 0.4.3 with foreman 1.9 helps >>>> >>>> Do you see the report when clicking on "View Report" ? >>>> >>>>> >>>>> Thanks, >>>>> EddieM >>>>> >>>>> >>>>> On Wednesday, August 19, 2015 at 11:02:24 AM UTC+3, Shlomi Zadok wrote: >>>>>> >>>>>> Hi Eddie, >>>>>> It seems that your proxy is not sending the reports back to Foreman. >>>>>> To test this, can you please run "smart-proxy-openscap-send" on the >>>>>> proxy? - this command sends the reports from the proxy to Foreman. >>>>>> You could also add this to the proxy's cron (this should have been >>>>>> added automatically if you installed via RPM) - see >>>>>> https://github.com/theforeman/smart_proxy_openscap/blob/master/extra/smart-proxy-openscap-send.cron >>>>>> Hope this helps. >>>>>> >>>>>> בתאריך יום שלישי, 18 באוגוסט 2015 בשעה 13:48:53 UTC+3, מאת Eddie >>>>>> Mashayev: >>>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> >>>>>>> My ENV: >>>>>>> Foreman – v1.8.2, Running on CentOS 6.6. >>>>>>> >>>>>>> I've installed the foreman_openscap Plugin to my Foreman. I followed >>>>>>> the whole guide for how to deploy >>>>>>> but it’s not >>>>>>> working I can’t see any report from my client server. >>>>>>> >>>>>>> My client server: >>>>>>> >>>>>>> >>>>>>> [root@client ~]# crontab -l >>>>>>> # Puppet Name: foreman_scap_client_1 >>>>>>> 0 1 5 * * /usr/bin/foreman_scap_client 1 >>>>>>> >>>>>>> When I run it manually I get this >>>>>>> >>>>>>> [root@client ~]# /usr/bin/foreman_scap_client 1 >>>>>>> DEBUG: running: oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_server >>>>>>> --results-arf /tmp/d20150818-29015-u9lmiq/results.xml /var/lib/ >>>>>>> openscap/content/ >>>>>>> 56003534c5208da98ea3fb937a54dbe4f14001af111973a3ef6a17eec95d2e9d.xml >>>>>>> >>>>>>> DEBUG: running: /usr/bin/bzip2 /tmp/d20150818-29015-u9lmiq/results.xml >>>>>>> >>>>>>> Uploading results to https://foreman.corp.local:8443/compliance/arf/1 >>>>>>> >>>>>>> >>>>>>> >>>>>>> My Foreman server: >>>>>>> >>>>>>> [root@foreman foreman-proxy]# pwd >>>>>>> /var/log/foreman-proxy >>>>>>> [root@foreman foreman-proxy]# tail -f proxy.log >>>>>>> 10.*.*.* - - [18/Aug/2015 12:50:17] "PUT /arf/1 HTTP/1.1" 200 16 >>>>>>> 0.0074 >>>>>>> >>>>>>> >>>>>>> But the reports are empty. >>>>>>> >>>>>>> Any idea why? >>>>>>> >>>>>>> Thanks, >>>>>>> EddieM >>>>>>> >>>>>> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Foreman users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> foreman-user...@googlegroups.com . >> To post to this group, send email to forema...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/d/optout. >> > >

Hi,

> foreman-rake assets:precompile
> service foreman restart

I did it, the result is the same.

Warning!cannot load such file – uglifier (in
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.4.2/app/assets/javascript/foreman_openscap/load_report.js)

Can I fix it manually? add load_report.js somehow?

Thanks,
Eddie Mashayev
Cell : 054-4692519

··· On Wed, Aug 19, 2015 at 2:19 PM, Shlomi Zadok wrote:

Eddie,
It seems that a file load_report.js was missing from rails’
assets:precompile in the engine.
I have created a pull request
https://github.com/theforeman/foreman_openscap/pull/123 which fixes
this issue.
Shlomi

On Wednesday, August 19, 2015 at 12:51:08 PM UTC+3, Eddie Mashayev wrote:

Hi,

[root@il-foreman-lp1 ~]# yum upgrade rubygem-foreman_openscap
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Repository foreman-plugins is listed more than once in the configuration
Loading mirror speeds from cached hostfile

Attached the debug files

Thanks for the help Shlomi! Very appreciate it.

foreman-debug-YH9Ow.tar.xz
https://drive.google.com/file/d/0ByXqZPmfe5kiRGlFM2V4LVZZa1E/view?usp=drive_web
​​
foreman-debug.txt
https://drive.google.com/file/d/0ByXqZPmfe5kiU1BDVVpMbGhVM28/view?usp=drive_web

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 12:28 PM, Shlomi Zadok shl...@ben-hanna.com >> wrote:

Can you try “yum upgrade rubygem-foreman_openscap” ?
Also, can you send a foreman-debug output? It is weird that it can’t
load the javascript file.
Thanks

On Wednesday, August 19, 2015 at 12:13:58 PM UTC+3, Eddie Mashayev wrote:

Hi,

** Seems like in your foreman-proxy haven’t created
’logs/openscap-send.log’ can you manually create it?*

The log was created by foreman-proxy the error was taken from there
E, [2015-08-19T09:30:01.408781 #25128] ERROR – : Failed to send SCAP
results to the Foreman server: Connection refused - connect(2)
E, [2015-08-19T10:00:38.153754 #28480] ERROR – : Failed to send SCAP
results to the Foreman server: 500 “Internal Server Error”

Adding the path:
[root@foreman logs]# ll /usr/share/foreman-proxy/logs/openscap-send.log
-rw-r–r-- 1 foreman-proxy foreman-proxy 1804 Aug 19 10:00 /usr/share/
foreman-proxy/logs/openscap-send.log

** Is foreman up? also, can you update the foreman_openscap gem to
0.4.3 (as it works with Foreman 1.9)?*

I can’t update * foreman_openscap gem to 0.4.3 *because nothing to
update:
[root@foreman foreman-proxy]# yum upgrade foreman_openscap
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Repository foreman-plugins is listed more than once in the configuration
Loading mirror speeds from cached hostfile

  • epel: mirror.23media.de
    No Match for argument: foreman_openscap
    No package foreman_openscap available.
    No Packages marked for Update

** Do you see the report when clicking on “View Report” ?*
As I mantioned in step 2, I’m getting the error once pressing the
button "View Report"
Warning!
cannot load such file – uglifier (in /opt/rh/ruby193/root/usr/share/
gems/gems/foreman_openscap-0.4.2/app/assets/javascript/foreman_openscap
/load_report.js)

Thanks,
EddieM

On Wednesday, August 19, 2015 at 11:48:01 AM UTC+3, Shlomi Zadok wrote:

Commented inline:

בתאריך יום רביעי, 19 באוגוסט 2015 בשעה 11:28:01 UTC+3, מאת Eddie
Mashayev:

Hi Shlomi,

Good news - I’ve upgraded the Foreman to newer version 1.9 and it
fixed the issue. I can see the repots nun in Foreman WebUI (Screenshot
attached).

Still I have few problems:

  1. When running the command “smart-proxy-openscap-send” on my Foreman
    server which is proxy server too I get:
    [root@foreman ~]# smart-proxy-openscap-send
    /usr/lib/ruby/1.8/logger.rb:524:in initialize': No such file or directory - logs/openscap-send.log (Errno::ENOENT) from /usr/lib/ruby/1.8/logger.rb:524:inopen’
    from /usr/lib/ruby/1.8/logger.rb:524:in create_logfile' from /usr/lib/ruby/1.8/logger.rb:519:inopen_logfile’
    from /usr/lib/ruby/1.8/logger.rb:486:in initialize' from /usr/lib/ruby/1.8/logger.rb:262:innew’
    from /usr/lib/ruby/1.8/logger.rb:262:in initialize' from /usr/bin/smart-proxy-openscap-send:26:innew’
    from /usr/bin/smart-proxy-openscap-send:26

Seems like in your foreman-proxy haven’t created
’logs/openscap-send.log’ can you manually create it?

[root@foreman foreman-proxy]# cat openscap-send.log
E, [2015-08-19T09:30:01.408781 #25128] ERROR – : Failed to send
SCAP results to the Foreman server: Connection refused - connect(2)
E, [2015-08-19T10:00:38.153754 #28480] ERROR – : Failed to send
SCAP results to the Foreman server: 500 “Internal Server Error”

Is foreman up? also, can you update the foreman_openscap gem to 0.4.3
(as it works with Foreman 1.9)?

  1. When I’m pressing the button View Report I get the error:
    Warning!
    cannot load such file – uglifier (in /opt/rh/ruby193/root/usr/share/
    gems/gems/foreman_openscap-0.4.2/app/assets/javascript/
    foreman_openscap/load_report.js)

Please assist.

See if upgrading foreman_openscap to 0.4.3 with foreman 1.9 helps

Do you see the report when clicking on “View Report” ?

Thanks,
EddieM

On Wednesday, August 19, 2015 at 11:02:24 AM UTC+3, Shlomi Zadok >>>>>> wrote:

Hi Eddie,
It seems that your proxy is not sending the reports back to Foreman.
To test this, can you please run “smart-proxy-openscap-send” on the
proxy? - this command sends the reports from the proxy to Foreman.
You could also add this to the proxy’s cron (this should have been
added automatically if you installed via RPM) - see
https://github.com/theforeman/smart_proxy_openscap/blob/master/extra/smart-proxy-openscap-send.cron
Hope this helps.

בתאריך יום שלישי, 18 באוגוסט 2015 בשעה 13:48:53 UTC+3, מאת Eddie
Mashayev:

Hi,

My ENV:
Foreman – v1.8.2, Running on CentOS 6.6.

I’ve installed the foreman_openscap Plugin to my Foreman. I
followed the whole guide for how to deploy
https://github.com/theforeman/foreman_openscap but it’s not
working I can’t see any report from my client server.

My client server:

[root@client ~]# crontab -l

Puppet Name: foreman_scap_client_1

0 1 5 * * /usr/bin/foreman_scap_client 1

When I run it manually I get this

[root@client ~]# /usr/bin/foreman_scap_client 1
DEBUG: running: oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_server
–results-arf /tmp/d20150818-29015-u9lmiq/results.xml /var/lib/
openscap/content/
56003534c5208da98ea3fb937a54dbe4f14001af111973a3ef6a17eec95d2e9d.xml

DEBUG: running: /usr/bin/bzip2 /tmp/d20150818-29015-u9lmiq/results.xml

Uploading results to https://foreman.corp.local:8443/compliance/arf/1

My Foreman server:

[root@foreman foreman-proxy]# pwd
/var/log/foreman-proxy
[root@foreman foreman-proxy]# tail -f proxy.log
10...* - - [18/Aug/2015 12:50:17] “PUT /arf/1 HTTP/1.1” 200 16
0.0074

But the reports are empty.

Any idea why?

Thanks,
EddieM


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Yes you can.
You can apply the pull
request: https://github.com/theforeman/foreman_openscap/pull/123 to
foreman_openscap's engine.rb
To find engine.rb you can run "rpm -ql rubygem-foreman_openscap | grep
engine.rb"
From your logs I'd guess it is in:
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.4.2/lib/foreman_openscap/engine.rb

Once you find it you can add the code from
https://github.com/theforeman/foreman_openscap/pull/123

··· On Wednesday, August 19, 2015 at 2:22:28 PM UTC+3, Eddie Mashayev wrote: > > Hi, > > > foreman-rake assets:precompile > > service foreman restart > > I did it, the result is the same. > > Warning!cannot load such file -- uglifier (in > /opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.4.2/app/assets/javascript/foreman_openscap/load_report.js) > > > > *Can I fix it manually? add load_report.js somehow?* > > > > Thanks, > Eddie Mashayev > Cell : 054-4692519 > > On Wed, Aug 19, 2015 at 2:19 PM, Shlomi Zadok > wrote: > >> Eddie, >> It seems that a file load_report.js was missing from rails' >> assets:precompile in the engine. >> I have created a pull request >> which fixes >> this issue. >> Shlomi >> >> On Wednesday, August 19, 2015 at 12:51:08 PM UTC+3, Eddie Mashayev wrote: >>> >>> Hi, >>> >>> 1) >>> [root@il-foreman-lp1 ~]# yum upgrade rubygem-foreman_openscap >>> *Loaded plugins: fastestmirror, security* >>> *Setting up Upgrade Process* >>> *Repository foreman-plugins is listed more than once in the >>> configuration* >>> *Loading mirror speeds from cached hostfile* >>> * * epel: mirror.23media.de * >>> *No Match for argument: rubygem-foreman_openscap* >>> *No package rubygem-foreman_openscap available.* >>> *No Packages marked for Update* >>> >>> 2) >>> Attached the debug files >>> >>> Thanks for the help Shlomi! Very appreciate it. >>> ​ >>> foreman-debug-YH9Ow.tar.xz >>> >>> ​​ >>> foreman-debug.txt >>> >>> ​ >>> >>> >>> >>> Thanks, >>> Eddie Mashayev >>> Cell : 054-4692519 >>> >>> On Wed, Aug 19, 2015 at 12:28 PM, Shlomi Zadok >>> wrote: >>> >>>> Can you try "yum upgrade rubygem-foreman_openscap" ? >>>> Also, can you send a foreman-debug output? It is weird that it can't >>>> load the javascript file. >>>> Thanks >>>> >>>> >>>> On Wednesday, August 19, 2015 at 12:13:58 PM UTC+3, Eddie Mashayev >>>> wrote: >>>>> >>>>> Hi, >>>>> >>>>> >>>>> >>>>> ** Seems like in your foreman-proxy haven't created >>>>> 'logs/openscap-send.log' can you manually create it?* >>>>> >>>>> The log was created by foreman-proxy the error was taken from there >>>>> E, [2015-08-19T09:30:01.408781 #25128] ERROR -- : Failed to send SCAP >>>>> results to the Foreman server: Connection refused - connect(2) >>>>> E, [2015-08-19T10:00:38.153754 #28480] ERROR -- : Failed to send SCAP >>>>> results to the Foreman server: 500 "Internal Server Error" >>>>> >>>>> Adding the path: >>>>> [root@foreman logs]# ll >>>>> /usr/share/foreman-proxy/logs/openscap-send.log >>>>> -rw-r--r-- 1 foreman-proxy foreman-proxy 1804 Aug 19 10:00 /usr/share/ >>>>> foreman-proxy/logs/openscap-send.log >>>>> >>>>> >>>>> >>>>> ** Is foreman up? also, can you update the foreman_openscap gem to >>>>> 0.4.3 (as it works with Foreman 1.9)?* >>>>> >>>>> I can't update * foreman_openscap gem to 0.4.3 *because nothing to >>>>> update: >>>>> [root@foreman foreman-proxy]# yum upgrade foreman_openscap >>>>> Loaded plugins: fastestmirror, security >>>>> Setting up Upgrade Process >>>>> Repository foreman-plugins is listed more than once in the >>>>> configuration >>>>> Loading mirror speeds from cached hostfile >>>>> * epel: mirror.23media.de >>>>> No Match for argument: foreman_openscap >>>>> No package foreman_openscap available. >>>>> No Packages marked for Update >>>>> >>>>> >>>>> >>>>> ** Do you see the report when clicking on "View Report" ?* >>>>> As I mantioned in step 2, I'm getting the error once pressing the >>>>> button "View Report" >>>>> Warning! >>>>> cannot load such file -- uglifier (in /opt/rh/ruby193/root/usr/share/ >>>>> gems/gems/foreman_openscap-0.4.2/app/assets/javascript/ >>>>> foreman_openscap/load_report.js) >>>>> >>>>> >>>>> Thanks, >>>>> EddieM >>>>> >>>>> >>>>> >>>>> On Wednesday, August 19, 2015 at 11:48:01 AM UTC+3, Shlomi Zadok wrote: >>>>>> >>>>>> Commented inline: >>>>>> >>>>>> בתאריך יום רביעי, 19 באוגוסט 2015 בשעה 11:28:01 UTC+3, מאת Eddie >>>>>> Mashayev: >>>>>>> >>>>>>> Hi Shlomi, >>>>>>> >>>>>>> Good news - I've upgraded the Foreman to newer version 1.9 and it >>>>>>> fixed the issue. I can see the repots nun in Foreman WebUI (Screenshot >>>>>>> attached). >>>>>>> >>>>>>> >>>>>>> Still I have few problems: >>>>>>> >>>>>>> 1) When running the command “smart-proxy-openscap-send” on my >>>>>>> Foreman server which is proxy server too I get: >>>>>>> [root@foreman ~]# smart-proxy-openscap-send >>>>>>> /usr/lib/ruby/1.8/logger.rb:524:in `initialize': No such file or >>>>>>> directory - logs/openscap-send.log (Errno::ENOENT) >>>>>>> from /usr/lib/ruby/1.8/logger.rb:524:in `open' >>>>>>> from /usr/lib/ruby/1.8/logger.rb:524:in `create_logfile' >>>>>>> from /usr/lib/ruby/1.8/logger.rb:519:in `open_logfile' >>>>>>> from /usr/lib/ruby/1.8/logger.rb:486:in `initialize' >>>>>>> from /usr/lib/ruby/1.8/logger.rb:262:in `new' >>>>>>> from /usr/lib/ruby/1.8/logger.rb:262:in `initialize' >>>>>>> from /usr/bin/smart-proxy-openscap-send:26:in `new' >>>>>>> from /usr/bin/smart-proxy-openscap-send:26 >>>>>>> >>>>>> Seems like in your foreman-proxy haven't created >>>>>> 'logs/openscap-send.log' can you manually create it? >>>>>> >>>>>> >>>>>>> [root@foreman foreman-proxy]# cat openscap-send.log >>>>>>> E, [2015-08-19T09:30:01.408781 #25128] ERROR -- : Failed to send >>>>>>> SCAP results to the Foreman server: Connection refused - connect(2) >>>>>>> E, [2015-08-19T10:00:38.153754 #28480] ERROR -- : Failed to send >>>>>>> SCAP results to the Foreman server: 500 "Internal Server Error" >>>>>>> >>>>>> Is foreman up? also, can you update the foreman_openscap gem to 0.4.3 >>>>>> (as it works with Foreman 1.9)? >>>>>> >>>>>> >>>>>>> 2) When I'm pressing the button *View Report* I get the error: >>>>>>> Warning! >>>>>>> cannot load such file -- uglifier (in /opt/rh/ruby193/root/usr/share >>>>>>> /gems/gems/foreman_openscap-0.4.2/app/assets/javascript/ >>>>>>> foreman_openscap/load_report.js) >>>>>>> >>>>>>> Please assist. >>>>>>> >>>>>> See if upgrading foreman_openscap to 0.4.3 with foreman 1.9 helps >>>>>> >>>>>> Do you see the report when clicking on "View Report" ? >>>>>> >>>>>>> >>>>>>> Thanks, >>>>>>> EddieM >>>>>>> >>>>>>> >>>>>>> On Wednesday, August 19, 2015 at 11:02:24 AM UTC+3, Shlomi Zadok >>>>>>> wrote: >>>>>>>> >>>>>>>> Hi Eddie, >>>>>>>> It seems that your proxy is not sending the reports back to Foreman. >>>>>>>> To test this, can you please run "smart-proxy-openscap-send" on the >>>>>>>> proxy? - this command sends the reports from the proxy to Foreman. >>>>>>>> You could also add this to the proxy's cron (this should have been >>>>>>>> added automatically if you installed via RPM) - see >>>>>>>> https://github.com/theforeman/smart_proxy_openscap/blob/master/extra/smart-proxy-openscap-send.cron >>>>>>>> Hope this helps. >>>>>>>> >>>>>>>> בתאריך יום שלישי, 18 באוגוסט 2015 בשעה 13:48:53 UTC+3, מאת Eddie >>>>>>>> Mashayev: >>>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> >>>>>>>>> My ENV: >>>>>>>>> Foreman – v1.8.2, Running on CentOS 6.6. >>>>>>>>> >>>>>>>>> I've installed the foreman_openscap Plugin to my Foreman. I >>>>>>>>> followed the whole guide for how to deploy >>>>>>>>> but it’s not >>>>>>>>> working I can’t see any report from my client server. >>>>>>>>> >>>>>>>>> My client server: >>>>>>>>> >>>>>>>>> >>>>>>>>> [root@client ~]# crontab -l >>>>>>>>> # Puppet Name: foreman_scap_client_1 >>>>>>>>> 0 1 5 * * /usr/bin/foreman_scap_client 1 >>>>>>>>> >>>>>>>>> When I run it manually I get this >>>>>>>>> >>>>>>>>> [root@client ~]# /usr/bin/foreman_scap_client 1 >>>>>>>>> DEBUG: running: oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_server >>>>>>>>> --results-arf /tmp/d20150818-29015-u9lmiq/results.xml /var/lib/ >>>>>>>>> openscap/content/ >>>>>>>>> 56003534c5208da98ea3fb937a54dbe4f14001af111973a3ef6a17eec95d2e9d.xml >>>>>>>>> >>>>>>>>> DEBUG: running: /usr/bin/bzip2 /tmp/d20150818-29015-u9lmiq/results >>>>>>>>> .xml >>>>>>>>> Uploading results to https://foreman.corp.local:8443/compliance/arf/1 >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> My Foreman server: >>>>>>>>> >>>>>>>>> [root@foreman foreman-proxy]# pwd >>>>>>>>> /var/log/foreman-proxy >>>>>>>>> [root@foreman foreman-proxy]# tail -f proxy.log >>>>>>>>> 10.*.*.* - - [18/Aug/2015 12:50:17] "PUT /arf/1 HTTP/1.1" 200 16 >>>>>>>>> 0.0074 >>>>>>>>> >>>>>>>>> >>>>>>>>> But the reports are empty. >>>>>>>>> >>>>>>>>> Any idea why? >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> EddieM >>>>>>>>> >>>>>>>> -- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "Foreman users" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe >>>> . >>>> To unsubscribe from this group and all its topics, send an email to >>>> foreman-user...@googlegroups.com. >>>> To post to this group, send email to forema...@googlegroups.com. >>>> Visit this group at http://groups.google.com/group/foreman-users. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Foreman users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> foreman-user...@googlegroups.com . >> To post to this group, send email to forema...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/d/optout. >> > >

Hi Shlomi,

Sorry to bugging you :frowning:

I did the changes, adding the changes in engine.rb file marked in BOLD.

require 'deface'
require 'scaptimony/engine'

module ForemanOpenscap
class Engine < ::Rails::Engine
engine_name 'foreman_openscap'
config.autoload_paths += Dir["#{config.root}/app/controllers/concerns"]
config.autoload_paths += Dir["#{config.root}/app/helpers/concerns"]
config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
config.autoload_paths += Dir["#{config.root}/app/overrides"]

# Add any db migrations
initializer &quot;foreman_openscap.load_app_instance_data&quot; do |app|
  app.config.paths[&#39;db/migrate&#39;] +=

Scaptimony::Engine.paths['db/migrate'].existent
app.config.paths['db/migrate'] +=
ForemanOpenscap::Engine.paths['db/migrate'].existent
end

initializer &#39;foreman_openscap.assets.precompile&#39; do |app|
  app.config.assets.precompile += %w(
    &#39;foreman_openscap/policy_edit.js&#39;,
    &#39;foreman_openscap/period_selector.js&#39;,
    &#39;foreman_openscap/scap_hosts_show.js&#39;,
    *&#39;foreman_openscap/load_report.js&#39;*,
    &#39;foreman_openscap/policy.css&#39;
  )
end

initializer &#39;foreman_openscap.configure_assets&#39;, :group =&gt; :assets do
  SETTINGS[:foreman_openscap] =
      {:assets =&gt; {:precompile =&gt; [&#39;foreman_openscap/policy_edit.js&#39;,

'foreman_openscap/period_selector.js',

'foreman_openscap/scap_hosts_show.js',
'foreman_openscap/load_report.js',
'foreman_openscap/policy.css']}}
end

Also I did:

> foreman-rake assets:precompile
> service foreman restart

Still the result is the same :frowning:

Thanks,
Eddie Mashayev
Cell : 054-4692519

··· On Wed, Aug 19, 2015 at 2:30 PM, Shlomi Zadok wrote:

Yes you can.
You can apply the pull request:
https://github.com/theforeman/foreman_openscap/pull/123 to
foreman_openscap’s engine.rb
To find engine.rb you can run "rpm -ql rubygem-foreman_openscap | grep
engine.rb"
From your logs I’d guess it is in:
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.4.2/lib/foreman_openscap/engine.rb

Once you find it you can add the code from
https://github.com/theforeman/foreman_openscap/pull/123

On Wednesday, August 19, 2015 at 2:22:28 PM UTC+3, Eddie Mashayev wrote:

Hi,

foreman-rake assets:precompile
service foreman restart

I did it, the result is the same.

Warning!cannot load such file – uglifier (in
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.4.2/app/assets/javascript/foreman_openscap/load_report.js)

Can I fix it manually? add load_report.js somehow?

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 2:19 PM, Shlomi Zadok shl...@ben-hanna.com >> wrote:

Eddie,
It seems that a file load_report.js was missing from rails’
assets:precompile in the engine.
I have created a pull request
https://github.com/theforeman/foreman_openscap/pull/123 which fixes
this issue.
Shlomi

On Wednesday, August 19, 2015 at 12:51:08 PM UTC+3, Eddie Mashayev wrote:

Hi,

[root@il-foreman-lp1 ~]# yum upgrade rubygem-foreman_openscap
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Repository foreman-plugins is listed more than once in the
configuration

Loading mirror speeds from cached hostfile

Attached the debug files

Thanks for the help Shlomi! Very appreciate it.

foreman-debug-YH9Ow.tar.xz
https://drive.google.com/file/d/0ByXqZPmfe5kiRGlFM2V4LVZZa1E/view?usp=drive_web
​​
foreman-debug.txt
https://drive.google.com/file/d/0ByXqZPmfe5kiU1BDVVpMbGhVM28/view?usp=drive_web

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 12:28 PM, Shlomi Zadok shl...@ben-hanna.com >>>> wrote:

Can you try “yum upgrade rubygem-foreman_openscap” ?
Also, can you send a foreman-debug output? It is weird that it can’t
load the javascript file.
Thanks

On Wednesday, August 19, 2015 at 12:13:58 PM UTC+3, Eddie Mashayev >>>>> wrote:

Hi,

** Seems like in your foreman-proxy haven’t created
’logs/openscap-send.log’ can you manually create it?*

The log was created by foreman-proxy the error was taken from there
E, [2015-08-19T09:30:01.408781 #25128] ERROR – : Failed to send
SCAP results to the Foreman server: Connection refused - connect(2)
E, [2015-08-19T10:00:38.153754 #28480] ERROR – : Failed to send
SCAP results to the Foreman server: 500 “Internal Server Error”

Adding the path:
[root@foreman logs]# ll
/usr/share/foreman-proxy/logs/openscap-send.log
-rw-r–r-- 1 foreman-proxy foreman-proxy 1804 Aug 19 10:00 /usr/share
/foreman-proxy/logs/openscap-send.log

** Is foreman up? also, can you update the foreman_openscap gem to
0.4.3 (as it works with Foreman 1.9)?*

I can’t update * foreman_openscap gem to 0.4.3 *because nothing to
update:
[root@foreman foreman-proxy]# yum upgrade foreman_openscap
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Repository foreman-plugins is listed more than once in the
configuration
Loading mirror speeds from cached hostfile

  • epel: mirror.23media.de
    No Match for argument: foreman_openscap
    No package foreman_openscap available.
    No Packages marked for Update

** Do you see the report when clicking on “View Report” ?*
As I mantioned in step 2, I’m getting the error once pressing the
button "View Report"
Warning!
cannot load such file – uglifier (in /opt/rh/ruby193/root/usr/share/
gems/gems/foreman_openscap-0.4.2/app/assets/javascript/
foreman_openscap/load_report.js)

Thanks,
EddieM

On Wednesday, August 19, 2015 at 11:48:01 AM UTC+3, Shlomi Zadok >>>>>> wrote:

Commented inline:

בתאריך יום רביעי, 19 באוגוסט 2015 בשעה 11:28:01 UTC+3, מאת Eddie
Mashayev:

Hi Shlomi,

Good news - I’ve upgraded the Foreman to newer version 1.9 and it
fixed the issue. I can see the repots nun in Foreman WebUI (Screenshot
attached).

Still I have few problems:

  1. When running the command “smart-proxy-openscap-send” on my
    Foreman server which is proxy server too I get:
    [root@foreman ~]# smart-proxy-openscap-send
    /usr/lib/ruby/1.8/logger.rb:524:in initialize': No such file or directory - logs/openscap-send.log (Errno::ENOENT) from /usr/lib/ruby/1.8/logger.rb:524:inopen’
    from /usr/lib/ruby/1.8/logger.rb:524:in create_logfile' from /usr/lib/ruby/1.8/logger.rb:519:inopen_logfile’
    from /usr/lib/ruby/1.8/logger.rb:486:in initialize' from /usr/lib/ruby/1.8/logger.rb:262:innew’
    from /usr/lib/ruby/1.8/logger.rb:262:in initialize' from /usr/bin/smart-proxy-openscap-send:26:innew’
    from /usr/bin/smart-proxy-openscap-send:26

Seems like in your foreman-proxy haven’t created
’logs/openscap-send.log’ can you manually create it?

[root@foreman foreman-proxy]# cat openscap-send.log
E, [2015-08-19T09:30:01.408781 #25128] ERROR – : Failed to send
SCAP results to the Foreman server: Connection refused - connect(2)
E, [2015-08-19T10:00:38.153754 #28480] ERROR – : Failed to send
SCAP results to the Foreman server: 500 “Internal Server Error”

Is foreman up? also, can you update the foreman_openscap gem to
0.4.3 (as it works with Foreman 1.9)?

  1. When I’m pressing the button View Report I get the error:
    Warning!
    cannot load such file – uglifier (in /opt/rh/ruby193/root/usr/
    share/gems/gems/foreman_openscap-0.4.2/app/assets/javascript/
    foreman_openscap/load_report.js)

Please assist.

See if upgrading foreman_openscap to 0.4.3 with foreman 1.9 helps

Do you see the report when clicking on “View Report” ?

Thanks,
EddieM

On Wednesday, August 19, 2015 at 11:02:24 AM UTC+3, Shlomi Zadok >>>>>>>> wrote:

Hi Eddie,
It seems that your proxy is not sending the reports back to
Foreman.
To test this, can you please run “smart-proxy-openscap-send” on
the proxy? - this command sends the reports from the proxy to Foreman.
You could also add this to the proxy’s cron (this should have been
added automatically if you installed via RPM) - see
https://github.com/theforeman/smart_proxy_openscap/blob/master/extra/smart-proxy-openscap-send.cron
Hope this helps.

בתאריך יום שלישי, 18 באוגוסט 2015 בשעה 13:48:53 UTC+3, מאת Eddie
Mashayev:

Hi,

My ENV:
Foreman – v1.8.2, Running on CentOS 6.6.

I’ve installed the foreman_openscap Plugin to my Foreman. I
followed the whole guide for how to deploy
https://github.com/theforeman/foreman_openscap but it’s not
working I can’t see any report from my client server.

My client server:

[root@client ~]# crontab -l

Puppet Name: foreman_scap_client_1

0 1 5 * * /usr/bin/foreman_scap_client 1

When I run it manually I get this

[root@client ~]# /usr/bin/foreman_scap_client 1
DEBUG: running: oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_server
–results-arf /tmp/d20150818-29015-u9lmiq/results.xml /var/lib/
openscap/content/
56003534c5208da98ea3fb937a54dbe4f14001af111973a3ef6a17eec95d2e9d.xml

DEBUG: running: /usr/bin/bzip2 /tmp/d20150818-29015-u9lmiq/
results.xml
Uploading results to https://foreman.corp.local:8443/compliance/arf/1

My Foreman server:

[root@foreman foreman-proxy]# pwd
/var/log/foreman-proxy
[root@foreman foreman-proxy]# tail -f proxy.log
10...* - - [18/Aug/2015 12:50:17] “PUT /arf/1 HTTP/1.1” 200 16
0.0074

But the reports are empty.

Any idea why?

Thanks,
EddieM


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Hi Shlomi,

Do you have any other lead? what can be the issue here?

Thanks,
EddieM

Thanks,
Eddie Mashayev
Cell : 054-4692519

··· On Wed, Aug 19, 2015 at 2:51 PM, Eddie Mashayev wrote:

Hi Shlomi,

Sorry to bugging you :frowning:

I did the changes, adding the changes in engine.rb file marked in BOLD.

require 'deface’
require ‘scaptimony/engine’

module ForemanOpenscap
class Engine < ::Rails::Engine
engine_name 'foreman_openscap’
config.autoload_paths += Dir["#{config.root}/app/controllers/concerns"]
config.autoload_paths += Dir["#{config.root}/app/helpers/concerns"]
config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
config.autoload_paths += Dir["#{config.root}/app/overrides"]

# Add any db migrations
initializer "foreman_openscap.load_app_instance_data" do |app|
  app.config.paths['db/migrate'] +=

Scaptimony::Engine.paths[‘db/migrate’].existent
app.config.paths[‘db/migrate’] +=
ForemanOpenscap::Engine.paths[‘db/migrate’].existent
end

initializer 'foreman_openscap.assets.precompile' do |app|
  app.config.assets.precompile += %w(
    'foreman_openscap/policy_edit.js',
    'foreman_openscap/period_selector.js',
    'foreman_openscap/scap_hosts_show.js',
    *'foreman_openscap/load_report.js'*,
    'foreman_openscap/policy.css'
  )
end

initializer 'foreman_openscap.configure_assets', :group => :assets do
  SETTINGS[:foreman_openscap] =
      {:assets => {:precompile => ['foreman_openscap/policy_edit.js',

‘foreman_openscap/period_selector.js’,

‘foreman_openscap/scap_hosts_show.js’,

‘foreman_openscap/load_report.js’,
‘foreman_openscap/policy.css’]}}
end

Also I did:

foreman-rake assets:precompile
service foreman restart

Still the result is the same :frowning:

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 2:30 PM, Shlomi Zadok shlomi@ben-hanna.com > wrote:

Yes you can.
You can apply the pull request:
https://github.com/theforeman/foreman_openscap/pull/123 to
foreman_openscap’s engine.rb
To find engine.rb you can run "rpm -ql rubygem-foreman_openscap | grep
engine.rb"
From your logs I’d guess it is in:
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.4.2/lib/foreman_openscap/engine.rb

Once you find it you can add the code from
https://github.com/theforeman/foreman_openscap/pull/123

On Wednesday, August 19, 2015 at 2:22:28 PM UTC+3, Eddie Mashayev wrote:

Hi,

foreman-rake assets:precompile
service foreman restart

I did it, the result is the same.

Warning!cannot load such file – uglifier (in
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.4.2/app/assets/javascript/foreman_openscap/load_report.js)

Can I fix it manually? add load_report.js somehow?

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 2:19 PM, Shlomi Zadok shl...@ben-hanna.com >>> wrote:

Eddie,
It seems that a file load_report.js was missing from rails’
assets:precompile in the engine.
I have created a pull request
https://github.com/theforeman/foreman_openscap/pull/123 which fixes
this issue.
Shlomi

On Wednesday, August 19, 2015 at 12:51:08 PM UTC+3, Eddie Mashayev >>>> wrote:

Hi,

[root@il-foreman-lp1 ~]# yum upgrade rubygem-foreman_openscap
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Repository foreman-plugins is listed more than once in the
configuration

Loading mirror speeds from cached hostfile

Attached the debug files

Thanks for the help Shlomi! Very appreciate it.

foreman-debug-YH9Ow.tar.xz
https://drive.google.com/file/d/0ByXqZPmfe5kiRGlFM2V4LVZZa1E/view?usp=drive_web
​​
foreman-debug.txt
https://drive.google.com/file/d/0ByXqZPmfe5kiU1BDVVpMbGhVM28/view?usp=drive_web

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 12:28 PM, Shlomi Zadok shl...@ben-hanna.com >>>>> wrote:

Can you try “yum upgrade rubygem-foreman_openscap” ?
Also, can you send a foreman-debug output? It is weird that it can’t
load the javascript file.
Thanks

On Wednesday, August 19, 2015 at 12:13:58 PM UTC+3, Eddie Mashayev >>>>>> wrote:

Hi,

** Seems like in your foreman-proxy haven’t created
’logs/openscap-send.log’ can you manually create it?*

The log was created by foreman-proxy the error was taken from there
E, [2015-08-19T09:30:01.408781 #25128] ERROR – : Failed to send
SCAP results to the Foreman server: Connection refused - connect(2)
E, [2015-08-19T10:00:38.153754 #28480] ERROR – : Failed to send
SCAP results to the Foreman server: 500 “Internal Server Error”

Adding the path:
[root@foreman logs]# ll
/usr/share/foreman-proxy/logs/openscap-send.log
-rw-r–r-- 1 foreman-proxy foreman-proxy 1804 Aug 19 10:00 /usr/
share/foreman-proxy/logs/openscap-send.log

** Is foreman up? also, can you update the foreman_openscap gem to
0.4.3 (as it works with Foreman 1.9)?*

I can’t update * foreman_openscap gem to 0.4.3 *because nothing to
update:
[root@foreman foreman-proxy]# yum upgrade foreman_openscap
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Repository foreman-plugins is listed more than once in the
configuration
Loading mirror speeds from cached hostfile

  • epel: mirror.23media.de
    No Match for argument: foreman_openscap
    No package foreman_openscap available.
    No Packages marked for Update

** Do you see the report when clicking on “View Report” ?*
As I mantioned in step 2, I’m getting the error once pressing the
button "View Report"
Warning!
cannot load such file – uglifier (in /opt/rh/ruby193/root/usr/share
/gems/gems/foreman_openscap-0.4.2/app/assets/javascript/
foreman_openscap/load_report.js)

Thanks,
EddieM

On Wednesday, August 19, 2015 at 11:48:01 AM UTC+3, Shlomi Zadok >>>>>>> wrote:

Commented inline:

בתאריך יום רביעי, 19 באוגוסט 2015 בשעה 11:28:01 UTC+3, מאת Eddie
Mashayev:

Hi Shlomi,

Good news - I’ve upgraded the Foreman to newer version 1.9 and it
fixed the issue. I can see the repots nun in Foreman WebUI (Screenshot
attached).

Still I have few problems:

  1. When running the command “smart-proxy-openscap-send” on my
    Foreman server which is proxy server too I get:
    [root@foreman ~]# smart-proxy-openscap-send
    /usr/lib/ruby/1.8/logger.rb:524:in initialize': No such file or directory - logs/openscap-send.log (Errno::ENOENT) from /usr/lib/ruby/1.8/logger.rb:524:inopen’
    from /usr/lib/ruby/1.8/logger.rb:524:in create_logfile' from /usr/lib/ruby/1.8/logger.rb:519:inopen_logfile’
    from /usr/lib/ruby/1.8/logger.rb:486:in initialize' from /usr/lib/ruby/1.8/logger.rb:262:innew’
    from /usr/lib/ruby/1.8/logger.rb:262:in initialize' from /usr/bin/smart-proxy-openscap-send:26:innew’
    from /usr/bin/smart-proxy-openscap-send:26

Seems like in your foreman-proxy haven’t created
’logs/openscap-send.log’ can you manually create it?

[root@foreman foreman-proxy]# cat openscap-send.log
E, [2015-08-19T09:30:01.408781 #25128] ERROR – : Failed to send
SCAP results to the Foreman server: Connection refused - connect(2)
E, [2015-08-19T10:00:38.153754 #28480] ERROR – : Failed to send
SCAP results to the Foreman server: 500 “Internal Server Error”

Is foreman up? also, can you update the foreman_openscap gem to
0.4.3 (as it works with Foreman 1.9)?

  1. When I’m pressing the button View Report I get the error:
    Warning!
    cannot load such file – uglifier (in /opt/rh/ruby193/root/usr/
    share/gems/gems/foreman_openscap-0.4.2/app/assets/javascript/
    foreman_openscap/load_report.js)

Please assist.

See if upgrading foreman_openscap to 0.4.3 with foreman 1.9 helps

Do you see the report when clicking on “View Report” ?

Thanks,
EddieM

On Wednesday, August 19, 2015 at 11:02:24 AM UTC+3, Shlomi Zadok >>>>>>>>> wrote:

Hi Eddie,
It seems that your proxy is not sending the reports back to
Foreman.
To test this, can you please run “smart-proxy-openscap-send” on
the proxy? - this command sends the reports from the proxy to Foreman.
You could also add this to the proxy’s cron (this should have
been added automatically if you installed via RPM) - see
https://github.com/theforeman/smart_proxy_openscap/blob/master/extra/smart-proxy-openscap-send.cron
Hope this helps.

בתאריך יום שלישי, 18 באוגוסט 2015 בשעה 13:48:53 UTC+3, מאת Eddie
Mashayev:

Hi,

My ENV:
Foreman – v1.8.2, Running on CentOS 6.6.

I’ve installed the foreman_openscap Plugin to my Foreman. I
followed the whole guide for how to deploy
https://github.com/theforeman/foreman_openscap but it’s not
working I can’t see any report from my client server.

My client server:

[root@client ~]# crontab -l

Puppet Name: foreman_scap_client_1

0 1 5 * * /usr/bin/foreman_scap_client 1

When I run it manually I get this

[root@client ~]# /usr/bin/foreman_scap_client 1
DEBUG: running: oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_server
–results-arf /tmp/d20150818-29015-u9lmiq/results.xml /var/lib/
openscap/content/
56003534c5208da98ea3fb937a54dbe4f14001af111973a3ef6a17eec95d2e9d
.xml
DEBUG: running: /usr/bin/bzip2 /tmp/d20150818-29015-u9lmiq/
results.xml
Uploading results to https://foreman.corp.local:8443/compliance/arf/1

My Foreman server:

[root@foreman foreman-proxy]# pwd
/var/log/foreman-proxy
[root@foreman foreman-proxy]# tail -f proxy.log
10...* - - [18/Aug/2015 12:50:17] “PUT /arf/1 HTTP/1.1” 200 16
0.0074

But the reports are empty.

Any idea why?

Thanks,
EddieM


You received this message because you are subscribed to a topic in
the Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Eddie,
rubygem-foreman_openscap 0.4.3 is building and will soon be ready (or is
ready)
I believe installing it will solve the issue

··· 2015-08-20 10:53 GMT+03:00 Eddie Mashayev :

Hi Shlomi,

Do you have any other lead? what can be the issue here?

Thanks,
EddieM

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 2:51 PM, Eddie Mashayev eddiem21@gmail.com > wrote:

Hi Shlomi,

Sorry to bugging you :frowning:

I did the changes, adding the changes in engine.rb file marked in BOLD.

require 'deface’
require ‘scaptimony/engine’

module ForemanOpenscap
class Engine < ::Rails::Engine
engine_name 'foreman_openscap’
config.autoload_paths +=
Dir["#{config.root}/app/controllers/concerns"]
config.autoload_paths += Dir["#{config.root}/app/helpers/concerns"]
config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
config.autoload_paths += Dir["#{config.root}/app/overrides"]

# Add any db migrations
initializer "foreman_openscap.load_app_instance_data" do |app|
  app.config.paths['db/migrate'] +=

Scaptimony::Engine.paths[‘db/migrate’].existent
app.config.paths[‘db/migrate’] +=
ForemanOpenscap::Engine.paths[‘db/migrate’].existent
end

initializer 'foreman_openscap.assets.precompile' do |app|
  app.config.assets.precompile += %w(
    'foreman_openscap/policy_edit.js',
    'foreman_openscap/period_selector.js',
    'foreman_openscap/scap_hosts_show.js',
    *'foreman_openscap/load_report.js'*,
    'foreman_openscap/policy.css'
  )
end

initializer 'foreman_openscap.configure_assets', :group => :assets do
  SETTINGS[:foreman_openscap] =
      {:assets => {:precompile => ['foreman_openscap/policy_edit.js',

‘foreman_openscap/period_selector.js’,

‘foreman_openscap/scap_hosts_show.js’,

‘foreman_openscap/load_report.js’,
‘foreman_openscap/policy.css’]}}
end

Also I did:

foreman-rake assets:precompile
service foreman restart

Still the result is the same :frowning:

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 2:30 PM, Shlomi Zadok shlomi@ben-hanna.com >> wrote:

Yes you can.
You can apply the pull request:
https://github.com/theforeman/foreman_openscap/pull/123 to
foreman_openscap’s engine.rb
To find engine.rb you can run "rpm -ql rubygem-foreman_openscap | grep
engine.rb"
From your logs I’d guess it is in:
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.4.2/lib/foreman_openscap/engine.rb

Once you find it you can add the code from
https://github.com/theforeman/foreman_openscap/pull/123

On Wednesday, August 19, 2015 at 2:22:28 PM UTC+3, Eddie Mashayev wrote:

Hi,

foreman-rake assets:precompile
service foreman restart

I did it, the result is the same.

Warning!cannot load such file – uglifier (in
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.4.2/app/assets/javascript/foreman_openscap/load_report.js)

Can I fix it manually? add load_report.js somehow?

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 2:19 PM, Shlomi Zadok shl...@ben-hanna.com >>>> wrote:

Eddie,
It seems that a file load_report.js was missing from rails’
assets:precompile in the engine.
I have created a pull request
https://github.com/theforeman/foreman_openscap/pull/123 which fixes
this issue.
Shlomi

On Wednesday, August 19, 2015 at 12:51:08 PM UTC+3, Eddie Mashayev >>>>> wrote:

Hi,

[root@il-foreman-lp1 ~]# yum upgrade rubygem-foreman_openscap
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Repository foreman-plugins is listed more than once in the
configuration

Loading mirror speeds from cached hostfile

Attached the debug files

Thanks for the help Shlomi! Very appreciate it.

foreman-debug-YH9Ow.tar.xz
https://drive.google.com/file/d/0ByXqZPmfe5kiRGlFM2V4LVZZa1E/view?usp=drive_web
​​
foreman-debug.txt
https://drive.google.com/file/d/0ByXqZPmfe5kiU1BDVVpMbGhVM28/view?usp=drive_web

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 12:28 PM, Shlomi Zadok shl...@ben-hanna.com >>>>>> wrote:

Can you try “yum upgrade rubygem-foreman_openscap” ?
Also, can you send a foreman-debug output? It is weird that it can’t
load the javascript file.
Thanks

On Wednesday, August 19, 2015 at 12:13:58 PM UTC+3, Eddie Mashayev >>>>>>> wrote:

Hi,

** Seems like in your foreman-proxy haven’t created
’logs/openscap-send.log’ can you manually create it?*

The log was created by foreman-proxy the error was taken from there
E, [2015-08-19T09:30:01.408781 #25128] ERROR – : Failed to send
SCAP results to the Foreman server: Connection refused - connect(2)
E, [2015-08-19T10:00:38.153754 #28480] ERROR – : Failed to send
SCAP results to the Foreman server: 500 “Internal Server Error”

Adding the path:
[root@foreman logs]# ll
/usr/share/foreman-proxy/logs/openscap-send.log
-rw-r–r-- 1 foreman-proxy foreman-proxy 1804 Aug 19 10:00 /usr/
share/foreman-proxy/logs/openscap-send.log

** Is foreman up? also, can you update the foreman_openscap gem to
0.4.3 (as it works with Foreman 1.9)?*

I can’t update * foreman_openscap gem to 0.4.3 *because nothing to
update:
[root@foreman foreman-proxy]# yum upgrade foreman_openscap
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Repository foreman-plugins is listed more than once in the
configuration
Loading mirror speeds from cached hostfile

  • epel: mirror.23media.de
    No Match for argument: foreman_openscap
    No package foreman_openscap available.
    No Packages marked for Update

** Do you see the report when clicking on “View Report” ?*
As I mantioned in step 2, I’m getting the error once pressing the
button "View Report"
Warning!
cannot load such file – uglifier (in /opt/rh/ruby193/root/usr/
share/gems/gems/foreman_openscap-0.4.2/app/assets/javascript/
foreman_openscap/load_report.js)

Thanks,
EddieM

On Wednesday, August 19, 2015 at 11:48:01 AM UTC+3, Shlomi Zadok >>>>>>>> wrote:

Commented inline:

בתאריך יום רביעי, 19 באוגוסט 2015 בשעה 11:28:01 UTC+3, מאת Eddie
Mashayev:

Hi Shlomi,

Good news - I’ve upgraded the Foreman to newer version 1.9 and it
fixed the issue. I can see the repots nun in Foreman WebUI (Screenshot
attached).

Still I have few problems:

  1. When running the command “smart-proxy-openscap-send” on my
    Foreman server which is proxy server too I get:
    [root@foreman ~]# smart-proxy-openscap-send
    /usr/lib/ruby/1.8/logger.rb:524:in initialize': No such file or directory - logs/openscap-send.log (Errno::ENOENT) from /usr/lib/ruby/1.8/logger.rb:524:inopen’
    from /usr/lib/ruby/1.8/logger.rb:524:in create_logfile' from /usr/lib/ruby/1.8/logger.rb:519:inopen_logfile’
    from /usr/lib/ruby/1.8/logger.rb:486:in initialize' from /usr/lib/ruby/1.8/logger.rb:262:innew’
    from /usr/lib/ruby/1.8/logger.rb:262:in initialize' from /usr/bin/smart-proxy-openscap-send:26:innew’
    from /usr/bin/smart-proxy-openscap-send:26

Seems like in your foreman-proxy haven’t created
’logs/openscap-send.log’ can you manually create it?

[root@foreman foreman-proxy]# cat openscap-send.log
E, [2015-08-19T09:30:01.408781 #25128] ERROR – : Failed to send
SCAP results to the Foreman server: Connection refused - connect(2)
E, [2015-08-19T10:00:38.153754 #28480] ERROR – : Failed to send
SCAP results to the Foreman server: 500 “Internal Server Error”

Is foreman up? also, can you update the foreman_openscap gem to
0.4.3 (as it works with Foreman 1.9)?

  1. When I’m pressing the button View Report I get the error:
    Warning!
    cannot load such file – uglifier (in /opt/rh/ruby193/root/usr/
    share/gems/gems/foreman_openscap-0.4.2/app/assets/javascript/
    foreman_openscap/load_report.js)

Please assist.

See if upgrading foreman_openscap to 0.4.3 with foreman 1.9 helps

Do you see the report when clicking on “View Report” ?

Thanks,
EddieM

On Wednesday, August 19, 2015 at 11:02:24 AM UTC+3, Shlomi Zadok >>>>>>>>>> wrote:

Hi Eddie,
It seems that your proxy is not sending the reports back to
Foreman.
To test this, can you please run “smart-proxy-openscap-send” on
the proxy? - this command sends the reports from the proxy to Foreman.
You could also add this to the proxy’s cron (this should have
been added automatically if you installed via RPM) - see
https://github.com/theforeman/smart_proxy_openscap/blob/master/extra/smart-proxy-openscap-send.cron
Hope this helps.

בתאריך יום שלישי, 18 באוגוסט 2015 בשעה 13:48:53 UTC+3, מאת Eddie
Mashayev:

Hi,

My ENV:
Foreman – v1.8.2, Running on CentOS 6.6.

I’ve installed the foreman_openscap Plugin to my Foreman. I
followed the whole guide for how to deploy
https://github.com/theforeman/foreman_openscap but it’s not
working I can’t see any report from my client server.

My client server:

[root@client ~]# crontab -l

Puppet Name: foreman_scap_client_1

0 1 5 * * /usr/bin/foreman_scap_client 1

When I run it manually I get this

[root@client ~]# /usr/bin/foreman_scap_client 1
DEBUG: running: oscap xccdf eval --profile xccdf_org.ssgproject
.content_profile_server --results-arf /tmp/d20150818-29015-
u9lmiq/results.xml /var/lib/openscap/content/
56003534c5208da98ea3fb937a54dbe4f14001af111973a3ef6a17eec95d2e9d
.xml
DEBUG: running: /usr/bin/bzip2 /tmp/d20150818-29015-u9lmiq/
results.xml
Uploading results to https://foreman.corp.local:8443/compliance/arf/1

My Foreman server:

[root@foreman foreman-proxy]# pwd
/var/log/foreman-proxy
[root@foreman foreman-proxy]# tail -f proxy.log
10...* - - [18/Aug/2015 12:50:17] “PUT /arf/1 HTTP/1.1” 200
16 0.0074

But the reports are empty.

Any idea why?

Thanks,
EddieM


You received this message because you are subscribed to a topic in
the Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Great!! Thanks for the help and investigation.

Thanks,
Eddie Mashayev
Cell : 054-4692519

··· On Thu, Aug 20, 2015 at 10:54 AM, Shlomi Zadok wrote:

Eddie,
rubygem-foreman_openscap 0.4.3 is building and will soon be ready (or is
ready)
I believe installing it will solve the issue

2015-08-20 10:53 GMT+03:00 Eddie Mashayev eddiem21@gmail.com:

Hi Shlomi,

Do you have any other lead? what can be the issue here?

Thanks,
EddieM

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 2:51 PM, Eddie Mashayev eddiem21@gmail.com >> wrote:

Hi Shlomi,

Sorry to bugging you :frowning:

I did the changes, adding the changes in engine.rb file marked in BOLD.

require 'deface’
require ‘scaptimony/engine’

module ForemanOpenscap
class Engine < ::Rails::Engine
engine_name 'foreman_openscap’
config.autoload_paths +=
Dir["#{config.root}/app/controllers/concerns"]
config.autoload_paths += Dir["#{config.root}/app/helpers/concerns"]
config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
config.autoload_paths += Dir["#{config.root}/app/overrides"]

# Add any db migrations
initializer "foreman_openscap.load_app_instance_data" do |app|
  app.config.paths['db/migrate'] +=

Scaptimony::Engine.paths[‘db/migrate’].existent
app.config.paths[‘db/migrate’] +=
ForemanOpenscap::Engine.paths[‘db/migrate’].existent
end

initializer 'foreman_openscap.assets.precompile' do |app|
  app.config.assets.precompile += %w(
    'foreman_openscap/policy_edit.js',
    'foreman_openscap/period_selector.js',
    'foreman_openscap/scap_hosts_show.js',
    *'foreman_openscap/load_report.js'*,
    'foreman_openscap/policy.css'
  )
end

initializer 'foreman_openscap.configure_assets', :group => :assets do
  SETTINGS[:foreman_openscap] =
      {:assets => {:precompile => ['foreman_openscap/policy_edit.js',

‘foreman_openscap/period_selector.js’,

‘foreman_openscap/scap_hosts_show.js’,

‘foreman_openscap/load_report.js’,
‘foreman_openscap/policy.css’]}}
end

Also I did:

foreman-rake assets:precompile
service foreman restart

Still the result is the same :frowning:

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 2:30 PM, Shlomi Zadok shlomi@ben-hanna.com >>> wrote:

Yes you can.
You can apply the pull request:
https://github.com/theforeman/foreman_openscap/pull/123 to
foreman_openscap’s engine.rb
To find engine.rb you can run "rpm -ql rubygem-foreman_openscap | grep
engine.rb"
From your logs I’d guess it is in:
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.4.2/lib/foreman_openscap/engine.rb

Once you find it you can add the code from
https://github.com/theforeman/foreman_openscap/pull/123

On Wednesday, August 19, 2015 at 2:22:28 PM UTC+3, Eddie Mashayev wrote:

Hi,

foreman-rake assets:precompile
service foreman restart

I did it, the result is the same.

Warning!cannot load such file – uglifier (in
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.4.2/app/assets/javascript/foreman_openscap/load_report.js)

Can I fix it manually? add load_report.js somehow?

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 2:19 PM, Shlomi Zadok shl...@ben-hanna.com >>>>> wrote:

Eddie,
It seems that a file load_report.js was missing from rails’
assets:precompile in the engine.
I have created a pull request
https://github.com/theforeman/foreman_openscap/pull/123 which
fixes this issue.
Shlomi

On Wednesday, August 19, 2015 at 12:51:08 PM UTC+3, Eddie Mashayev >>>>>> wrote:

Hi,

[root@il-foreman-lp1 ~]# yum upgrade rubygem-foreman_openscap
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Repository foreman-plugins is listed more than once in the
configuration

Loading mirror speeds from cached hostfile

Attached the debug files

Thanks for the help Shlomi! Very appreciate it.

foreman-debug-YH9Ow.tar.xz
https://drive.google.com/file/d/0ByXqZPmfe5kiRGlFM2V4LVZZa1E/view?usp=drive_web
​​
foreman-debug.txt
https://drive.google.com/file/d/0ByXqZPmfe5kiU1BDVVpMbGhVM28/view?usp=drive_web

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 12:28 PM, Shlomi Zadok <shl...@ben-hanna.com >>>>>>> > wrote:

Can you try “yum upgrade rubygem-foreman_openscap” ?
Also, can you send a foreman-debug output? It is weird that it
can’t load the javascript file.
Thanks

On Wednesday, August 19, 2015 at 12:13:58 PM UTC+3, Eddie Mashayev >>>>>>>> wrote:

Hi,

** Seems like in your foreman-proxy haven’t created
’logs/openscap-send.log’ can you manually create it?*

The log was created by foreman-proxy the error was taken from there
E, [2015-08-19T09:30:01.408781 #25128] ERROR – : Failed to send
SCAP results to the Foreman server: Connection refused - connect(2)
E, [2015-08-19T10:00:38.153754 #28480] ERROR – : Failed to send
SCAP results to the Foreman server: 500 “Internal Server Error”

Adding the path:
[root@foreman logs]# ll
/usr/share/foreman-proxy/logs/openscap-send.log
-rw-r–r-- 1 foreman-proxy foreman-proxy 1804 Aug 19 10:00 /usr/
share/foreman-proxy/logs/openscap-send.log

** Is foreman up? also, can you update the foreman_openscap gem to
0.4.3 (as it works with Foreman 1.9)?*

I can’t update * foreman_openscap gem to 0.4.3 *because nothing
to update:
[root@foreman foreman-proxy]# yum upgrade foreman_openscap
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Repository foreman-plugins is listed more than once in the
configuration
Loading mirror speeds from cached hostfile

  • epel: mirror.23media.de
    No Match for argument: foreman_openscap
    No package foreman_openscap available.
    No Packages marked for Update

** Do you see the report when clicking on “View Report” ?*
As I mantioned in step 2, I’m getting the error once pressing the
button "View Report"
Warning!
cannot load such file – uglifier (in /opt/rh/ruby193/root/usr/
share/gems/gems/foreman_openscap-0.4.2/app/assets/javascript/
foreman_openscap/load_report.js)

Thanks,
EddieM

On Wednesday, August 19, 2015 at 11:48:01 AM UTC+3, Shlomi Zadok >>>>>>>>> wrote:

Commented inline:

בתאריך יום רביעי, 19 באוגוסט 2015 בשעה 11:28:01 UTC+3, מאת Eddie
Mashayev:

Hi Shlomi,

Good news - I’ve upgraded the Foreman to newer version 1.9 and
it fixed the issue. I can see the repots nun in Foreman WebUI (Screenshot
attached).

Still I have few problems:

  1. When running the command “smart-proxy-openscap-send” on my
    Foreman server which is proxy server too I get:
    [root@foreman ~]# smart-proxy-openscap-send
    /usr/lib/ruby/1.8/logger.rb:524:in initialize': No such file or directory - logs/openscap-send.log (Errno::ENOENT) from /usr/lib/ruby/1.8/logger.rb:524:inopen’
    from /usr/lib/ruby/1.8/logger.rb:524:in create_logfile' from /usr/lib/ruby/1.8/logger.rb:519:inopen_logfile’
    from /usr/lib/ruby/1.8/logger.rb:486:in initialize' from /usr/lib/ruby/1.8/logger.rb:262:innew’
    from /usr/lib/ruby/1.8/logger.rb:262:in initialize' from /usr/bin/smart-proxy-openscap-send:26:innew’
    from /usr/bin/smart-proxy-openscap-send:26

Seems like in your foreman-proxy haven’t created
’logs/openscap-send.log’ can you manually create it?

[root@foreman foreman-proxy]# cat openscap-send.log
E, [2015-08-19T09:30:01.408781 #25128] ERROR – : Failed to
send SCAP results to the Foreman server: Connection refused - connect(2)
E, [2015-08-19T10:00:38.153754 #28480] ERROR – : Failed to
send SCAP results to the Foreman server: 500 “Internal Server Error”

Is foreman up? also, can you update the foreman_openscap gem to
0.4.3 (as it works with Foreman 1.9)?

  1. When I’m pressing the button View Report I get the error:
    Warning!
    cannot load such file – uglifier (in /opt/rh/ruby193/root/usr/
    share/gems/gems/foreman_openscap-0.4.2/app/assets/javascript/
    foreman_openscap/load_report.js)

Please assist.

See if upgrading foreman_openscap to 0.4.3 with foreman 1.9 helps

Do you see the report when clicking on “View Report” ?

Thanks,
EddieM

On Wednesday, August 19, 2015 at 11:02:24 AM UTC+3, Shlomi Zadok >>>>>>>>>>> wrote:

Hi Eddie,
It seems that your proxy is not sending the reports back to
Foreman.
To test this, can you please run “smart-proxy-openscap-send” on
the proxy? - this command sends the reports from the proxy to Foreman.
You could also add this to the proxy’s cron (this should have
been added automatically if you installed via RPM) - see
https://github.com/theforeman/smart_proxy_openscap/blob/master/extra/smart-proxy-openscap-send.cron
Hope this helps.

בתאריך יום שלישי, 18 באוגוסט 2015 בשעה 13:48:53 UTC+3, מאת
Eddie Mashayev:

Hi,

My ENV:
Foreman – v1.8.2, Running on CentOS 6.6.

I’ve installed the foreman_openscap Plugin to my Foreman. I
followed the whole guide for how to deploy
https://github.com/theforeman/foreman_openscap but it’s not
working I can’t see any report from my client server.

My client server:

[root@client ~]# crontab -l

Puppet Name: foreman_scap_client_1

0 1 5 * * /usr/bin/foreman_scap_client 1

When I run it manually I get this

[root@client ~]# /usr/bin/foreman_scap_client 1
DEBUG: running: oscap xccdf eval --profile xccdf_org.
ssgproject.content_profile_server --results-arf /tmp/d20150818
-29015-u9lmiq/results.xml /var/lib/openscap/content/
56003534c5208da98ea3fb937a54dbe4f14001af111973a3ef6a17eec95d2e9d
.xml
DEBUG: running: /usr/bin/bzip2 /tmp/d20150818-29015-u9lmiq/
results.xml
Uploading results to https://foreman.corp.local:8443/compliance/arf/1

My Foreman server:

[root@foreman foreman-proxy]# pwd
/var/log/foreman-proxy
[root@foreman foreman-proxy]# tail -f proxy.log
10...* - - [18/Aug/2015 12:50:17] “PUT /arf/1 HTTP/1.1” 200
16 0.0074

But the reports are empty.

Any idea why?

Thanks,
EddieM


You received this message because you are subscribed to a topic in
the Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in
the Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Hi Shlomi,

I upgraded the rubygem-foreman_openscap 0.4.3 and everything is WORKING :slight_smile:

Thanks a lot for your help!!

Thanks,
EddieM

Thanks,
Eddie Mashayev
Cell : 054-4692519

··· On Thu, Aug 20, 2015 at 10:56 AM, Eddie Mashayev wrote:

Great!! Thanks for the help and investigation.

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Thu, Aug 20, 2015 at 10:54 AM, Shlomi Zadok shlomi@ben-hanna.com > wrote:

Eddie,
rubygem-foreman_openscap 0.4.3 is building and will soon be ready (or is
ready)
I believe installing it will solve the issue

2015-08-20 10:53 GMT+03:00 Eddie Mashayev eddiem21@gmail.com:

Hi Shlomi,

Do you have any other lead? what can be the issue here?

Thanks,
EddieM

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 2:51 PM, Eddie Mashayev eddiem21@gmail.com >>> wrote:

Hi Shlomi,

Sorry to bugging you :frowning:

I did the changes, adding the changes in engine.rb file marked in BOLD.

require 'deface’
require ‘scaptimony/engine’

module ForemanOpenscap
class Engine < ::Rails::Engine
engine_name 'foreman_openscap’
config.autoload_paths +=
Dir["#{config.root}/app/controllers/concerns"]
config.autoload_paths += Dir["#{config.root}/app/helpers/concerns"]
config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
config.autoload_paths += Dir["#{config.root}/app/overrides"]

# Add any db migrations
initializer "foreman_openscap.load_app_instance_data" do |app|
  app.config.paths['db/migrate'] +=

Scaptimony::Engine.paths[‘db/migrate’].existent
app.config.paths[‘db/migrate’] +=
ForemanOpenscap::Engine.paths[‘db/migrate’].existent
end

initializer 'foreman_openscap.assets.precompile' do |app|
  app.config.assets.precompile += %w(
    'foreman_openscap/policy_edit.js',
    'foreman_openscap/period_selector.js',
    'foreman_openscap/scap_hosts_show.js',
    *'foreman_openscap/load_report.js'*,
    'foreman_openscap/policy.css'
  )
end

initializer 'foreman_openscap.configure_assets', :group => :assets

do
SETTINGS[:foreman_openscap] =
{:assets => {:precompile =>
[‘foreman_openscap/policy_edit.js’,

‘foreman_openscap/period_selector.js’,

‘foreman_openscap/scap_hosts_show.js’,

‘foreman_openscap/load_report.js’,
‘foreman_openscap/policy.css’]}}
end

Also I did:

foreman-rake assets:precompile
service foreman restart

Still the result is the same :frowning:

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 2:30 PM, Shlomi Zadok shlomi@ben-hanna.com >>>> wrote:

Yes you can.
You can apply the pull request:
https://github.com/theforeman/foreman_openscap/pull/123 to
foreman_openscap’s engine.rb
To find engine.rb you can run "rpm -ql rubygem-foreman_openscap | grep
engine.rb"
From your logs I’d guess it is in:
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.4.2/lib/foreman_openscap/engine.rb

Once you find it you can add the code from
https://github.com/theforeman/foreman_openscap/pull/123

On Wednesday, August 19, 2015 at 2:22:28 PM UTC+3, Eddie Mashayev >>>>> wrote:

Hi,

foreman-rake assets:precompile
service foreman restart

I did it, the result is the same.

Warning!cannot load such file – uglifier (in
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.4.2/app/assets/javascript/foreman_openscap/load_report.js)

Can I fix it manually? add load_report.js somehow?

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 2:19 PM, Shlomi Zadok shl...@ben-hanna.com >>>>>> wrote:

Eddie,
It seems that a file load_report.js was missing from rails’
assets:precompile in the engine.
I have created a pull request
https://github.com/theforeman/foreman_openscap/pull/123 which
fixes this issue.
Shlomi

On Wednesday, August 19, 2015 at 12:51:08 PM UTC+3, Eddie Mashayev >>>>>>> wrote:

Hi,

[root@il-foreman-lp1 ~]# yum upgrade rubygem-foreman_openscap
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Repository foreman-plugins is listed more than once in the
configuration

Loading mirror speeds from cached hostfile

Attached the debug files

Thanks for the help Shlomi! Very appreciate it.

foreman-debug-YH9Ow.tar.xz
https://drive.google.com/file/d/0ByXqZPmfe5kiRGlFM2V4LVZZa1E/view?usp=drive_web
​​
foreman-debug.txt
https://drive.google.com/file/d/0ByXqZPmfe5kiU1BDVVpMbGhVM28/view?usp=drive_web

Thanks,
Eddie Mashayev
Cell : 054-4692519

On Wed, Aug 19, 2015 at 12:28 PM, Shlomi Zadok < >>>>>>>> shl...@ben-hanna.com> wrote:

Can you try “yum upgrade rubygem-foreman_openscap” ?
Also, can you send a foreman-debug output? It is weird that it
can’t load the javascript file.
Thanks

On Wednesday, August 19, 2015 at 12:13:58 PM UTC+3, Eddie Mashayev >>>>>>>>> wrote:

Hi,

** Seems like in your foreman-proxy haven’t created
’logs/openscap-send.log’ can you manually create it?*

The log was created by foreman-proxy the error was taken from
there
E, [2015-08-19T09:30:01.408781 #25128] ERROR – : Failed to send
SCAP results to the Foreman server: Connection refused - connect(2)
E, [2015-08-19T10:00:38.153754 #28480] ERROR – : Failed to send
SCAP results to the Foreman server: 500 “Internal Server Error”

Adding the path:
[root@foreman logs]# ll
/usr/share/foreman-proxy/logs/openscap-send.log
-rw-r–r-- 1 foreman-proxy foreman-proxy 1804 Aug 19 10:00 /usr/
share/foreman-proxy/logs/openscap-send.log

** Is foreman up? also, can you update the foreman_openscap gem
to 0.4.3 (as it works with Foreman 1.9)?*

I can’t update * foreman_openscap gem to 0.4.3 *because nothing
to update:
[root@foreman foreman-proxy]# yum upgrade foreman_openscap
Loaded plugins: fastestmirror, security
Setting up Upgrade Process
Repository foreman-plugins is listed more than once in the
configuration
Loading mirror speeds from cached hostfile

  • epel: mirror.23media.de
    No Match for argument: foreman_openscap
    No package foreman_openscap available.
    No Packages marked for Update

** Do you see the report when clicking on “View Report” ?*
As I mantioned in step 2, I’m getting the error once pressing the
button "View Report"
Warning!
cannot load such file – uglifier (in /opt/rh/ruby193/root/usr/
share/gems/gems/foreman_openscap-0.4.2/app/assets/javascript/
foreman_openscap/load_report.js)

Thanks,
EddieM

On Wednesday, August 19, 2015 at 11:48:01 AM UTC+3, Shlomi Zadok >>>>>>>>>> wrote:

Commented inline:

בתאריך יום רביעי, 19 באוגוסט 2015 בשעה 11:28:01 UTC+3, מאת Eddie
Mashayev:

Hi Shlomi,

Good news - I’ve upgraded the Foreman to newer version 1.9 and
it fixed the issue. I can see the repots nun in Foreman WebUI (Screenshot
attached).

Still I have few problems:

  1. When running the command “smart-proxy-openscap-send” on my
    Foreman server which is proxy server too I get:
    [root@foreman ~]# smart-proxy-openscap-send
    /usr/lib/ruby/1.8/logger.rb:524:in initialize': No such file or directory - logs/openscap-send.log (Errno::ENOENT) from /usr/lib/ruby/1.8/logger.rb:524:inopen’
    from /usr/lib/ruby/1.8/logger.rb:524:in create_logfile' from /usr/lib/ruby/1.8/logger.rb:519:inopen_logfile’
    from /usr/lib/ruby/1.8/logger.rb:486:in initialize' from /usr/lib/ruby/1.8/logger.rb:262:innew’
    from /usr/lib/ruby/1.8/logger.rb:262:in initialize' from /usr/bin/smart-proxy-openscap-send:26:innew’
    from /usr/bin/smart-proxy-openscap-send:26

Seems like in your foreman-proxy haven’t created
’logs/openscap-send.log’ can you manually create it?

[root@foreman foreman-proxy]# cat openscap-send.log
E, [2015-08-19T09:30:01.408781 #25128] ERROR – : Failed to
send SCAP results to the Foreman server: Connection refused - connect(2)
E, [2015-08-19T10:00:38.153754 #28480] ERROR – : Failed to
send SCAP results to the Foreman server: 500 “Internal Server Error”

Is foreman up? also, can you update the foreman_openscap gem to
0.4.3 (as it works with Foreman 1.9)?

  1. When I’m pressing the button View Report I get the error:
    Warning!
    cannot load such file – uglifier (in /opt/rh/ruby193/root/usr/
    share/gems/gems/foreman_openscap-0.4.2/app/assets/javascript/
    foreman_openscap/load_report.js)

Please assist.

See if upgrading foreman_openscap to 0.4.3 with foreman 1.9
helps

Do you see the report when clicking on “View Report” ?

Thanks,
EddieM

On Wednesday, August 19, 2015 at 11:02:24 AM UTC+3, Shlomi >>>>>>>>>>>> Zadok wrote:

Hi Eddie,
It seems that your proxy is not sending the reports back to
Foreman.
To test this, can you please run "smart-proxy-openscap-send"
on the proxy? - this command sends the reports from the proxy to Foreman.
You could also add this to the proxy’s cron (this should have
been added automatically if you installed via RPM) - see
https://github.com/theforeman/smart_proxy_openscap/blob/master/extra/smart-proxy-openscap-send.cron
Hope this helps.

בתאריך יום שלישי, 18 באוגוסט 2015 בשעה 13:48:53 UTC+3, מאת
Eddie Mashayev:

Hi,

My ENV:
Foreman – v1.8.2, Running on CentOS 6.6.

I’ve installed the foreman_openscap Plugin to my Foreman. I
followed the whole guide for how to deploy
https://github.com/theforeman/foreman_openscap but it’s
not working I can’t see any report from my client server.

My client server:

[root@client ~]# crontab -l

Puppet Name: foreman_scap_client_1

0 1 5 * * /usr/bin/foreman_scap_client 1

When I run it manually I get this

[root@client ~]# /usr/bin/foreman_scap_client 1
DEBUG: running: oscap xccdf eval --profile xccdf_org.
ssgproject.content_profile_server --results-arf /tmp/
d20150818-29015-u9lmiq/results.xml /var/lib/openscap/content/
56003534c5208da98ea3fb937a54dbe4f14001af111973a3ef6a17eec95d2e9d
.xml
DEBUG: running: /usr/bin/bzip2 /tmp/d20150818-29015-u9lmiq/
results.xml
Uploading results to https://foreman.corp.local:8443/compliance/arf/1

My Foreman server:

[root@foreman foreman-proxy]# pwd
/var/log/foreman-proxy
[root@foreman foreman-proxy]# tail -f proxy.log
10...* - - [18/Aug/2015 12:50:17] “PUT /arf/1 HTTP/1.1” 200
16 0.0074

But the reports are empty.

Any idea why?

Thanks,
EddieM


You received this message because you are subscribed to a topic in
the Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe
.
To unsubscribe from this group and all its topics, send an email
to foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in
the Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
foreman-user...@googlegroups.com.
To post to this group, send email to forema...@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/L8JxgmhMcQ0/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this g