How exit from aws batch docker with error code? - amazon-web-services

Just for testing purposes what to exec to fail docker in aws batch with custom code?
I have tried:
exit 137 -> CannotStartContainerError: API error (404): oci runtime error: container_linux.go:262: starting container process caused "exec: \"exit\": executable file not found in $PATH"
Exit 137
bash exit 137 -> bash: exit: No such file or directory

Assuming you are trying with busy box you can use any one of below format
Space delimited: sh -c 'exit 1'
Json: ["sh","-c","exit 1"]

Related

Error on connecting pod on AWS machine from JProfiler 13.02

I try connect to my pod on AWS machine from JProfiler 13.02.
Quick Attach -> On a Kubernetes Cluster-> Kubectl on another computer->give SSH connection details and press start
I get a list of all pods, select container of one of them and click OK. I get an error:
An exception occurred while connecting to the selected container.
The error message was: java.io.IOException: Could not copy agent to docker container tar: .jprofiler13/agent/13094_13.0.2: Cannot open: No such file or directory tar: Error is not recoverable: exiting now tar: short read command terminated with exit code 1 exit code: 1

Solana Anchor framework: Can't connect to localhost and therefor not deply to it

Anchor deploy
Deploying workspace: http://localhost:8899
Upgrade authority: /home/tomcatzy/.config/solana/id.json
Deploying program "basic-1"...
Program path: /home/tomcatzy/projects/anchor/examples/tutorial/basic-1/target/deploy/basic_1.so...
Error: RPC request error: cluster version query failed: error sending request for url (http://localhost:8899/): error trying to connect: tcp connect error: Connection refused (os error 111)
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "" }.
solana config set --url http://localhost:8899 (Is this enough to start the localhost ?)
solana-keygen new
solana-test-validator
It seems strange that after a succesful anchor build that i can't do a anchor deploy with the solana command lines ran above.
If by any means 'need' to run a - npm init - then where to do it ?
solana config set --url http://localhost:8899 (Is this enough to start the localhost ?)
solana-keygen new
solana-test-validator
I tried the above and got generated a keypair: keyname_1-keypair.json. The build went succesful but the deploy not !
I'm wondering why not ?
Hopefully some can guide me what to get it succed...
In a separate window / terminal, you need to run solana-test-validator so that the tools can talk to your local network. The error you're seeing on deployment is due to an error on connecting to that network.
By following the Solana docs and doing this
sudo $(command -v solana-sys-tuner) --user $(whoami) > sys-tuner.log 2>&1 &
https://docs.solana.com/running-validator/validator-start#system-tuning
The test-ledger folder is done and a sys-tuner.log file is created but it's 0 bytes...
Then i run the solana-test-validator in a separate terminal and the other solana config commands in another termianl then i get the following results ->
You can deploy on-chain programs with the Solana tools.
To deploy a program, you will need the location of the program's shared object.
It will return when you run anchor build in the command line.
Run solana program deploy <PROGRAM_FILEPATH>.
Successful deployment will return the program id of your program.

KeyError: 'torch', memory error ERROR: ServiceError - Failed to deploy application.: AWS elastic beanstalk, django

So I have installed torch in my local machine and it is working correctly, but while deploying it in aws it show the following error.
I am trying to deploy my django app on AWS elastic beanstalk but I am facing the following error.
2021-04-20 18:00:43 INFO Environment update is starting.
2021-04-20 18:00:46 INFO Deploying new version to instance(s).
2021-04-20 18:00:57 ERROR Instance deployment failed to install application dependencies. The deployment failed.
2021-04-20 18:00:57 ERROR Instance deployment failed. For details, see 'eb-engine.log'.
2021-04-20 18:01:01 ERROR [Instance: i-0eee746bc342a71cd] Command failed on instance. Return code: 1 Output: Engine execution has encountered an error..
2021-04-20 18:01:01 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2021-04-20 18:01:01 ERROR Unsuccessful command execution on instance id(s) 'i-0eee746bc342a71cd'. Aborting the operation.
2021-04-20 18:01:01 ERROR Failed to deploy application.
My eb-engine.log
Downloading https://download.pytorch.org/whl/cpu/torchvision-0.6.1%2Bcpu-cp37-cp37m-linux_x86_64.whl (5.7 MB)
Collecting torch==1.8.1+cpu
2021/04/20 18:00:57.931655 [ERROR] An error occurred during execution of command [app-deploy] - [InstallDependency]. Stop running the command. Error: fail to install dependencies with requirements.txt file with error Command /bin/sh -c /var/app/venv/staging-LQM1lest/bin/pip install -r requirements.txt failed with error exit status 2. Stderr:ERROR: Exception:
Traceback (most recent call last):
File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 171, in _merge_into_criterion
crit = self.state.criteria[name]
KeyError: 'torch'
.
.
.
.
File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/pip/_vendor/msgpack/fallback.py", line 671, in _unpack
ret[key] = self._unpack(EX_CONSTRUCT)
File "/var/app/venv/staging-LQM1lest/lib/python3.7/site-packages/pip/_vendor/msgpack/fallback.py", line 684, in _unpack
return bytes(obj)
MemoryError
My requirements.txt
-f https://download.pytorch.org/whl/torch_stable.html
torchvision==0.6.1+cpu
torch==1.8.1+cpu
Can someone explain me what I am doing wrong?
Thank you so much

Unsuccessful command execution on instance id(s)

I am trying to deploy my app on AWS but it seems to stuck at this point:
Uploading: [##################################################] 100% Done...
2019-10-22 11:01:57 INFO Environment update is starting.
2019-10-22 11:02:00 INFO Deploying new version to instance(s).
2019-10-22 11:02:09 ERROR Your requirements.txt is invalid. Snapshot your logs for details.
2019-10-22 11:02:10 ERROR [Instance: i-#######] Command failed on instance. Return code: 1 Output: (TRUNCATED)...)
File "/usr/lib64/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1.
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2019-10-22 11:02:10 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2019-10-22 11:02:10 ERROR Unsuccessful command execution on instance id(s) 'i########'. Aborting the operation.
2019-10-22 11:02:11 ERROR Failed to deploy application.
ERROR: ServiceError - Failed to deploy application.
It says that my requirements.txt is invalid, Why ?
Requirement.txt
Django
django-crispy-forms==1.7.0
pytz==2017.3
gunicorn==19.9.0
django-widget-tweaks
psycopg2
Please help me in figuring out what I am doing wrong.

cap deploy gives me Capistrano::ConnectionError

ssh: Could not resolve hostname mitosis.example.com: Name or service not known
fatal: The remote end hung up unexpectedly
*** [deploy:update_code] rolling back
* executing "rm -rf /home/httpd/h.example.com/htdocs/www/releases/20131011050831; true"
servers: ["stagger6.colo.example.com"]
** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: stagger6.colo.example.com
(SocketError: getaddrinfo: Name or service not known)
Command git ls-remote git#mitosis.example.com:example-site.git master returned status code pid 4571 exit 128
The capfile is configured incorrectly.
git#mitosis.example.com:example-site.git is example info.
mitosis.example.com isn't a valid host.