Amazon AWS - Fatal: could not read Username for 'https://github.com': No such device or address - ruby-on-rails

I am trying to deploy rails 3 application on using AWS instance. For deployment, I am using opsworks services and also accessing private github repository for deployment. When start the instance, getting following errors.
[2015-03-10T04:34:32+00:00] INFO: Running queued delayed notifications before re-raising exception
[2015-03-10T04:34:32+00:00] ERROR: Running exception handlers
[2015-03-10T04:34:32+00:00] ERROR: Exception handlers complete
[2015-03-10T04:34:32+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage1/chef-stacktrace.out
[2015-03-10T04:34:32+00:00] ERROR: git[Download Custom Cookbooks] (opsworks_custom_cookbooks::checkout line 29) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '128'
---- Begin output of git ls-remote "https://github.com/user_name/repository.git" HEAD ----
STDOUT:
STDERR: fatal: could not read Username for 'https://github.com': No such device or address
---- End output of git ls-remote "https://github.com/user_name/repository.git" HEAD ----
Ran git ls-remote "https://github.com/user_name/repository.git" HEAD returned 128
[2015-03-10T04:34:32+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Please help.

The solution for me was to edit App Repository URL in the OpsWorks stack. Change it from:
https://github.com/user_name/repository.git
to
git#github.com:user_name/repository.git

Related

Rancher pod is crashing

I'm trying to install Rancher in AKS, but unfortunately I'm not able to reach the rancher pod.
When I check the pod logs, I see the following error messages:
2023/01/28 20:22:50 [ERROR] error parsing azure-group-cache-size, skipping update strconv.Atoi: parsing "": invalid syntax
...
/01/28 20:22:50 [ERROR] failed to cleanup orphan catalog bindings
..
failed to sync cache for rke-machine-config.cattle.io/v1, Kind=VmwarevsphereConfig E0128 20:22:51.712910 34 reflector.go:139] pkg/mod/github.com/rancher/client-go#v1.24.0-rancher1/tools/cache/reflector.go:168: Failed to watch *unstructured.Unstructured: Get "https://10.0.0.1:443/apis/rke-machine-config.cattle.io/v1/vmwarevsphereconfigs?allowWatchBookmarks=true&resourceVersion=112947&timeout=9m58s&timeoutSeconds=598&watch=true": context canceled
2023/01/28 20:22:51 [ERROR] failed to sync cache for cluster.x-k8s.io/v1alpha3, Kind=Cluster
2023/01/28 20:22:51 [ERROR] failed to sync cache for cluster.x-k8s.io/v1alpha3, Kind=MachineSet
2023/01/28 20:22:51 [ERROR] failed to sync cache for cluster.x-k8s.io/v1alpha3, Kind=MachineHealthCheck
....
2023/01/28 20:23:05 [ERROR] error syncing 'cattle-fleet-system/helm-operation-l496h': handler helm-operation: an error on the server ("container not found (\"proxy\")") has prevented the request from succeeding (get pods helm-operation-l496h), requeuing
I've followed these instructions:
https://ranchermanager.docs.rancher.com/v2.5/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/rancher-on-aks
https://ranchermanager.docs.rancher.com/v2.5/pages-for-subheaders/install-upgrade-on-a-kubernetes-cluster#install-the-rancher-helm-chart
Any idea what could be the issue? Many thanks in advance for your help

Rails - AWS elastic beanstalk failed to deploy

I tried to deploy my rails app to aws elastic beanstalk but got stuck with this error
[INFO] Job for worker.service failed because the control process exited with error code.
See "systemctl status worker.service" and "journalctl -xe" for details.
[ERROR] An error occurred during execution of command [app-deploy] - [flip ruby application].
Stop running the command. Error: register application failed because the registration of proc worker failed:
startProcess Failure: starting process "worker" failed:
Command /bin/sh -c systemctl start worker.service failed with error exit status 1.
Stderr:Job for worker.service failed because the control process exited with error code.
See "systemctl status worker.service" and "journalctl -xe" for details.
[INFO] Executing cleanup logic
[INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0",
"results":[{"status":"FAILURE","msg":"Engine execution has encountered an error.","returncode":1,
"events":[{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.",
"timestamp":1675150429219,"severity":"ERROR"}]}]}
[INFO] Platform Engine finished execution on command: app-deploy
Can anyone help me with this? I can provide any Info you want me to share

Elasticbeanstalk Deployment Fails

I am trying to deploy a docker based environment that is using 1-1 application load balancer in AWS elasticbeanstalk. I am getting the below error message. It seemed to deploy very well before but for unknown reasons the new deploys fail.
2019-01-31 18:52:23 INFO Environment update is starting.
2019-01-31 18:53:03 INFO Deploying new version to instance(s).
2019-01-31 18:53:12 INFO Successfully pulled node:10.15.0
2019-01-31 18:57:34 INFO Successfully built aws_beanstalk/staging-app
2019-01-31 18:57:42 ERROR Failed to start nginx, abort deployment
2019-01-31 18:57:44 ERROR [Instance: i-0d4b3811324b90c27] Command failed on instance. Return code: 1 Output: nginx: [emerg] no host in upstream ":8080" in /etc/nginx/conf.d/elasticbeanstalk-nginx-docker-upstream.conf:2
nginx: configuration file /etc/nginx/nginx.conf test failed
Failed to start nginx, abort deployment.
Hook /opt/elasticbeanstalk/hooks/appdeploy/enact/01flip.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2019-01-31 18:57:45 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2019-01-31 18:57:45 ERROR Unsuccessful command execution on instance id(s) 'i-0d4b3811324b90c27'. Aborting the operation.
2019-01-31 18:57:45 ERROR Failed to deploy application.
This issue was caused of an Uncaught error in my Node js application. Issue is not with Beanstalk.

Elastic Beanstalk /ondeck not updating /current and still showing 404?

I currently have a Rails 4.0.3 repo with Ruby 2.1.1. I am trying to deploy this on my EB environment. Everything seems to be working fine, no errors are thrown when I run:
eb start
git aws.push
But If I SSH into my server, I see that my /var/app/ondeck has not updated with my git repository even if I run git aws.push --environment myenv.
I see the current git revision hash on my dashboard when I aws.push, but the repo code never gets to the server...
The other issue is that fact that my /var/app/current is still empty. Any ideas?
After running a git aws.push, the only thing that gets logged is:
2014-04-02 05:45:02,567 [INFO] (5874 MainThread) [clearStaleLogPublishingRecords.py-38] [root clearStaleLogPublishingRecords main] Clearing stale log publish records publish log task with batch id ef7dd76a-ba29-11e3-bf20-12313913dae2
2014-04-02 05:45:02,568 [INFO] (5874 MainThread) [clearStaleLogPublishingRecords.py-48] [root clearStaleLogPublishingRecords main] Successfully cleared stale log publishing records
2014-04-02 05:50:01,874 [INFO] (5887 MainThread) [publishLogs.py-61] [root publishLogs main] Starting publish log task with batch id a1e453b6-ba2a-11e3-86ba-12313913dae2
2014-04-02 05:50:01,991 [INFO] (5887 MainThread) [publishLogs.py-86] [root publishLogs main] Log publication is disabled
After running eb update nothing gets put to the logs.
These also help describe the issue:
https://forums.aws.amazon.com/thread.jspa?messageID=336101
https://forums.aws.amazon.com/thread.jspa?messageID=357003
However, I have the latest command line eb, and have tried detaching the HEAD from the git repo and then checking out the master and pushing again, still no luck :(
Also tried "upload and deploy" a zip version from the control panel, nothing got updated.
2014-04-02 08:12:22,185 [ERROR] (1895 MainThread) [directoryHooksExecutor.py-34] [root directoryHooksExecutor error] Script failed with returncode 1
2014-04-02 08:12:22,246 [INFO] (1872 MainThread) [command.py-130] [root command execute] Command returned: (code: 1, stdout: Error occurred during build: Command hooks failed
, stderr: None)
2014-04-02 08:12:22,248 [DEBUG] (1872 MainThread) [commandWrapper.py-60] [root commandWrapper main] Command result: {'status': 'FAILURE', 'results': [{'status': 'FAILURE', 'config_sets': ['Infra-EmbeddedPreBuild', 'Hook-PreAppDeploy', 'Infra-EmbeddedPostBuild'], 'returncode': 1, 'events': [], 'msg': 'Error occurred during build: Command hooks failed\n'}], 'api_version': '1.0'}
I switched to a Ruby 2.0 running Rails 4.0.3 on the oregon datacenter (west-2), and it seems to be pushing fine. I do think it had something to do with a hook failing. For instance, if you have additional hooks or commands that require GIT, and git isn't installed on the server, it will fail silently or scream... That seems to have been what was going on here.

permission denied while deploying rails application

i'm getting permission denied while deploying using capistrano
Error:
DEBUG [0203645e] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/xxx/git-ssh.sh /usr/bin/env git ls-remote git#github.com:yyy/xxx )
DEBUG [0203645e] Permission denied (publickey).
DEBUG [0203645e]
DEBUG [0203645e] fatal: The remote end hung up unexpectedly
DEBUG [0203645e]
DEBUG [0203645e] Finished in 5.938 seconds with exit status 128 (failed).
My ssh key is available in server and git(same key available in both places
I was able to push previously
if more information needed please tell me.

Resources