next.js project working successfully on my local.
When I tried to deploy to service (AWS amplify), here is a failed message
6211 verbose cwd /codebuild/output/src083979871/src/nftgenerator
6212 verbose Linux 4.14.246-187.474.amzn2.x86_64
6213 verbose argv "/root/.nvm/versions/node/v14.19.0/bin/node" "/root/.nvm/versions/node/v14.19.0/bin/npm" "ci"
6214 verbose node v14.19.0
6215 verbose npm v6.14.16
6216 error Error while executing:
6216 error /usr/bin/git ls-remote -h -t ssh://git#github.com/ethereumjs/ethereumjs-abi.git
6216 error
6216 error Permission denied (publickey).
6216 error fatal: Could not read from remote repository.
6216 error
6216 error Please make sure you have the correct access rights
6216 error and the repository exists.
6216 error
6216 error exited with error code: 128
6217 verbose exit [ 1, true ]
2022-04-16T21:19:33.325Z [ERROR]: !!! Build failed
2022-04-16T21:19:33.325Z [ERROR]: !!! Non-Zero Exit Code detected
How can I solve it?
Related
Using AWS CDK, I am trying to deploy the Docker image with lambda function on AWS. And I am getting the following error.
[100%] fail: docker login --username AWS --password-stdin https://XXXXXXXXXXXX.dkr.ecr.us-east-1.amazonaws.com exited with error code 1: Error saving credentials: error storing credentials - err: exit status 1, out: `Post "http://ipc/registry/credstore-updated": dial unix /Users/my_mac/Library/Containers/com.docker.docker/Data/backend.sock: connect: connection refused`
❌ MyService (prj-development) failed: Error: Failed to publish one or more assets. See the error messages above for more information.
at publishAssets (/Users/my_mac/.npm/_npx/8365afa3375eae8d/node_modules/aws-cdk/lib/util/asset-publishing.ts:44:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at CloudFormationDeployments.publishStackAssets (/Users/my_mac/.npm/_npx/8365afa3375eae8d/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:464:7)
at CloudFormationDeployments.deployStack (/Users/my_mac/.npm/_npx/8365afa3375eae8d/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:339:7)
at CdkToolkit.deploy (/Users/my_mac/.npm/_npx/8365afa3375eae8d/node_modules/aws-cdk/lib/cdk-toolkit.ts:209:24)
at initCommandLine (/Users/my_mac/.npm/_npx/8365afa3375eae8d/node_modules/aws-cdk/lib/cli.ts:341:12)
Failed to publish one or more assets. See the error messages above for more information.
make: *** [deploy-local] Error 1
What can I do, please?
Before deployment, open the Docker app/daemon on your machine.
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
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.
i tried to build the zeppelin-0.7.0 master branch downloaded from github, but failed .
the build command:
mvn package -Pyarn -Pbuild-distr -Pspark-2.0 -Dspark.version=2.0.1 -Phadoop-2.6 -Dhadoop.version=2.6.0 -Pscala-2.11 -Ppyspark -DskipTests -X
the output stacktrace is:
[ERROR] error Command failed with exit code 1.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.397 s
[INFO] Finished at: 2017-01-14T11:39:00+08:00
[INFO] Final Memory: 19M/228M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:yarn (yarn install) on project zeppelin-web: Failed to run task: 'yarn install --no-lockfile' failed. (error code 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:yarn (yarn install) on project zeppelin-web: Failed to run task
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoFailureException: Failed to run task
at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:95)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: com.github.eirslett.maven.plugins.frontend.lib.TaskRunnerException: 'yarn install --no-lockfile' failed. (error code 1)
at com.github.eirslett.maven.plugins.frontend.lib.YarnTaskExecutor.execute(YarnTaskExecutor.java:61)
at com.github.eirslett.maven.plugins.frontend.mojo.YarnMojo.execute(YarnMojo.java:65)
at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:89)
... 22 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
I found a lot but no info about this error. Thanks in advance for helping me figure out the reason.
Try to downgrade your node version to node 6 and compile again.
After compilation, upgrade your node version.
I hit the same issue-- I ended up installing all the various npm bits that kept failing by running:
$ sudo npm install -g bower grunt grunt-cli npm-run-all rimraf webpack
Also the build attempt didn't like that I ran it initially as sudo/root (on a test machine), so I recursively changed ownership of /opt/zeppelin (where I extracted the zeppelin tarball) to a regular user 'zeppelin', then ran the maven build command as user zeppelin at /opt/zeppelin. This was able to get me unblocked, hopefully this may help you too.
I don't know why but I cannot seem to figure out why this is happening. I can build and run the docker image locally.
Recent Events:
2015-05-25 12:57:07 UTC+1000 ERROR Update environment operation is complete, but with errors. For more information, see troubleshooting documentation.
2015-05-25 12:57:07 UTC+1000 INFO New application version was deployed to running EC2 instances.
2015-05-25 12:57:04 UTC+1000 INFO Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
2015-05-25 12:57:04 UTC+1000 ERROR [Instance: i-4775ec9b] Command failed on instance. Return code: 1 Output: (TRUNCATED)... run Docker container: vel="fatal" msg="Error response from daemon: Cannot start container 02c057b331bf3a3d912bf064f1dca3e00c95746b5748c3c4a28a5c6b452ff335: [8] System error: exec: \"bin/app\": permission denied" . Check snapshot logs for details. Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/04run.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
2015-05-25 12:57:03 UTC+1000 ERROR Failed to run Docker container: vel="fatal" msg="Error response from daemon: Cannot start container 02c057b331bf3a3d912bf064f1dca3e00c95746b5748c3c4a28a5c6b452ff335: [8] System error: exec: \"bin/app\": permission denied" . Check snapshot logs for details.
Dockerfile:
FROM java:8u45-jre
MAINTAINER Terence Munro <terry#zenkey.com.au>
ADD ["opt", "/opt"]
WORKDIR /opt/docker
RUN ["chown", "-R", "daemon:daemon", "."]
USER daemon
ENTRYPOINT ["bin/app"]
EXPOSE 9000
Dockerrun.aws.json:
{
"AWSEBDockerrunVersion": "1",
"Ports": [
{
"ContainerPort": "9000"
}
],
"Volumes": []
}
Additional logs as attachment at: https://forums.aws.amazon.com/thread.jspa?threadID=181270
Any help is extremely appreciated.
#nick-humrich suggestion of trying eb local run worked. So using eb deploy ended up working.
I had previously been uploading through the web interface.
Initially using eb deploy was giving me a ERROR: TypeError :: data must be a byte string but I found this issue which was resolved by uninstalling pyopenssl.
So I don't know why the web interface was giving me permission denied perhaps something to do with the zip file?
But anyway I'm able to deploy now thank you.
I had a similar problem running Docker on Elastic Beanstalk. When I pointed CMD in the Dockerfile to a shell script (/path/to/my_script.sh), the EB deployment would fail with
/path/to/my_script.sh: Permission denied.
Apparently, even though I had run RUN chmod +x /path/to/my_script.sh during the Docker build, by the time the image was run, the permissions had been changed. Eventually, to make it work I settled on:
CMD ["/bin/bash","-c","chmod +x /path/to/my_script.sh && /path/to/my_script.sh"]