Rerouting ssl command fails during build of application through Elastic Beanstalk

24 Views Asked by At

I have a spring application that I am deploying through Elastic Beanstalk. When running a container command to reroute ssl the build fails. The command I'm trying to run is:

iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 9000

And the traceback is:

Error encountered during build of postbuild_0_TestApplication: Command 01_reroute_ssl failed Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/cfnbootstrap/construction.py", line 579, in run_config CloudFormationCarpenter(config, self._auth_config, self.strict_mode).build(worklog) File "/usr/lib/python3.9/site-packages/cfnbootstrap/construction.py", line 277, in build changes['commands'] = CommandTool().apply( File "/usr/lib/python3.9/site-packages/cfnbootstrap/command_tool.py", line 127, in apply raise ToolError(u"Command %s failed" % name) cfnbootstrap.construction_errors.ToolError: Command 01_reroute_ssl failed 2023-11-27 13:11:27,817 [ERROR] -----------------------BUILD FAILED!------------------------ 2023-11-27 13:11:27,817 [ERROR] Unhandled exception during build: Command 01_reroute_ssl failed Traceback (most recent call last): File "/opt/aws/bin/cfn-init", line 181, in worklog.build(metadata, configSets, strict_mode) File "/usr/lib/python3.9/site-packages/cfnbootstrap/construction.py", line 137, in build Contractor(metadata, strict_mode).build(configSets, self) File "/usr/lib/python3.9/site-packages/cfnbootstrap/construction.py", line 567, in build self.run_config(config, worklog) File "/usr/lib/python3.9/site-packages/cfnbootstrap/construction.py", line 579, in run_config CloudFormationCarpenter(config, self._auth_config, self.strict_mode).build(worklog) File "/usr/lib/python3.9/site-packages/cfnbootstrap/construction.py", line 277, in build changes['commands'] = CommandTool().apply( File "/usr/lib/python3.9/site-packages/cfnbootstrap/command_tool.py", line 127, in apply raise ToolError(u"Command %s failed" % name) cfnbootstrap.construction_errors.ToolError: Command 01_reroute_ssl failed

The platfrom I am building on is : Corretto 17 running on 64bit Amazon Linux 2023/4.1.1

What is this error caused by? I'm not sure how to decipher the traceback information.

0

There are 0 best solutions below