parse_audit_log not working with td-agent - fluentd

I have installed the td-agent with version td-agent-4.1.0-1.el7.x86_64 on CentOS7. I'm not able to load the gem.
# td-agent-gem install fluent-plugin-filter-parse-audit-log
Fetching fluent-plugin-filter-parse-audit-log-0.1.2.gem
Fetching audit_log_parser-0.1.3.gem
Successfully installed audit_log_parser-0.1.3
Successfully installed fluent-plugin-filter-parse-audit-log-0.1.2
Parsing documentation for audit_log_parser-0.1.3
Installing ri documentation for audit_log_parser-0.1.3
Parsing documentation for fluent-plugin-filter-parse-audit-log-0.1.2
Installing ri documentation for fluent-plugin-filter-parse-audit-log-0.1.2
Done installing documentation for audit_log_parser, fluent-plugin-filter-parse-audit-log after 0 seconds
2 gems installed
Input config:
<source>
#type tail
path /var/log/audit/audit.log
pos_file /var/log/td-agent/audit.pos
tag syslog.audit
<parse>
#type parse_audit_log
</parse>
</source>
Error to load parse_audit_log
# /opt/td-agent/bin/fluentd --dry-run --config /etc/td-agent/td-agent.conf
2021-03-24 15:01:19 +0000 [info]: parsing config file is succeeded path="/etc/td-agent/td-agent.conf"
2021-03-24 15:01:19 +0000 [info]: gem 'fluent-plugin-elasticsearch' version '4.3.3'
2021-03-24 15:01:19 +0000 [info]: gem 'fluent-plugin-filter-parse-audit-log' version '0.1.2'
2021-03-24 15:01:19 +0000 [info]: gem 'fluent-plugin-flowcounter-simple' version '0.1.0'
2021-03-24 15:01:19 +0000 [info]: gem 'fluent-plugin-kafka' version '0.16.0'
2021-03-24 15:01:19 +0000 [info]: gem 'fluent-plugin-prometheus' version '1.8.5'
2021-03-24 15:01:19 +0000 [info]: gem 'fluent-plugin-prometheus_pushgateway' version '0.0.2'
2021-03-24 15:01:19 +0000 [info]: gem 'fluent-plugin-record-modifier' version '2.1.0'
2021-03-24 15:01:19 +0000 [info]: gem 'fluent-plugin-rewrite-tag-filter' version '2.3.0'
2021-03-24 15:01:19 +0000 [info]: gem 'fluent-plugin-s3' version '1.5.1'
2021-03-24 15:01:19 +0000 [info]: gem 'fluent-plugin-sd-dns' version '0.1.0'
2021-03-24 15:01:19 +0000 [info]: gem 'fluent-plugin-systemd' version '1.0.2'
2021-03-24 15:01:19 +0000 [info]: gem 'fluent-plugin-td' version '1.1.0'
2021-03-24 15:01:19 +0000 [info]: gem 'fluent-plugin-webhdfs' version '1.4.0'
2021-03-24 15:01:19 +0000 [info]: gem 'fluentd' version '1.12.1'
2021-03-24 15:01:19 +0000 [info]: starting fluentd-1.12.1 as dry run mode ruby="2.7.2"
2021-03-24 15:01:19 +0000 [warn]: [output_td] Use different plugin for secondary. Check the plugin works with primary like secondary_file primary="Fluent::Plugin::TreasureDataLogOutput" secondary="Fluent::Plugin::FileOutput"
2021-03-24 15:01:20 +0000 [error]: config error file="/etc/td-agent/td-agent.conf" error_class=Fluent::ConfigError error="Unknown parser plugin 'parse_audit_log'. Run 'gem search -rd fluent-plugin' to find plugins"
Could you please let me know what are the way to load plugins? I have followed the https://docs.fluentd.org/deployment/plugin-management#for-td-agent but still some issues while restarting the service with systemctl.

Related

How to fix "Your Ruby version is 2.5.3, but your Gemfile specified 2.5.1" deploying the AWS eb?

Issue: I am having issues deploying app to AWS EB and every remedy I have found on SO and google have not helped my situation.
I installed the AWS EB command line and looking to deploy an app I have built to there but i keep getting this error after attempts to resolve it:
ERROR [Instance: i-065ec77b2c530362b] Command failed on instance. Return code: 18 Output: (TRUNCATED)...g: the running version of Bundler (1.16.2) is older than the version that created the lockfile (1.17.2). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Your Ruby version is 2.5.3, but your Gemfile specified 2.5.1.
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2018-12-21 08:51:28 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
The app was initially built with 2.5.1 but I switched it to 2.5.3 today so I can put it onto AWS. (I have both of these ruby versions with rbenv)
I have done:
Set ruby '2.5.3' in Gemfile
bundle update
bundle install
gem install bundler
gem update bundler
deleted gem lock file and bundle updated
./bin/spring stop (spring not running)
ruby -v is ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
(this is local only, I have rbenv global set to 2.5.1, but I don't believe this is an issue as the error states i's the gemfile)
I have done rbenv rehash after updating or installing bundle
bundle update --ruby
Gemfile.lock shows 2.5.3
bundle env shows:
RUBY VERSION
ruby 2.5.3p105
BUNDLED WITH
1.17.2
```
My entire Gemfile - just in case this may help for something:
gem 'dotenv-rails', groups: [:development, :test]
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.5.3'
gem 'rails', '~> 5.2.1'
gem 'stripe'
gem 'stripe_event'
gem 'pry'
# Use sqlite3 as the database for Active Record
# gem 'sqlite3'
gem 'pg'
gem 'puma', '~> 3.11'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem "chartkick"
gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
# gem 'redis', '~> 4.0'
gem 'api-pagination', '~> 4.1', '>= 4.1.1'
gem 'will_paginate', '~> 3.1', '>= 3.1.6'
gem 'groupdate'
gem 'blazer'
gem 'ahoy_matey'
gem 'devise'
gem 'cancancan', '~> 2.0'
gem 'carrierwave', '~> 1.0'
gem 'carrierwave-aws'
gem 'carrierwave-ffmpeg'
gem 'carrierwave-video'
gem 'bootstrap', '~> 4.1.3'
gem 'sprockets-rails', :require => 'sprockets/railtie'
gem 'sprockets'
gem 'jquery-rails'
gem 'mini_magick', '~> 4.8'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
group :development, :test do
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
gem 'chromedriver-helper'
end
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
More info:
rbenv local: 2.5.3
rbenv global: 2.5.1
bundle exec which ruby: /home/bob/.rbenv/versions/2.5.3/bin/ruby
rbenv versions:
system
2.5.1
2.5.3 (set by /home/bob/Apps/uploader-master-side-3/.ruby-version)
bundler -v: Bundler version 1.17.2
bundle platform --ruby: ruby 2.5.3p105
which ruby: /home/bob/.rbenv/shims/ruby
rails c:
Running via Spring preloader in process 5437
Loading development environment (Rails 5.2.2)
irb(main):001:0>
which gem: /home/bob/.rbenv/shims/gem
rbenv which gem: /home/bob/.rbenv/versions/2.5.3/bin/gem
which -a gem:
/home/bob/.rbenv/shims/gem
/usr/bin/gem
rbenv which bundle: /home/bob/.rbenv/versions/2.5.3/bin/bundle
echo $PATH: /home/bob/.rbenv/plugins/ruby-build/bin:/home/bob/.rbenv/shims:/home/bob/.rbenv/bin:/home/bob/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
ruby-build --version: ruby-build 20181106-14-g1ec9abd
When I run server:
=> Booting Puma
=> Rails 5.2.2 application starting in development
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.12.0 (ruby 2.5.3-p105), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop
Thank you for your time and reading this and your help!!!
NAIL IN THE COFFIN:
I just took the copy of my app i created before updating to the new ruby and tried to deploy it and got this:
Your Ruby version is 2.5.3, but your Gemfile specified 2.5.1.
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2018-12-21 11:04:39 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
.....this is which 2.5.1 set globally and locally
What other options do I have? Delete and re install rbenv? Make a new app and copy everything over except the gemfile? I'm out of options and ideas it seems like
UPDATE:
I had no clue that AWS EB was based off my git commits and i never updated them before trying... ( wow ) and now i don't receive the ruby version error...
So now i don't get the version error but I do get this error:
2018-12-21 22:50:56 ERROR [Instance: i-00ae954ad2b716b2a] Command failed on instance. Return code: 1 Output: (TRUNCATED)...lizers/carrierwave.rb:1:in `<main>'
/var/app/ondeck/config/environment.rb:5:in `<main>'
/opt/rubies/ruby-2.5.3/bin/bundle:23:in `load'
/opt/rubies/ruby-2.5.3/bin/bundle:23:in `<main>'
Tasks: TOP => environment
(See full trace by running task with --trace).
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/11_asset_compilation.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2018-12-21 22:50:56 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2018-12-21 22:51:58 ERROR Create environment operation is complete, but with errors. For more information, see troubleshooting documentation.
Since this error is different from the original question, I have created a new one here: Deploying with AWWS EB but with erors
I was having this problem after upgrading the platform from Ruby 3.0 Amazon Linux 2/3.4.4 to Ruby 3.0 Amazon Linux 2/3.4.6, which upgrades Ruby 3.0.3 -> 3.0.4
I was using eb cli to deploy with, eb deploy, but what solve the issue was deploying via uploading a zip file directly in AWS Elastic Beanstalk console, in Elastic Beanstalk > Applications > your-app > Application versions.
The zip file was generated with git archive -v -o myapp.zip --format=zip HEAD, according to AWS manual.
I am replying here because this was the first SO link on Google, but this was the answer that helped me.

Passenger-irb --debug <PID> fails to start

I have Passenger-Enterprise installed on a production server so I can have access to passenger-irb. I am following the instructions found on this documentation here Passenger with Nginx Debugger
Here is the contents of my Gemfile:
source 'https://rubygems.org'
gem 'activeadmin', '1.0.0'
gem 'airbrake', '~> 5.5'
gem 'aws-sdk', '< 2.0' # paperclip doesn't work with the new aws-sdk gem
gem 'redcarpet'
gem 'brakeman'
gem 'byebug', platforms: :ruby_20
gem 'bundler-audit'
gem 'coffee-rails'
As you can see, I have byebug correctly installed. The problems begin when I follow the next step.
In my /etc/nginx/nginx.conf file, I place the passenger_debbuger on; option.
restarting nginx/passenger with this option on immediately kills all passenger processes. When I inspect the error.log file, I see the following error:
[ E 2017-10-20 16:20:20.3577 31875/Tr
age/Cor/App/Implementation.cpp:289 ]: Could not spawn process for application /var/local/openhub/current: An error occurred while starting up the preloader.
9 Error ID: 34c68141
10 Error details saved to: /tmp/passenger-error-CXx53h.html
11 Message from application: cannot load such file -- byebug (LoadError)
12 /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:346:in `require'
13 /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:346:in `load_byebug_gem'
14 /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:326:in `before_loading_app_code_step2'
15 /usr/share/passenger-enterprise/helper-scripts/rack-preloader.rb:85:in `preload_app'
16 /usr/share/passenger-enterprise/helper-scripts/rack-preloader.rb:140:in `<module:App>'
17 /usr/share/passenger-enterprise/helper-scripts/rack-preloader.rb:14:in `<module:PhusionPassenger>'
18 /usr/share/passenger-enterprise/helper-scripts/rack-preloader.rb:13:in `<main>'
I'm at a loss as to what to try to do at this point. Passenger does not have any documentation anywhere as to how to troubleshoot. I've followed the directions exactly but the passenger_debugger option is not working properly. Has anyone had this problem?

Gem::Ext::BuildError: ERROR: Failed to build gem native extension - Ubuntu

Whenever I try to bundle install on DigitalOcean Droplet - ruby-rails-postgres-nginx-unicorn
I later installed mongodb using SSH from terminal
and later when uploading the project to the /home// folder and bundle install, I get this error.
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
vinod#ruby-rails-postgres-nginx-unicorn-512mb-sgp1-01:~/dride$ bundle
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 11.1.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.9.0
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.5.2
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.0.0
Using nokogiri 1.6.7.2
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.7
Using loofah 2.0.3
Using rails-html-sanitizer 1.0.3
Using actionview 4.2.5.2
Using rack 1.6.4
Using rack-test 0.6.3
Using actionpack 4.2.5.2
Using globalid 0.3.6
Using activejob 4.2.5.2
Using mime-types-data 3.2016.0521
Using mime-types 3.1
Using mail 2.6.4
Using actionmailer 4.2.5.2
Using activemodel 4.2.5.2
Using arel 6.0.3
Using activerecord 4.2.5.2
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20160525-15401-ztxhbh.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling crypt_gensalt.c
compiling crypt.c
compiling crypt_blowfish.c
virtual memory exhausted: Cannot allocate memory
make: *** [crypt_blowfish.o] Error 1
make failed, exit code 2
Gem files will remain installed in /tmp/bundler20160525-15401-11lp2i/bcrypt-3.1.11/gems/bcrypt-3.1.11 for inspection.
Results logged to /tmp/bundler20160525-15401-11lp2i/bcrypt-3.1.11/extensions/x86_64-linux/2.2.0/bcrypt-3.1.11/gem_make.out
An error occurred while installing bcrypt (3.1.11), and Bundler cannot
continue.
Make sure that gem install bcrypt -v '3.1.11' succeeds before bundling.
And my gemfile is
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5.2'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'mongoid', '~> 5.1.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
gem "factory_girl_rails"
gem 'ffaker'
gem "shoulda-matchers"
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
group :test do
gem "rspec-rails"
end
gem "devise"
UPDATED
When I Tried uncommenting gem 'bcrypt', '~> 3.1.7' and run bundle install again
I get this error.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-2.2.1/bin/ruby -r ./siteconf20160525-19540-1s18rpw.rb extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.0.0
checking for gzdopen() in -lz... yes
checking for iconv... yes
************************************************************************
IMPORTANT NOTICE:
Building Nokogiri with a packaged version of libxml2-2.9.2
with the following patches applied:
- 0001-Revert-Missing-initialization-for-the-catalog-module.patch
- 0002-Fix-missing-entities-after-CVE-2014-3660-fix.patch
- 0003-Stop-parsing-on-entities-boundaries-errors.patch
- 0004-Cleanup-conditional-section-error-handling.patch
- 0005-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch
- 0006-Another-variation-of-overflow-in-Conditional-section.patch
- 0007-Fix-an-error-in-previous-Conditional-section-patch.patch
- 0008-CVE-2015-8035-Fix-XZ-compression-support-loop.patch
- 0009-Updated-config.guess.patch
- 0010-Fix-parsering-short-unclosed-comment-uninitialized-access.patch
- 0011-Avoid-extra-processing-of-MarkupDecl-when-EOF.patch
- 0012-Avoid-processing-entities-after-encoding-conversion-.patch
- 0013-CVE-2015-7497-Avoid-an-heap-buffer-overflow-in-xmlDi.patch
- 0014-CVE-2015-5312-Another-entity-expansion-issue.patch
- 0015-Add-xmlHaltParser-to-stop-the-parser.patch
- 0016-Detect-incoherency-on-GROW.patch
- 0017-CVE-2015-7500-Fix-memory-access-error-due-to-incorre.patch
- 0018-CVE-2015-8242-Buffer-overead-with-HTML-parser-in-pus.patch
- 0019-Do-not-print-error-context-when-there-is-none.patch
- 0020-xmlStopParser-reset-errNo.patch
- 0021-Reuse-xmlHaltParser-where-it-makes-sense.patch
Team Nokogiri will keep on doing their best to provide security
updates in a timely manner, but if this is a concern for you and want
to use the system library instead; abort this installation process and
reinstall nokogiri as follows:
gem install nokogiri -- --use-system-libraries
[--with-xml2-config=/path/to/xml2-config]
[--with-xslt-config=/path/to/xslt-config]
If you are using Bundler, tell it to use the option:
bundle config build.nokogiri --use-system-libraries
bundle install
Note, however, that nokogiri is not fully compatible with arbitrary
versions of libxml2 provided by OS/package vendors.
************************************************************************
Extracting libxml2-2.9.2.tar.gz into tmp/x86_64-unknown-linux-gnu/ports/libxml2/2.9.2... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0001-Revert-Missing-initialization-for-the-catalog-module.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0002-Fix-missing-entities-after-CVE-2014-3660-fix.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0003-Stop-parsing-on-entities-boundaries-errors.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0004-Cleanup-conditional-section-error-handling.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0005-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0006-Another-variation-of-overflow-in-Conditional-section.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0007-Fix-an-error-in-previous-Conditional-section-patch.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0008-CVE-2015-8035-Fix-XZ-compression-support-loop.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0009-Updated-config.guess.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0010-Fix-parsering-short-unclosed-comment-uninitialized-access.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0011-Avoid-extra-processing-of-MarkupDecl-when-EOF.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0012-Avoid-processing-entities-after-encoding-conversion-.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0013-CVE-2015-7497-Avoid-an-heap-buffer-overflow-in-xmlDi.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0014-CVE-2015-5312-Another-entity-expansion-issue.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0015-Add-xmlHaltParser-to-stop-the-parser.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0016-Detect-incoherency-on-GROW.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0017-CVE-2015-7500-Fix-memory-access-error-due-to-incorre.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0018-CVE-2015-8242-Buffer-overead-with-HTML-parser-in-pus.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0019-Do-not-print-error-context-when-there-is-none.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0020-xmlStopParser-reset-errNo.patch... OK
Running git apply with /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/patches/libxml2/0021-Reuse-xmlHaltParser-where-it-makes-sense.patch... OK
Running 'configure' for libxml2 2.9.2... OK
Running 'compile' for libxml2 2.9.2... ERROR, review '/home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/ext/nokogiri/tmp/x86_64-unknown-linux-gnu/ports/libxml2/2.9.2/compile.log' to see what happened. Last lines are:
========================================================================
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/ext/nokogiri/tmp/x86_64-unknown-linux-gnu/ports/libxml2/2.9.2/libxml2-2.9.2/include/libxml'
make[3]: Entering directory `/home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/ext/nokogiri/tmp/x86_64-unknown-linux-gnu/ports/libxml2/2.9.2/libxml2-2.9.2/include'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/ext/nokogiri/tmp/x86_64-unknown-linux-gnu/ports/libxml2/2.9.2/libxml2-2.9.2/include'
make[2]: Leaving directory `/home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/ext/nokogiri/tmp/x86_64-unknown-linux-gnu/ports/libxml2/2.9.2/libxml2-2.9.2/include'
Making all in .
make[2]: Entering directory `/home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/ext/nokogiri/tmp/x86_64-unknown-linux-gnu/ports/libxml2/2.9.2/libxml2-2.9.2'
CC SAX.lo
CC entities.lo
CC encoding.lo
CC error.lo
CC parserInternals.lo
CC parser.lo
virtual memory exhausted: Cannot allocate memory
make[2]: *** [parser.lo] Error 1
make[2]: Leaving directory `/home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/ext/nokogiri/tmp/x86_64-unknown-linux-gnu/ports/libxml2/2.9.2/libxml2-2.9.2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2/ext/nokogiri/tmp/x86_64-unknown-linux-gnu/ports/libxml2/2.9.2/libxml2-2.9.2'
make: *** [all] Error 2
========================================================================
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/rvm/rubies/ruby-2.2.1/bin/$(RUBY_BASE_NAME)
--help
--clean
--use-system-libraries
--enable-static
--disable-static
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--enable-cross-build
--disable-cross-build
/home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:366:in `block in execute': Failed to complete compile task (RuntimeError)
from /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:337:in `chdir'
from /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:337:in `execute'
from /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:111:in `compile'
from /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/mini_portile2-2.0.0/lib/mini_portile2/mini_portile.rb:150:in `cook'
from extconf.rb:289:in `block (2 levels) in process_recipe'
from extconf.rb:182:in `block in chdir_for_build'
from extconf.rb:181:in `chdir'
from extconf.rb:181:in `chdir_for_build'
from extconf.rb:288:in `block in process_recipe'
from extconf.rb:187:in `tap'
from extconf.rb:187:in `process_recipe'
from extconf.rb:478:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /home/vinod/dride/vendor/bundle/ruby/2.2.0/gems/nokogiri-1.6.7.2 for inspection.
Results logged to /home/vinod/dride/vendor/bundle/ruby/2.2.0/extensions/x86_64-linux/2.2.0/nokogiri-1.6.7.2/gem_make.out
An error occurred while installing nokogiri (1.6.7.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.7.2'` succeeds before bundling.
When I increased the Memory & Size of droplet from 521MB to 2GB, this all errors gone and it worked for me.

File to import not found or unreadable: compass in production mode

If i run in dev mode application running. If with rails server -e production, display error: Error compiling asset w.css:
Sass::SyntaxError: File to import not found or unreadable: compass/reset.
More logs
Started GET "/assets/w.css" for 127.0.0.1 at 2016-04-12 10:51:51 +0300
Error compiling asset w.css:
Sass::SyntaxError: File to import not found or unreadable: compass/reset.
(in /home/user/projects/projectname/app/assets/stylesheets/welcome.sass)
Served asset /w.css - 500 Internal Server Error
Started GET "/assets/w.js" for 127.0.0.1 at 2016-04-12 10:51:51 +0300
Error compiling asset w.js:
Sprockets::FileNotFound: couldn't find file 'bootstrap-transition'
(in /home/user/projects/projectname/app/assets/javascripts/w.js.coffee:3)
Served asset /w.js - 500 Internal Server Error
Started GET "/assets/w.css" for 127.0.0.1 at 2016-04-12 10:52:16 +0300
Error compiling asset w.css:
Sass::SyntaxError: File to import not found or unreadable: compass/reset.
(in /home/user/projects/projectname/app/assets/stylesheets/welcome.sass)
gemfile
group :assets do
gem 'sass-rails'
gem 'coffee-rails'
gem 'compass-rails'
gem 'bootstrap-sass', '2.1.1.0'
gem 'therubyracer'
gem 'execjs'
gem 'uglifier', '>= 1.0.3'
gem 'oily_png'
# gem 'font-awesome-rails'
gem 'turbo-sprockets-rails3'
end
How solve this issue?
You need to precompile your assets:
bundle exec rake assets:precompile

passenger error 'cannot load such file: ... union_station_hooks_core'

I get the following error on my rails app:
Web application could not be started
cannot load such file -- /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core (LoadError)
/u/sf/netmon/.rbenv/versions/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/u/sf/netmon/.rbenv/versions/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/src/ruby_supportlib/phusion_passenger.rb:235:in `require_passenger_lib'
/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:232:in `before_loading_app_code_step1'
/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/src/helper-scripts/rack-preloader.rb:99:in `preload_app'
/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/src/helper-scripts/rack-preloader.rb:156:in `<module:App>'
/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/src/helper-scripts/rack-preloader.rb:29:in `<main>'
Error ID
28518bd5
Looking at the file system:
-bash-4.1$ pwd
/opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core
-bash-4.1$ tree
.
0 directories, 0 files
So obviously there is indeed no such file... how should i fix this?
My Gemfile:
source 'https://rubygems.org'
gem 'rails', git: 'https://github.com/rails/rails', branch: '4-2-stable'
gem 'actionpack-action_caching'
gem 'pg'
gem 'redis'
gem 'rubytree'
gem 'turbolinks'
gem 'jquery-rails'
gem 'jquery-datatables-rails', git: 'https://github.com/rweng/jquery-datatables-rails'
gem 'rails-timeago'
gem 'dygraphs-rails'
gem 'underscore-rails'
gem 'd3_rails'
gem 'twitter-bootstrap-rails', '= 2.2.8'
gem 'less-rails'
gem 'coffee-rails', git: 'https://github.com/rails/coffee-rails'
gem 'coffeebeans'
gem 'jquery-ui-rails'
group :assets do
gem 'sass-rails', git: 'https://github.com/rails/sass-rails', branch: '5-0-stable'
gem 'therubyracer', platforms: :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jbuilder', '~> 1.0.1'
gem 'passenger', git: 'https://github.com/FooBarWidget/passenger', branch: 'stable-5.0'
gem 'rack-webauth'
gem 'bunny'
Installed ruby 2.3.0 via ruby-build and passenger's apache module reported no errors:
$ ./passenger-install-apache2-module
...
Validating installation...
* Checking whether this Passenger install is in PATH... (!)
Please add /opt/rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/passenger-e139c4cd3ebd/bin to PATH.
Otherwise you will get "command not found" errors upon running
any Passenger commands.
Learn more at about PATH at:
https://www.phusionpassenger.com/library/indepth/environment_variables.html#the-path-environment-variable
* Checking whether there are no other Passenger installations... ✓
* Checking whether Apache is installed... ✓
* Checking whether the Passenger module is correctly configured in Apache... ✓
Detected 0 error(s), 1 warning(s).
Press ENTER to continue.
seems like a quick search through the passenger github helped...
union_station_hooks_core and union_station_hooks_rails are both git submodules on the main passenger git repo. so modifying my gemfile to include submodules: true will pull in the required files.
gem 'passenger', \
git: 'https://github.com/FooBarWidget/passenger', \
branch: 'stable-5.0', \
submodules: true
I has same problem. It is because you passenger is not full.
Full passenger will be via make.
just download needed version like this
wget http://s3.amazonaws.com/phusion-passenger/releases/passenger-5.0.26.tar.gz
And extract to /opt/passenger
Then rerun passenger-install-nginx-module and add it to PATH -
echo 'PATH=/opt/passenger/bin:$PATH' >>etc/profile
PATH=/opt/passenger/bin:$PATH
export PATH
passenger-config validate-install
And not forget correct in http section
http {
...
passenger_root /opt/passenger;
passenger_ruby /usr/bin/ruby;
...
}

Resources