Skip to main content

Exception ArgumentError in PhusionPassenger::Rack::ApplicationSpawner (invalid byte sequence in UTF-8)

I’ve got this error in redmine after upgrading to ruby 1.9.


[ pid=17020 thr=20031940 file=utils.rb:176 time=2012-09-07 01:42:47.904 ]: *** Exception ArgumentError in PhusionPassenger::Rack::ApplicationSpawner (invalid byte sequence in UTF-8) (process 17020, thread #<Thread:0x00000002635388>):
	from /var/www/redmine/vendor/bundle/ruby/1.9.1/gems/shared-mime-info-0.1/lib/shared-mime-info.rb:346:in `block (2 levels) in load_magic'
	from /var/www/redmine/vendor/bundle/ruby/1.9.1/gems/shared-mime-info-0.1/lib/shared-mime-info.rb:345:in `each'
	from /var/www/redmine/vendor/bundle/ruby/1.9.1/gems/shared-mime-info-0.1/lib/shared-mime-info.rb:345:in `block in load_magic'
	from /var/www/redmine/vendor/bundle/ruby/1.9.1/gems/shared-mime-info-0.1/lib/shared-mime-info.rb:337:in `open'
	from /var/www/redmine/vendor/bundle/ruby/1.9.1/gems/shared-mime-info-0.1/lib/shared-mime-info.rb:337:in `load_magic'
	from /var/www/redmine/vendor/bundle/ruby/1.9.1/gems/shared-mime-info-0.1/lib/shared-mime-info.rb:377:in `block in <module:MIME>'
	from /var/www/redmine/vendor/bundle/ruby/1.9.1/gems/shared-mime-info-0.1/lib/shared-mime-info.rb:372:in `each'

To solve this error edit shared-mime-info.rb file (shared-mime-info gem) and change the line open(file) in load_magic method:

336  def load_magic(file)
337        open(file) { |f|

with this:

336     def load_magic(file)
337        open(file,  'r:ASCII-8BIT') { |f|

restart web server that is all.

Could not find rake-0.9.2.2 in any of the sources (Bundler::GemNotFound)

After installing Redmine 2.x I got this error:

*** Exception PhusionPassenger::UnknownError in PhusionPassenger::Rack::ApplicationSpawner (Could not find rake-0.9.2.2 in any of the sources (Bundler::GemNotFound)) (process 16175):
	from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/spec_set.rb:90:in `materialize'
	from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `map!'
	from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `materialize'
	from /var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler/definition.rb:127:in `specs'

To solve this I run this command in the redmine application directory

/var/www/redmine/bundle install --path vendor/bundle

bundle:2:in `require’: no such file to load — bundler (LoadError)

I installed Bundler gem during the Redmine installation

# gem install bundler
Successfully installed bundler-1.1.5
1 gem installed
Installing ri documentation for bundler-1.1.5...
Installing RDoc documentation for bundler-1.1.5...

And I got this error:

# bundle
/usr/bin/bundle:2:in `require': no such file to load -- bundler (LoadError)
	from /usr/bin/bundle:2

It seemed that it was not able to load required gem. I found required gem bundler.rb under “/var/lib/gems/1.8/gems/bundler-1.1.5/lib/”

# locate bundler.rb
/var/lib/gems/1.8/gems/bundler-1.1.5/lib/bundler.rb

As a workaround I edited the file /usr/bin/bundle and forced to load the required path:

#!/usr/bin/env ruby
$LOAD_PATH << "/var/lib/gems/1.8/gems/bundler-1.1.5/lib/"
require 'bundler'

And got it working

# bundle
Fetching gem metadata from http://rubygems.org/.......
Installing rake (0.9.2.2) 
Installing i18n (0.6.0) 
Installing multi_json (1.3.6) 
...

Cannot detect your system information, you have to install ionCube loader manually

When accesing to the RVSiteBuilder in CPANEL I got the this error:

“Cannot detect your system information, you have to install ionCube loader manually.
Please contact your provider.”

The IonCube loader was correctly installed in /ioncube/, the solution for this error was to run the following script on the server:

# perl /var/cpanel/rvglobalsoft/rvsitebuilder/panelmenus/cpanel/scripts/autofixphpini.pl
Find php.ini...


PHP configulation for cPanel(3rdparty) has been successfully updated.
Using php Loader: IonCubeLoader
Updating md5sum list
Fetching http://httpupdate.cpanel.net/cpanelsync/easy/targz.yaml (connected:0).......(request attempt 1/12)...Resolving httpupdate.cpanel.net...(resolve attempt 1/65)...
	Fetching http://httpupdate.cpanel.net/mirror_addr_list (connected:0).......(request attempt 1/3)......connecting to 74.50.120.123...@74.50.120.123......connected......receiving...100%......request success......Done
...found 42 host(s) from mirror_addr_list......searching for mirrors (mirror search attempt 1/3)......loaded mirror speeds from cache......mirror search success...@74.50.120.123......connected......receiving...100%......request success......Done
Installing IonCubeLoader
Determining PHP version
Installing IonCube Loader binaries
Activating IonCube Loader extension in /usr/local/cpanel/3rdparty/etc/php.ini
IonCube Loader extension activated

syslog-ng: Number of allowed concurrent connections reached, rejecting connection

I have configured syslog-ng as a log server for all of the servers in my network and I noticed that when the number of servers in the network grew, some of them failed to send log messages to the log server. I found this warnings on my log server:

syslog-ng[16834]: Number of allowed concurrent connections reached, rejecting connection; client='AF_INET( X.X.X.X:48236)', local='AF_INET(0.0.0.0:514)', max='10'

By default the number of concurrent connections is 10, to solve the problem I’ve increased the number of concurrent connections in source secction in /etc/syslog-ng/syslog-ng.conf file:

source network {
        udp(ip(0.0.0.0) port(514));
        tcp(ip(0.0.0.0) port(514)  max-connections(50) );
};