AWS Elasticbeanstalk deployment error - java

We are seeing the following errors being thrown while deploying a new application version on to our elasticbeanstalk environment(Tomcat 7 , Java 6).
The eb-version-deployment.log on a running backend EC2 instance shows this:
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>ExpiredToken</Code><Message>The provided token has expired.</Message>
Exception in downloading source bundle. Exception message: S3ResponseError: 400 Bad Request
The elasticbeanstalk event log on the console shows this:
[Instance: Module: AWSEBAutoScalingGroup ConfigSet: Infra-WriteApplication2] Command failed on instance. Return code: 1 Output: Error occurred during build: Command 01downloadVersion failed .
This error started appearing all of a sudden and without any changes being done to any of our underlying infrastructure components (S3,etc).
Any ideas to resolve this ?
Thanks in advance.

Make sure that you have defined AWS Credentials file and it contains valid tokens.
export AWS_CREDENTIAL_FILE=~/.aws/aws.cred

Related

Application error and logs not loading, what steps to take?

I've been getting the following error page, when visiting my app:
Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
heroku logs --tail
However, heroku logs --tail does not return anything. If I go to the dashboard through web (https://dashboard.heroku.com/apps/app-name/logs), the logs window keeps loading but nothing is shown.
I have nothing to go on, and Heroku won't accept a ticket of a free app. Does anyone know any more steps I can take to trace the error?
Additional info:
The build logs all look fine:
BUILD SUCCESSFUL in 49s
5 actionable tasks: 5 executed
Discovering process types
Procfile declares types -> (none)
Default types for buildpack -> web
Compressing...
Done: 85.2M
Launching...
Released v3
https://app-name.herokuapp.com/ deployed to Heroku
I am creating a spring Java API, it works fine when I try to run it locally. If I try to run it through $heroku local I do get an error:
[FAIL] No Procfile and no package.json file found in Current Directory - See run --help
I had same issue. I just added system.properties to root folder of spring app and this file contained 1 line:
java.runtime.version=11
Heroku procfile documentation.
Spring documentation for Heroku deployment

activemq webconsole failing

I am trying to upgrade my active,q from 5.11.1 to 5.15.14 and to also pack it in a docker image.
I faced some issues which I was able to solve with Jetty.
Now my app is working with the new activemq but for some reason I am use the web console.
I able to view it but once I try to login to see the queues I get and exception both on my browser and it the docker container:
WARN | /admin/
javax.servlet.ServletException: javax.servlet.ServletException: org.apache.jasper.JasperException: /index.jsp (line: [18], column: [0]) null
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:162)[jetty-all-9.4.35.v20201120-uber.jar:9.4.35.v20201120]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)[jetty-all-9.4.35.v20201120-uber.jar:9.4.35.v20201120]
at org.eclipse.jetty.server.Server.handle(Server.java:516)[jetty-all-9.4.35.v20201120-uber.jar:9.4.35.v20201120]
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)[jetty-all-9.4.35.v20201120-uber.jar:9.4.35.v20201120]
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)[jetty-all-9.4.35.v20201120-uber.jar:9.4.35.v20201120]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)[jetty-all-9.4.35.v20201120-uber.jar:9.4.35.v20201120]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)[jetty-all-9.4.35.v20201120-uber.jar:9.4.35.v20201120]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)[jetty-all-9.4.35.v20201120-uber.jar:9.4.35.v20201120]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)[jetty-all-9.4.35.v20201120-uber.jar:9.4.35.v20201120]
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)[jetty-all-9.4.35.v20201120-uber.jar:9.4.35.v20201120]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)[jetty-all-9.4.35.v20201120-uber.jar:9.4.35.v20201120]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)[jetty-all-9.4.35.v20201120-uber.jar:9.4.35.v20201120]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)[jetty-all-9.4.35.v20201120-uber.jar:9.4.35.v20201120]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)[jetty-all-9.4.35.v20201120-uber.jar:9.4.35.v20201120]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)[jetty-all-9.4.35.v20201120-uber.jar:9.4.35.v20201120]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)[jetty-all-9.4.35.v20201120-uber.jar:9.4.35.v20201120]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)[jetty-all-9.4.35.v20201120-uber.jar:9.4.35.v20201120]
I read some comments here about using java 8 but I am using java 8 so I gues it is not the case.
My Dockerfile is:
FROM openjdk:8-jdk
# Copy the whole directory of activemq into the image
COPY apache-activemq-5.15.14 /opt/apache-activemq-5.15.14
# Set the working directory to the bin folder
WORKDIR /opt/apache-activemq-5.15.14/bin
# Start up the activemq server
ENTRYPOINT ["./activemq","console"]
Of course I am exposing the 8161 port since I am able to view the console , I just get an exception once I login.
Any help would be appreciated
After investigating I decided to go to a lower version of 5.15.9.
In this version all works as expected.

IBM Bluemix Cloud Foundry SpringBoot kotlin app error

I have deploy on IBM Bluemix a spring boot application written in kotlin. I have use liberty for java.
But I cant able to run correctly my app, but on my machine in local it work very well.
When I call my REST API it return me an error or not work.
This is the error:
There was an unexpected error (type=Internal Server Error,
status=500). java.lang.NoClassDefFoundError:
it.gate42.skip.DeviceInfo.DeviceInfo_Accessor_ewee6w (initialization
failure)
I have already tried to change the Java version but the error is the same.
(I have set OPEN_JDK and version 1.8.+)
This is the log of call that return me the cloud foundry app: https://gist.github.com/paranoiasystem/a28a2587c231f2b398c4650ba1c7016c
I have post it on gist because is so long and it is impossible to post all log here.
I have resolved this issue, I have rewrite my manifest.yml like this:
---
applications:
- name: testskipapi
memory: 1G
instances: 1
path: build/libs/skipcode-0.0.1-SNAPSHOT.jar
buildpack: https://github.com/cloudfoundry/java-buildpack.git
env:
JBP_CONFIG_OPEN_JDK_JRE: '{ jre: { version: 1.8.0_+ } }'

Jhipster: application is running but no output on the browser

After installing Jhipster and getting my application running using yarn, the application is running on terminal but on my browser nothing apears, there's an error message in the Console which is the following:
ERROR Error: The selector "jhi-main" did not match any elements
at DefaultDomRenderer2.selectRootElement (platform-browser.es5.js?41b7:2791)
at DebugRenderer2.selectRootElement (core.es5.js?de3d:13633)
at createElement (core.es5.js?de3d:9172)
at createViewNodes (core.es5.js?de3d:12146)
at createRootView (core.es5.js?de3d:12075)
at callWithDebugContext (core.es5.js?de3d:13458)
at Object.debugCreateRootView [as createRootView] (core.es5.js?de3d:12775)
at ComponentFactory_.create (core.es5.js?de3d:9858)
at ComponentFactoryBoundToModule.create (core.es5.js?de3d:3333)
at ApplicationRef_.bootstrap (core.es5.js?de3d:4763)
What can I do to fix it?
Check your index.html file.
src->main->webapp->index.html
<jhi-main></jhi-main>
screenshot from my workspace / index.html

Google App Engine Rollback Failing - unable to download the source code of the app, in order to run the rollback - No local WAR avalible

I'm trying to fix an issue with google app engine
The Dev team run Jenkins to do our deploys into Google App Engine. For some reason, two jobs were running concurrently and both tried to deploy into the same project. (I think, still working on it) - This caused the error
com.google.appengine.tools.admin.HttpIoException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=APP-ID&version=CURRENT-VERSION&
[java] 409 Conflict
[java] Another transaction by user SERVICEACCOUNT is already in progress for app: s~APP-ID, version: CURRENT-VERSION. That user can undo the transaction with "appcfg rollback".
It turns out that I need to rollback a deployment - Okay, cool.
Why in the Blue Hell do I need the source code to do a rollback!?!? Google? what the hell?
From what I can see in documentation the original WAR is required in order to do this rollback. This I do not have, so I need the source code which I can get from google with
appcfg --download
This step only gets to 70% and then fails.
79% [6080/7641] __static__/static/blah/blah/blah/bundle.js
79% [6081/7641] __static__/static/yada/yada/yada/_all.js
79% [6082/7641] __static__/static/images/mapicons/awesome.png
Jul 13, 2016 5:56:57 PM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/files/get?id=9999&app_id=APP-ID&version=master.394126950949921946&
401 Unauthorized
Invalid OAuth token
This is try #0
I now how blocked projects, that I can no longer deploy into - Advice??
You can use appcfg tool, which within your appengine_sdk/bin directory, to rollback deployment. You need to have sufficient permissions to perform rollback.
appcfg --application=APP_ID --module=MODULE --version=VERSION rollback .
See https://cloud.google.com/appengine/docs/java/tools/appcfg-arguments
You need to have ./WEB-INF/appengine-web.xml on your path.
Or you could put ./WEB-INF/appengine-web.xml with following content:
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>APP_ID</application>
<version>MODULE</version>
<module>VERSION</module>
<threadsafe>true</threadsafe>
</appengine-web-app>
Then your command would look like:
appcfg rollback .

Categories

Resources