Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

AWS Elastic Beanstalk 100.0 % of the requests are failing with HTTP 5xx. 502 Bad Gateway nginx


Hello,
I got problems with my proyect in AWS. I deploy my proyect with no Metronic templates, just pure bootstrap and it works fine on Beanstalk.
But my proyect with all Metronic componentes, works fine locally but when I deploy to AWS Beanstalk no even start sending me 502 Gateway message.
It's the same proyect. Just with Metronic components. java 17, Springboot 3.1.1, Jackson 2.15.2, and for BeansTalk: Corretto 17 running on 64bit Amazon Linux 2/3.4.9.
In advance, thank you.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (7)


UPDATE: fail on finding this file on this path in AWS.
java.io.FileNotFoundException: _keenthemes/config/themesettings.json (No such file or directory)
Locally works fine.



Hi,

May I know which starter kit of Metronic are you using ? Spring Boot ? The error says the path of _keenthemes/config/themesettings.json is not correct in your server. You could try to point it from the absolute path of your project folder.

Regards.



Hi, yes, is the last one version: 8.1.8
The problem is when I create a jar file with maven in demo project.

The _keenthemes folder is out of folder /src. So, when I deploy in Elastic Beanstalk, the jar does not contain _keenthemes folder.

I try to copy _keenthemes folder into /static folder to force include it inside jar file. But it still can't found themesettings.json

My keenthemes folder is in:
C:\....\MetronicSpring\starterkit2\src\main\resources\static\keenthemes

My Read inside KTThemeSettings.java:
File file = new File("/static/keenthemes/config/themesettings.json"); or
File file = new File("/keenthemes/config/themesettings.json");
Neither find .json file in localhost and I can't build .jar file.

Caused by: java.io.FileNotFoundException: \static\keenthemes\config\themesettings.json

Thanks



Hi,

Could you try to do the following?

Move config folder from _keenthemes/ into /static and then change config paths in starterkit/libs/config/KTIconsBaseSettings.java and starterkit/libs/config/KTThemeSettings.java.

Change path from _keenthemes/config/ to ./src/main/resources/static/config/

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Hi,
Yes, it works but folders are too big for AWS Elastic beanstalk.
Size of my project increase too much.
The solution was to put all _keenthemes folders inside a bucket from Amazon S3.
Thank you so much.
Best regards.



Hi,

Glad to hear that you have fixed this issue.

Please don't hesitate to reach out if you need anything more from us.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Got it.
Thanks a lot.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(