Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied error #8

Open
darrell-d opened this issue Apr 15, 2020 · 5 comments
Open

Permission denied error #8

darrell-d opened this issue Apr 15, 2020 · 5 comments

Comments

@darrell-d
Copy link

darrell-d commented Apr 15, 2020

Hi,

I followed the instructions, got everything added to a lambda function, however when I call it from the terminal I get:
{ "StatusCode": 200, "FunctionError": "Unhandled", "LogResult": "U1RBUlQgUmVxdWVzdE...", "ExecutedVersion": "$LATEST" }

Or directly via the "TEST" button in AWS Lambda, I get the error message:

`START RequestId: a46f2842-4561-46aa-8b81-a5284bcdc0ed Version: $LATEST

dirname /var/task/bootstrap

BASE=/var/task

EXE=/var/task/bin/hello_world

HOME=/tmp

export HOME

export RELEASE_READ_ONLY=true

RELEASE_READ_ONLY=true

export LD_LIBRARY_PATH=/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib:/var/task/lib/elixir_runtime-0.1.0/priv LD_LIBRARY_PATH=/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib:/var/task/lib/elixir_runtime-0.1.0/priv

/var/task/bin/hello_world foreground

/var/task/bootstrap: line 16: /var/task/bin/hello_world: Permission denied

END RequestId: a46f2842-4561-46aa-8b81-a5284bcdc0ed

REPORT RequestId: a46f2842-4561-46aa-8b81-a5284bcdc0ed Duration: 84.94 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 6 MB

RequestId: a46f2842-4561-46aa-8b81-a5284bcdc0ed Error: Runtime exited with error: exit status 126

Runtime.ExitError`

(emphasis mine)

Any idea what I'm doing wrong?

@gvasquez95
Copy link

gvasquez95 commented Nov 7, 2020

Same exit status 126 here, unfortunately! :(

If it helps, I'm using: Erlang/OTP 23 [erts-11.1.2] in OSX

@gvasquez95
Copy link

I just got it running by issuing a chmod +x to the binary in the rel folder, but now a new problem arises which I think might be related to the Elixir version:

+ /var/task/bin/hello_world foreground
Usage: hello_world COMMAND [ARGS]

The known commands are:

    start          Starts the system
    start_iex      Starts the system with IEx attached
    daemon         Starts the system as a daemon
    daemon_iex     Starts the system as a daemon with IEx attached
    eval "EXPR"    Executes the given expression on a new, non-booted system
    rpc "EXPR"     Executes the given expression remotely on the running system
    remote         Connects to the running system via a remote shell
    restart        Restarts the running system via a remote command
    stop           Stops the running system via a remote command
    pid            Prints the operating system PID of the running system via a remote command
    version        Prints the release name and version to be booted

ERROR: Unknown command foreground

@gvasquez95
Copy link

almost there!

/var/task/erts-11.1.2/bin/beam.smp: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory

@dexter0201
Copy link

Any update on this issue? I'm getting the same error with @gvasquez95 before.

`+ /var/task/bin/hello_world foreground
Usage: hello_world COMMAND [ARGS]

The known commands are:

start          Starts the system
start_iex      Starts the system with IEx attached
daemon         Starts the system as a daemon
daemon_iex     Starts the system as a daemon with IEx attached
eval "EXPR"    Executes the given expression on a new, non-booted system
rpc "EXPR"     Executes the given expression remotely on the running system
remote         Connects to the running system via a remote shell
restart        Restarts the running system via a remote command
stop           Stops the running system via a remote command
pid            Prints the operating system PID of the running system via a remote command
version        Prints the release name and version to be booted

ERROR: Unknown command foreground
`

@gvasquez95
Copy link

@dexter0201 I fixed it tweaking the config files replacing foreground with start, using sed as per:

mix do release, bootstrap
find . -name bootstrap |xargs sed -i 's/foreground/start/g'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants