I am trying to upload my rails app to free-tier ec2 instance using rubber gem. Using railcast video and following this tutorial
https://liggat.org/a-full-AWS-rails-stack-provision-and-deployment-with-the-rubber-gem/
Using cap rubber:create, I am able to create ec2 instance, but it does not get connected. I get the following error:
** Failed to connect to xx.xxx.xxx.xx, retrying
* 2017-10-31 19:10:56 executing `rubber:_ensure_key_file_present'
servers: ["xx.xxx.xxx.xx"]
/Users/somnathdas/.rvm/gems/ruby-2.4.0/gems/net-ssh-2.9.4/lib/net/ssh.rb:197: warning: constant ::Fixnum is deprecated
/Users/somnathdas/.rvm/gems/ruby-2.4.0/gems/net-ssh-2.9.4/lib/net/ssh/transport/session.rb:67:in `initialize': Object#timeout is deprecated, use Timeout.timeout instead.
/Users/somnathdas/.rvm/gems/ruby-2.4.0/gems/net-ssh-2.9.4/lib/net/ssh/transport/session.rb:84:in `initialize': Object#timeout is deprecated, use Timeout.timeout instead.
./Users/somnathdas/.rvm/gems/ruby-2.4.0/gems/net-ssh-2.9.4/lib/net/ssh/transport/cipher_factory.rb:98: warning: constant OpenSSL::Cipher::Cipher is deprecated
. ** Failed to connect to xx.xxx.xxx.xx, retrying
* 2017-10-31 19:10:59 executing `rubber:_ensure_key_file_present'
Also rubber does not update /etc/hosts file. But interestingly when I ssh into remote instance through
ssh -v -i ~/.ec2/gsg-keypair ubuntu#ec2-xx.xxx.xxx.xx.us-west-2.compute.amazonaws.com
it gets connected. Also, cap rubber:bootstrap fails after this, giving this error
* 2017-10-31 19:13:17 executing `rubber:bootstrap'
triggering before callbacks for `rubber:bootstrap'
* 2017-10-31 19:13:17 executing `rubber:base:update_sudoers'
servers: ["production.xxxxx.io"]
/Users/somnathdas/.rvm/gems/ruby-2.4.0/gems/net-ssh-2.9.4/lib/net/ssh.rb:197: warning: constant ::Fixnum is deprecated
/Users/somnathdas/.rvm/gems/ruby-2.4.0/gems/net-ssh-2.9.4/lib/net/ssh/transport/session.rb:67:in `initialize': Object#timeout is deprecated, use Timeout.timeout instead.
connection failed for: production.xxxx.io (SocketError: getaddrinfo: nodename nor servname provided, or not known)
I am stuck on this for 5 days. if some kind soul can help, I would really be obliged.
Related
I'm getting this error while trying to run cube js with the default command in the getting started docs. I've started this in a folder and running it in docker.
Warning. There is no cube.js file. Continue with environment variables
🔥 Cube Store (0.28.31) is assigned to 3030 port.
Warning. Option apiSecret is required in dev mode. Cube.js has generated it as e3b8c5a35fe378f4d481ada777e5f3c4
🔓 Authentication checks are disabled in developer mode. Please use NODE_ENV=production to enable it.
🦅 Dev environment available at http://localhost:4000
🚀 Cube.js server (0.28.31) is listening on 4000
2021-09-03 15:06:01,512 INFO [cubestore::http::status] <pid:17> Serving status probes at 0.0.0.0:3031
2021-09-03 15:06:01,515 INFO [cubestore::metastore] <pid:17> Using existing metastore in /cube/conf/.cubestore/data/metastore
thread '
main
' panicked at '
called `Result::unwrap()` on an `Err` value: Error { message: "IO error: While fsync: a directory: Invalid argument" }
', /project/cubestore/src/metastore/mod.rs:1542:40
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Cube Store Start Error: undefined
I guess it’s corrupted metastore due to it was incorrectly shutdown for you locally. Could you please try to drop the .cubestore directory?
I am trying to work on grails through command prompt.
I am using the below versions:
| Grails Version: 3.2.3
| Groovy Version: 2.4.7
| JVM Version: 1.8.0_112
The following error is thrown:
| Error Error occurred running Grails CLI: This is usually a temporary
error dur ing hostname resolution and means that the local server did
not receive a respon se from an authoritative server (repo.grails.org)
(Use --stacktrace to see the f ull trace)
Upon using stacktrace the following is displayed:
| Error Error occurred running Grails CLI: This is usually a temporary
error dur ing hostname resolution and means that the local server did
not receive a respon se from an authoritative server (repo.grails.org)
(NOTE: Stack trace has been fi ltered. Use --verbose to see entire
trace.)
java.net.UnknownHostException: This is usually a temporary error
during hostname resolution and means that the local server did not
receive a response from an a uthoritative server (repo.grails.org)
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefa
ultDnsResolver.java:45)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHost
name(DefaultClientConnectionOperator.java:278)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnect
ion(DefaultClientConnectionOperator.java:162)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedCli
entConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(Default
RequestDirector.java:643)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultReq
uestDirector.java:479)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpCl
ient.java:906)
at org.apache.http.impl.client.DecompressingHttpClient.execute(Decompres
singHttpClient.java:137)
at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTranspo
rter.java:287)
at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTranspo
rter.java:243)
at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(Ab
stractTransporter.java:59)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRu
nner.runTask(BasicRepositoryConnector.java:447)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunne
r.run(BasicRepositoryConnector.java:350)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(Runn
ableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExe
cutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(Basic
RepositoryConnector.java:249)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownl
oads(DefaultArtifactResolver.java:520)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(Defa
ultArtifactResolver.java:421)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtif
acts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtif
act(DefaultArtifactResolver.java:223)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
loadPom(DefaultArtifactDescriptorReader.java:320)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
readArtifactDescriptor(DefaultArtifactDescriptorReader.java:217)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCa
chedArtifactDescriptor(DefaultDependencyCollector.java:535)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifa
ctDescriptorResult(DefaultDependencyCollector.java:519)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDe
pendency(DefaultDependencyCollector.java:409)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDe
pendency(DefaultDependencyCollector.java:363)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(D
efaultDependencyCollector.java:351)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDe
pendencies(DefaultDependencyCollector.java:254)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDepen
dencies(DefaultRepositorySystem.java:341)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve
(AetherGrapeEngine.java:302)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve
(AetherGrapeEngine.java:284)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve
(AetherGrapeEngine.java:276)
at org.grails.cli.boot.GrailsDependencyVersions.<init>(GrailsDependencyV
ersions.groovy:53)
at org.grails.cli.boot.GrailsDependencyVersions.<init>(GrailsDependencyV
ersions.groovy:49)
at org.grails.cli.profile.repository.MavenProfileRepository.<init>(Maven
ProfileRepository.groovy:53)
at org.grails.cli.GrailsCli.createMavenProfileRepository(GrailsCli.groov
y:333)
at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:234)
at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
| Error Error occurred running Grails CLI: This is usually a temporary
error dur ing hostname resolution and means that the local server did
not receive a respon se from an authoritative server (repo.grails.org)
Kindly help me resolve the above issue.
Most likely reason is your internet is not working or your are behind a proxy. See http://docs.grails.org/latest/guide/conf.html#proxyConfig for how to configure your proxy settings
My rake file for deadweight looks like
task :deadweight do
dw = Deadweight.new
dw.stylesheets =["/stylesheets/application.css"]
dw.pages = ["/"]
puts dw.run
end
dw.run is giving following error:
Connection refused - connect(2)
I'm not that familiar with deadweight, but it could be deadweight expects a running server at 0.0.0.0:3000.
From https://github.com/aanand/deadweight :
Running rake deadweight will output all unused rules, one per line.
Note that it looks at http://localhost:3000 by default, so you'll need
to have script/server (or whatever your server command looks like)
running.
I've been following this tutorial.
I'm working with WebFaction. The difference to be noted, is that WF uses NginX and not Passenger.
So after I got through the whole thing and I type:
cap deploy
It returns after I type my password ( correctly? ):
Password:
*** [deploy:update_code] rolling back
* executing "rm -rf /home/shadyfront/webapps/age_of_revolt/releases/20110211211509; true"
servers: ["174.133.20.24"]
** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: 174.133.20.24 (Net::SSH::AuthenticationFailed: shadyfront)
connection failed for: 174.133.20.24 (Net::SSH::AuthenticationFailed: shadyfront)
I'm pretty sure this is where it is erring. Any ideas what kind of error this is?
Thanks everyone!!
I see a couple peculiar errors here:
connection failed for: 174.133.20.24 (Net::SSH::AuthenticationFailed: shadyfront)
That error is telling you that your login is failing. Generally, you would want to use public key logins for cap so you don't have to type your password all of the time. However, the password method should still work.
Double-check your password.
Make sure that you can do ssh shadyfront#174.133.20.24 manually and get a command prompt.
use next ~/.ssh/config file:
KeepAlive yes
User shadyfront
RSAAuthentication yes
IdentityFile ~/.ssh/id_rsa
HostbasedAuthentication no
I'm running from a Windows Vista machine using:
The latest rails (as of Jan 2. 2010),
Capistrano 2.5.10,
Subversive plugin, and
TortoiseSVN
So far, I have:
created the remote repository,
created ssh keys, and
edited the TortoiseSVN config file.
(I'm not sure if I’ve left out anything.)
Here’s the error message I get when I try to deploy using Capistrano:
* executing `deploy:cold'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
executing locally: "svn info svn+ssh://mydomain.com/home/45454/data/svn/repository/ -rHEAD"
checking for svn... yes
Unable to open connection:
Host does not exist
svn: Connection closed unexpectedly
*** [deploy:update_code] rolling back
* executing "rm -rf /home/45454/containers/rails/wcn/releases/20091230175413; true"
servers: ["mydomain.com"]
[mydomain.com] executing command
command finished
C:/Ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.10/lib/capistrano/recipes/deploy/scm/subversion.rb:58:in `query_revision': tried to run `svn info svn+ssh://mydomain.com/home/45454/data/svn/repository/ -rHEAD' and got unexpected result "" (RuntimeError)
from C:/Ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.10/lib/capistrano/recipes/deploy/scm/base.rb:35:in `send'
from C:/Ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.10/lib/capistrano/recipes/deploy/scm/base.rb:35:in `method_missing'
from C:/Ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.10/lib/capistrano/recipes/deploy/scm/base.rb:63:in `local'
from C:/Ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.10/lib/capistrano/recipes/deploy/scm/base.rb:35:in `method_missing'
from C:/Ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.10/lib/capistrano/recipes/deploy.rb:38:in `load'
from C:/Ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.10/lib/capistrano/configuration/variables.rb:87:in `call'
from C:/Ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.10/lib/capistrano/configuration/variables.rb:87:in `fetch'
from C:/Ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.10/lib/capistrano/configuration/variables.rb:110:in `protect'
... 38 levels...
from C:/Ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.10/lib/capistrano/cli/execute.rb:14:in `execute'
from C:/Ruby/lib/ruby/gems/1.8/gems/capistrano-2.5.10/bin/cap:4
from C:/Ruby/bin/cap:19:in `load'
from C:/Ruby/bin/cap:19
Any ideas on what I should try next?
Looks like when svn goes to checkout the code it can't either resolve the hostname as defined by :repository or it can't ssh into "mydomain.com".
executing locally: "svn info svn+ssh://mydomain.com/home/45454/data/svn/repository/ -rHEAD"
checking for svn... yes
Unable to open connection:
Host does not existsvn: Connection closed unexpectedly
If you're deploying to your own Windows machine, try just using a local svn reference.