Elasticbeanstalk Deployment Fails - docker

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.

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

Elasticsearch startup error during SonarQube setup

I am trying to setup Sonarqube in my Macbook but I am getting following error when I try to start it with sh sonar.sh console
sudo sh sonar.sh console
Password:
/usr/bin/java
Running SonarQube...
Removed stale pid file: ./SonarQube.pid
INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /Applications/sonarqube/temp
INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:60506]
INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/Applications/sonarqube/elasticsearch]: /Applications/sonarqube/elasticsearch/bin/elasticsearch
INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
Exception in thread "main" java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
at java.base/java.lang.System.setSecurityManager(System.java:416)
at org.elasticsearch.bootstrap.Security.setSecurityManager(Security.java:99)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:70)
2022.08.24 16:24:52 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2022.08.24 16:24:52 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2022.08.24 16:24:52 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
After some research on internet I have installed Java 11 but it is not helping me.

Integration test with testcontainers (Redis) Failing to run

I'm building integration test infrastructure for my micro-service (Java Spring).
Having an issue with testcontainers, as I try to create base class for tests that will start redis on container and will function as redis for the tested service.
the abstract test looks like this:
#SpringBootTest(classes = Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
#ActiveProfiles(Constants.SPRING_PROFILE_DEVELOPMENT)
public class AbstractRedisContainerTest {
#Rule
public GenericContainer redis = new GenericContainer("redis:3.0.6")
.withExposedPorts(6379);
And my log show the follow fail msg:
2020-03-04 12:28:55.545 ERROR [myService,,,] 27709 --- [main] o.t.d.DockerClientProviderStrategy:
Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
2020-03-04 12:28:55.546 ERROR [myService,,,] 27709 --- [main] o.t.d.DockerClientProviderStrategy:
EnvironmentAndSystemPropertyClientProviderStrategy:
failed with exception InvalidConfigurationException (ping failed)
2020-03-04 12:28:55.546 ERROR [myService,,,] 27709 --- [main] o.t.d.DockerClientProviderStrategy:EnvironmentAndSystemPropertyClientProviderStrategy:
failed with exception InvalidConfigurationException (ping failed)
2020-03-04 12:28:55.546 ERROR [myService,,,] 27709 --- [main] o.t.d.DockerClientProviderStrategy:UnixSocketClientProviderStrategy:
failed with exception InvalidConfigurationException (ping failed). Root cause LastErrorException ([13])
2020-03-04 12:28:55.546 ERROR [myService,,,] 27709 --- [main] o.t.d.DockerClientProviderStrategy: ProxiedUnixSocketClientProviderStrategy:
failed with exception InvalidConfigurationException (ping failed). Root cause TimeoutException (null)
2020-03-04 12:28:55.546 ERROR [myService,,,] 27709 --- [main] o.t.d.DockerClientProviderStrategy: As no valid configuration was found, execution cannot continue
org.testcontainers.containers.ContainerLaunchException: Container startup failed
where this is the error for the failing line in the code:
Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image:
RemoteDockerImage(imageNameFuture=java.util.concurrent.CompletableFuture#3186b07d[Completed normally],
imagePullPolicy=DefaultPullPolicy(), dockerClient=LazyDockerClient.INSTANCE)
Any idea how to configure my env or what missing here?
important to state that I have succeed to locally run docker images (the one stated here as well) and I have functioning docker environment from cli. I run this test from idea.
not sure if that related, but I run it as user (not as root).

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.

Resources