I'm running macOS Monterey on an M1 Pro. I've installed rvm with Ruby 3.0.0 and 2.7.2.
➜ ~ rvm list
=* ruby-2.7.3 [ arm64 ]
ruby-3.0.0 [ arm64 ]
# => - current
# =* - current && default
# * - default
I can install gems without any issues when using Ruby 3.0.0. However, when I attempt to install gems using 2.7.3 - I start hitting problems.
➜ ~ gem install bundler -V --debug
NOTE: Debugging mode prints all exceptions even when rescued
Exception `SocketError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:960 - getaddrinfo: Invalid value for ai_flags
Exception `SocketError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:962 - Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Invalid value for ai_flags)
Exception `SocketError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:1025 - Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Invalid value for ai_flags)
Exception `Gem::RemoteFetcher::UnknownHostError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/rubygems/remote_fetcher.rb:272 - no such name (https://rubygems.org/api/v1/dependencies)
Exception `Errno::EEXIST' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/fileutils.rb:250 - File exists # dir_s_mkdir - /Users/cclarke/.gem/specs/rubygems.org%443
Exception `SocketError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:960 - getaddrinfo: Invalid value for ai_flags
Exception `SocketError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:962 - Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Invalid value for ai_flags)
Exception `SocketError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:1025 - Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Invalid value for ai_flags)
Exception `Gem::RemoteFetcher::UnknownHostError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/rubygems/remote_fetcher.rb:272 - no such name (https://rubygems.org/prerelease_specs.4.8.gz)
Exception `Errno::EEXIST' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/fileutils.rb:250 - File exists # dir_s_mkdir - /Users/cclarke/.gem/specs/rubygems.org%443
Exception `SocketError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:960 - getaddrinfo: Invalid value for ai_flags
Exception `SocketError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:962 - Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Invalid value for ai_flags)
Exception `SocketError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:1025 - Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Invalid value for ai_flags)
Exception `Gem::RemoteFetcher::UnknownHostError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/rubygems/remote_fetcher.rb:272 - no such name (https://rubygems.org/specs.4.8.gz)
Exception `Gem::RemoteFetcher::UnknownHostError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/rubygems/spec_fetcher.rb:256 - no such name (https://rubygems.org/specs.4.8.gz)
Exception `Gem::UnsatisfiableDependencyError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/rubygems/resolver.rb:235 - Unable to resolve dependency: user requested 'bundler (>= 0)'
ERROR: Could not find a valid gem 'bundler' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - no such name (https://rubygems.org/specs.4.8.gz)
Exception `Errno::EEXIST' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/fileutils.rb:250 - File exists # dir_s_mkdir - /Users/cclarke/.gem/specs/rubygems.org%443
Exception `Errno::ENOENT' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/rubygems/remote_fetcher.rb:297 - No such file or directory # rb_file_s_stat - /Users/cclarke/.gem/specs/rubygems.org%443/latest_specs.4.8
Exception `SocketError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:960 - getaddrinfo: Invalid value for ai_flags
Exception `SocketError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:962 - Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Invalid value for ai_flags)
Exception `SocketError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:1025 - Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Invalid value for ai_flags)
Exception `Gem::RemoteFetcher::UnknownHostError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/rubygems/remote_fetcher.rb:272 - no such name (https://rubygems.org/latest_specs.4.8.gz)
Exception `Gem::RemoteFetcher::UnknownHostError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/rubygems/spec_fetcher.rb:256 - no such name (https://rubygems.org/latest_specs.4.8.gz)
Exception `Errno::EEXIST' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/fileutils.rb:250 - File exists # dir_s_mkdir - /Users/cclarke/.gem/specs/rubygems.org%443
Exception `SocketError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:960 - getaddrinfo: Invalid value for ai_flags
Exception `SocketError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:962 - Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Invalid value for ai_flags)
Exception `SocketError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:1025 - Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Invalid value for ai_flags)
Exception `Gem::RemoteFetcher::UnknownHostError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/rubygems/remote_fetcher.rb:272 - no such name (https://rubygems.org/prerelease_specs.4.8.gz)
Exception `Gem::RemoteFetcher::UnknownHostError' at /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/rubygems/spec_fetcher.rb:256 - no such name (https://rubygems.org/prerelease_specs.4.8.gz)
I've tried installing Ruby 2.7.2 in 2 ways but the problem still persists.
rvm install 2.7.2 (Installs fine)
Using this GitHub link
I think perhaps, it's the problem is with openssh but I cannot be sure. Why it can't open a TCP connection I with ruby gems I can't figure. If anyone has any insight I'd be very grateful.
Kind regards,
Christian
~edit. My Gem sources are correctly set for 2.7.3 as they are for 3.0.0. Which works fine.
➜ ~ gem sources
*** CURRENT SOURCES ***
https://rubygems.org/
I ran curl from the rubygems.org site
➜ ~ curl -Lks 'https://git.io/rg-ssl' | ruby
Here's your Ruby and OpenSSL environment:
Ruby: 2.7.3p183 (2021-04-05 revision 6847ee089d7655b2a0eea4fee3133aeacd4cc7cc) [arm64-darwin21]
RubyGems: 3.1.6
Bundler: 2.1.4
Compiled with: OpenSSL 1.1.1m 14 Dec 2021
Loaded version: OpenSSL 1.1.1m 14 Dec 2021
SSL_CERT_FILE: /opt/homebrew/etc/openssl#1.1/cert.pem
SSL_CERT_DIR: /opt/homebrew/etc/openssl#1.1/certs
With that out of the way, let's see if you can connect to rubygems.org...
Bundler connection to rubygems.org: failed ❌ (Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Invalid value for ai_flags))
RubyGems connection to rubygems.org: failed ❌ (no such name (https://rubygems.org))
Ruby net/http connection to rubygems.org: failed ❌
Unfortunately, this Ruby can't connect to rubygems.org. 😡
Even worse, we're not sure why. 😕
Here's the full error information:
SocketError: Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Invalid value for ai_flags)
/Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:960:in `initialize'
/Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:960:in `open'
/Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:960:in `block in connect'
/Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/timeout.rb:95:in `block in timeout'
/Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/timeout.rb:105:in `timeout'
/Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:958:in `connect'
/Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:943:in `do_start'
/Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:938:in `start'
-:101:in `<main>'
You might have more luck using Mislav's SSL doctor.rb script. You can get it here:
https://github.com/mislav/ssl-tools/blob/8b3dec4/doctor.rb
Read more about the script and how to use it in this blog post:
https://mislav.net/2013/07/ruby-openssl/
Traceback (most recent call last):
8: from -:101:in `<main>'
7: from /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:938:in `start'
6: from /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:943:in `do_start'
5: from /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:958:in `connect'
4: from /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/timeout.rb:105:in `timeout'
3: from /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/timeout.rb:95:in `block in timeout'
2: from /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:960:in `block in connect'
1: from /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:960:in `open'
/Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:960:in `initialize': getaddrinfo: Invalid value for ai_flags (SocketError)
8: from -:101:in `<main>'
7: from /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:938:in `start'
6: from /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:943:in `do_start'
5: from /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:958:in `connect'
4: from /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/timeout.rb:105:in `timeout'
3: from /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/timeout.rb:95:in `block in timeout'
2: from /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:960:in `block in connect'
1: from /Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:960:in `open'
/Users/cclarke/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/net/http.rb:960:in `initialize': Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Invalid value for ai_flags) (SocketError)
~Edit. I couldn't figure this out. So, in the end I followed the advice in this post How to run the Homebrew installer under Rosetta 2 on M1 Macbook. For Ruby 3 I use native Arm. For Ruby 2.7.5 I use Rosetta2. Perhaps, not natively running Arm .. but at least it's working.
Related
Here is the list of the installed package versions.
$ruby -v
ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-linux]
$gem -v
3.3.7
$fluentd --version
fluentd 1.14.6
$fluentd --dry-run
After running the above command getting the following error.
/home/user/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/fluentd-1.14.6/lib/fluent/config.rb:31:in `initialize': No such file or directory # rb_sysopen - /etc/fluent/fluent.conf (Errno::ENOENT)
from /home/user/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/fluentd-1.14.6/lib/fluent/config.rb:31:in `open'
from /home/user/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/fluentd-1.14.6/lib/fluent/config.rb:31:in `build'
from /home/user/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/fluentd-1.14.6/lib/fluent/supervisor.rb:747:in `configure'
from /home/user/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/fluentd-1.14.6/lib/fluent/command/fluentd.rb:355:in `<top (required)>'
from <internal:/home/user/.rbenv/versions/3.1.1/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/home/user/.rbenv/versions/3.1.1/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /home/user/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/fluentd-1.14.6/bin/fluentd:15:in `<top (required)>'
from /home/user/.rbenv/versions/3.1.1/bin/fluentd:25:in `load'
from /home/user/.rbenv/versions/3.1.1/bin/fluentd:25:in `<main>'
$echo '{"json":"message"}' | fluent-cat debug.test
connect failed: Connection refused - connect(2) for "127.0.0.1" port 24224
connect failed: Connection refused - connect(2) for "127.0.0.1" port 24224
connect failed: Connection refused - connect(2) for "127.0.0.1" port 24224
connect failed: Connection refused - connect(2) for "127.0.0.1" port 24224
connect failed: Connection refused - connect(2) for "127.0.0.1" port 24224
connect failed: Connection refused - connect(2) for "127.0.0.1" port 24224
exceed retry limit
You need to create a config file on /etc/fluent/fluent.conf or start the server with -c /path/to/config
I use the ruby-saml gem and try to load my IDP's metadata but got this error:
> OneLogin::RubySaml::IdpMetadataParser.new.parse_remote('my IDP federation metadata XML URL')
Traceback (most recent call last):
12: from /Users/my_name_here/.rvm/rubies/ruby-2.6.4/bin/irb:23:in `<main>'
11: from /Users/my_name_here/.rvm/rubies/ruby-2.6.4/bin/irb:23:in `load'
10: from /Users/my_name_here/.rvm/rubies/ruby-2.6.4/lib/ruby/gems/2.6.0/gems/irb-1.0.0/exe/irb:11:in `<top (required)>'
9: from (irb):2
8: from /Users/my_name_here/.rvm/gems/ruby-2.6.4/gems/ruby-saml-1.11.0/lib/onelogin/ruby-saml/idp_metadata_parser.rb:53:in `parse_remote'
7: from /Users/my_name_here/.rvm/gems/ruby-2.6.4/gems/ruby-saml-1.11.0/lib/onelogin/ruby-saml/idp_metadata_parser.rb:178:in `get_idp_metadata'
6: from /Users/my_name_here/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/net/http.rb:1470:in `request'
5: from /Users/my_name_here/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/net/http.rb:919:in `start'
4: from /Users/my_name_here/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/net/http.rb:930:in `do_start'
3: from /Users/my_name_here/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/net/http.rb:996:in `connect'
2: from /Users/my_name_here/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/net/protocol.rb:44:in `ssl_socket_connect'
1: from /Users/my_name_here/.rvm/rubies/ruby-2.6.4/lib/ruby/2.6.0/net/protocol.rb:44:in `connect_nonblock'
OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate))
What does the above error mean?
I tried to see what certificate I'm using and it seems like to be this:
[13] pry(#<OpenSSL::SSL::SSLContext>)> OpenSSL::X509::DEFAULT_CERT_FILE
=> "/usr/local/etc/openssl#1.1/cert.pem"
[14] pry(#<OpenSSL::SSL::SSLContext>)> OpenSSL::X509::DEFAULT_CERT_DIR
=> "/usr/local/etc/openssl#1.1/certs"
Is there something wrong with my certificate?
Note: I have read SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate) but still don't know how to fix my issue. The person use a certificate manually but I assume I don't need to use one because the code should handle the certificate?
The IDP side certificate expires, they fix it and the error in question stopped.
I am failing to install bundler. I am on Ubuntu 18 and have ruby 2.5.1 installed. Here is the output of running this command.
gem install bundler --debug
NOTE: Debugging mode prints all exceptions even when rescued
Exception `LoadError' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/resolv.rb:170 - LoadError
Exception `Net::OpenTimeout' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/net/http.rb:937 - execution expired
Exception `Net::OpenTimeout' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/net/http.rb:939 - execution expired
Exception `Net::OpenTimeout' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/timeout.rb:114 - execution expired
Exception `Net::OpenTimeout' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/net/http.rb:997 - execution expired
Exception `Gem::RemoteFetcher::UnknownHostError' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/remote_fetcher.rb:306 - timed out (https://api.rubygems.org/api/v1/dependencies)
Exception `Errno::EEXIST' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/fileutils.rb:232 - File exists # dir_s_mkdir - /home/ikushlianski/.gem/specs/api.rubygems.org%443
Exception `Errno::ENOENT' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/remote_fetcher.rb:325 - No such file or directory # rb_file_s_stat - /home/ikushlianski/.gem/specs/api.rubygems.org%443/prerelease_specs.4.8
Exception `Net::OpenTimeout' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/net/http.rb:937 - execution expired
Exception `Net::OpenTimeout' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/net/http.rb:939 - execution expired
Exception `Net::OpenTimeout' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/timeout.rb:114 - execution expired
Exception `Net::OpenTimeout' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/net/http.rb:997 - execution expired
Exception `Gem::RemoteFetcher::UnknownHostError' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/remote_fetcher.rb:306 - timed out (https://api.rubygems.org/prerelease_specs.4.8.gz)
Exception `Errno::EEXIST' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/fileutils.rb:232 - File exists # dir_s_mkdir - /home/ikushlianski/.gem/specs/api.rubygems.org%443
Exception `Errno::ENOENT' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/remote_fetcher.rb:325 - No such file or directory # rb_file_s_stat - /home/ikushlianski/.gem/specs/api.rubygems.org%443/specs.4.8
Exception `Net::OpenTimeout' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/net/http.rb:937 - execution expired
Exception `Net::OpenTimeout' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/net/http.rb:939 - execution expired
Exception `Net::OpenTimeout' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/timeout.rb:114 - execution expired
Exception `Net::OpenTimeout' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/net/http.rb:997 - execution expired
Exception `Gem::RemoteFetcher::UnknownHostError' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/remote_fetcher.rb:306 - timed out (https://api.rubygems.org/specs.4.8.gz)
Exception `Gem::RemoteFetcher::UnknownHostError' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/spec_fetcher.rb:269 - timed out (https://api.rubygems.org/specs.4.8.gz)
Exception `Gem::UnsatisfiableDependencyError' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/resolver/installer_set.rb:72 - Unable to resolve dependency: user requested 'bundler (>= 0)'
ERROR: Could not find a valid gem 'bundler' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - timed out (https://api.rubygems.org/specs.4.8.gz)
Exception `Errno::EEXIST' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/fileutils.rb:232 - File exists # dir_s_mkdir - /home/ikushlianski/.gem/specs/api.rubygems.org%443
Exception `Errno::ENOENT' at /home/ikushlianski/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/remote_fetcher.rb:325 - No such file or directory # rb_file_s_stat - /home/ikushlianski/.gem/specs/api.rubygems.org%443/latest_specs.4.8
Running sudo gem install bundler outputs sudo: gem: command not found
Try disabling IPv6 on your Ubuntu
I get the following error in apache log on puppet master:
Any ideas what could be wrong here:
[ E 2018-03-11 07:50:58.9057 10913/T8 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is cd3585fe. Please see earlier logs for details about the error.
App 10950 stdout:
App 10950 stdout:
[ E 2018-03-11 07:51:03.0922 10913/Te age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /usr/share/puppet/rack/puppetmasterd: An error occurred while starting up the preloader.
Error ID: 01cd04d1
Error details saved to: /tmp/passenger-error-sAcbhg.html
Message from application: cannot load such file -- puppet/util/command_line (LoadError)
/usr/local/rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
config.ru:32:in `block in <main>'
/usr/local/rvm/gems/ruby-2.4.1/gems/rack-2.0.4/lib/rack/builder.rb:55:in `instance_eval'
/usr/local/rvm/gems/ruby-2.4.1/gems/rack-2.0.4/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/local/rvm/gems/ruby-2.4.1/gems/passenger-5.2.1/src/helper-scripts/rack-preloader.rb:110:in `eval'
/usr/local/rvm/gems/ruby-2.4.1/gems/passenger-5.2.1/src/helper-scripts/rack-preloader.rb:110:in `preload_app'
/usr/local/rvm/gems/ruby-2.4.1/gems/passenger-5.2.1/src/helper-scripts/rack-preloader.rb:156:in `<module:App>'
/usr/local/rvm/gems/ruby-2.4.1/gems/passenger-5.2.1/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/local/rvm/gems/ruby-2.4.1/gems/passenger-5.2.1/src/helper-scripts/rack-preloader.rb:29:in `<main>'
My config:
Centos 6.5,
Puppet 3.8.7,
Apache/2.2.15,
Phusion Passenger 5.2.1
We have a network that requires a proxy to go to the internet, I have a local Mac that we’re setting up for Drupal development and have HTTP_PROXY and ALL_PROXY set and everything works fine using bower, gem and librarian-puppet scripts from our development house to install these. I am now using a Vagrantfile they have created to setup a vagrant (VirtualBox) machine and hitting issues. I initially got issues early on in the script, but have installed vagrant-proxyconf and added config.proxy.http, https and no_proxy lines to the fine, which now gets a lot further before erroring with:
==> default: Info: Loading facts ==> default: Could not retrieve fact='nodejs_latest_version', resolution='': Connection refused - connect(2) ==> default: Could not retrieve fact='nodejs_stable_version', resolution='': Connection refused - connect(2) ==> default: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev ==> default: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong.
The ‘SSH command responded with a non-zero exit status.’ I see a few times in the script execution, but this is the first that stops the script running. If I connect the machine directly to an internet connection the script runs through successfully, but this isn’t a long term solution. I’m not sure if the issue is on the mac or the virtual box, or what file or setting I should be looking at. If anyone can help shed some light where the issue might be, or where I should be looking it would really be appreciated.
The debug output ends like this :
==> default: Info: Loading facts DEBUG ssh: stderr: Could not retrieve fact='nodejs_latest_version', resolution='': Connection refused - connect(2)
INFO interface: info: Could not retrieve fact='nodejs_latest_version', resolution='': Connection refused - connect(2) INFO interface: info: ==> default: Could not retrieve fact='nodejs_latest_version', resolution='': Connection refused - connect(2) ==> default: Could not retrieve fact='nodejs_latest_version', resolution='': Connection refused - connect(2) DEBUG ssh: stderr: Could not retrieve fact='nodejs_stable_version', resolution='': Connection refused - connect(2)
INFO interface: info: Could not retrieve fact='nodejs_stable_version', resolution='': Connection refused - connect(2) INFO interface: info: ==> default: Could not retrieve fact='nodejs_stable_version', resolution='': Connection refused - connect(2) ==> default: Could not retrieve fact='nodejs_stable_version', resolution='': Connection refused - connect(2) DEBUG ssh: stderr: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev
INFO interface: info: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev INFO interface: info: ==> default: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev ==> default: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev DEBUG ssh: stderr: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev
INFO interface: info: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev INFO interface: info: ==> default: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev ==> default: Error: Invalid version string ''! at /tmp/vagrant-puppet/modules-71ca71d9c718e523371ddd53fd147634/nodejs/manifests/install.pp:165 on node drupal.dev DEBUG ssh: Exit status: 1 ERROR warden: Error occurred: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. INFO warden: Beginning recovery process... INFO warden: Calling recover: # INFO warden: Beginning recovery process... INFO warden: Calling recover: # INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Recovery complete. INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. INFO warden: Beginning recovery process... INFO warden: Calling recover: # INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Recovery complete. ERROR warden: Error occurred: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. INFO warden: Beginning recovery process... INFO warden: Calling recover: # INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO environment: Released process lock: machine-action-d3538fe6302dd66edcdb4c05283597a6 INFO environment: Running hook: environment_unload INFO runner: Preparing hooks for middleware sequence... INFO runner: 2 hooks defined. INFO runner: Running action: environment_unload # ERROR vagrant: Vagrant experienced an error! Details: ERROR vagrant: # ERROR vagrant: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. ERROR vagrant: /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/communicators/ssh/communicator.rb:236:in execute'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/communicators/ssh/communicator.rb:246:insudo' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/provisioners/puppet/provisioner/puppet.rb:251:in run_puppet_apply'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/provisioners/puppet/provisioner/puppet.rb:124:inprovision' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/provision.rb:133:in run_provisioner'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:in block in finalize_action'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:inbusy' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:428:inhook' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/provision.rb:121:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/provision.rb:121:inblock in call' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/provision.rb:103:in each'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/provision.rb:103:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/providers/virtualbox/action/check_accessible.rb:18:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:inblock in finalize_action' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:inblock in run' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:in busy'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:inrun' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/call.rb:53:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:95:in block in finalize_action'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:inbusy' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/call.rb:53:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/config_validate.rb:25:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/providers/virtualbox/action/check_virtualbox.rb:17:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/warden.rb:34:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builder.rb:116:incall' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in block in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/busy.rb:19:inbusy' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/runner.rb:66:in run'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:214:inaction_raw' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:191:in block in action'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:516:inlock' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:178:in call'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/machine.rb:178:inaction' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/commands/provision/command.rb:30:in block in execute'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:226:inblock in with_target_vms' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:220:in each'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/plugin/v2/command.rb:220:inwith_target_vms' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/commands/provision/command.rb:29:in execute'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/cli.rb:42:inexecute' /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/environment.rb:301:in cli'
/opt/vagrant/embedded/gems/gems/vagrant-1.7.4/bin/vagrant:174:in' INFO interface: error: The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. INFO interface: Machine: error-exit ["Vagrant::Errors::VagrantError", "The SSH command responded with a non-zero exit status. Vagrant\nassumes that this means the command failed. The output for this command\nshould be in the log above. Please read the output to determine what\nwent wrong."]