papakay

papakay

Current shell error with edeliver

Hello, please i’m having issue deploying to a digitalocean droplet (Ubuntu 16.04.3).

Please find below the error details:

Output of the command is shown above and the command executed
on that host is printed below for debugging purposes:

FAILED with exit status 255:

    current_shell="$0" || :
    [ -z "$current_shell" ] && current_shell="$SHELL"
    case "$current_shell" in
      (*bash*) echo 'bash is installed and the default shell'  ;;
      (*zsh*)  echo  'zsh is installed and the default shell'  ;;
      (*)
       echo
       echo "You are using an unsupported shell: '$current_shell'"
       echo "edeliver requires either bash or zsh to be installed"
       echo "and the default shell for the build user 'kehinde'"
       echo "on your build host: '46.101.30.23'."
       exit 1
       ;;
    esac
    set -e
    if [ ! -d /home/kehinde/app_name/builds ]
    then
      mkdir -p /home/kehinde/app_name/builds
      cd /home/kehinde/app_name/builds
      git init
      git config receive.denyCurrentBranch ignore
    else
      cd /home/kehinde/app_name/builds
      git config receive.denyCurrentBranch ignore
    fi

Marked As Solved

papakay

papakay

I found the issue to be a port issue. Please refer to this link

https://github.com/edeliver/edeliver/issues/230#issuecomment-382800734

Also Liked

kokolegorille

kokolegorille

I am sorry, I have little experience with edeliver as I deploy manually.

But what I can tell is the user shell is ok, that would mean the rest is in error.

I cannot really help You, but I would try to run each commands separately, to check which one is failing.

alexandrubagu

alexandrubagu

Do you have git installed ? Edeliver adds your build machine as remote and uses the ssh protocol to push the source code of your app there. you can check that by running git remote -v show in you project directory after building on the build host. It shows something like that:

$ git remote -v show
$BUILD_USER@$BUILD_HOST $BUILD_USER@$BUILD_HOST:$BUILD_AT (fetch)
$BUILD_USER@$BUILD_HOST $BUILD_USER@$BUILD_HOST:$BUILD_AT (push)
origin git@your_remote(fetch)
origin git@your_remote(push)

Last Post!

joaquinalcerro

joaquinalcerro

So I am following this thread to solve the same issue without success. I will appreciate your help in this matter.

Environment

Elixir 1.6.6 (compiled with OTP 20)
edeliver v1.4.5 | GitHub - edeliver/edeliver: Deployment for Elixir and Erlang · GitHub
distillery 1.5.3
OpenSuse Leap 15 (my laptop) with name: linux-6h0b
Build Server: Ubuntu 16.04
Production Server: Ubuntu 16.04

The problem

BUILDING RELEASE OF EPR APP ON BUILD HOST

-----> Authorizing hosts
-----> Ensuring hosts are ready to accept git pushes
ssh: connect to host linux-6h0b port 22: Connection refused

A remote command failed on:

  jalcerro@linux-6h0b

Output of the command is shown above and the command executed
on that host is printed below for debugging purposes:

FAILED with exit status 255:

    current_shell="$0" || :
    [ -z "$current_shell" ] && current_shell="$SHELL"
    case "$current_shell" in
      (*bash*) echo 'bash is installed and the default shell' &> /dev/null ;;
      (*zsh*)  echo  'zsh is installed and the default shell' &> /dev/null ;;
      (*)
       echo
       echo "You are using an unsupported shell: '$current_shell'"
       echo "edeliver requires either bash or zsh to be installed"
       echo "and the default shell for the build user 'jalcerro'"
       echo "on your build host: 'linux-6h0b'."
       exit 1
       ;;
    esac
    set -e
    if [ ! -d /home/jalcerro/app_build ]
    then
      mkdir -p /home/jalcerro/app_build
      cd /home/jalcerro/app_build
      git init &> /dev/null
      git config receive.denyCurrentBranch ignore
    else
      cd /home/jalcerro/app_build
      git config receive.denyCurrentBranch ignore
    fi

My .deliver/config file

#!/usr/bin/env zsh

APP="epr"

BUILD_HOST="build-server.local"
BUILD_USER="jalcerro"
BUILD_AT="/home/jalcerro/app_build"

PRODUCTION_HOSTS="prod-app.local"
PRODUCTION_USER="support" 
DELIVER_TO="/home/support/epr" 

pre_erlang_get_and_update_deps() {
  local _prod_secret_path="/home/jalcerro/app_config/prod.secret.exs"
  if [ "$TARGET_MIX_ENV" = "prod" ]; then
    __sync_remote "
      ln -sfn '$_prod_secret_path' '$BUILD_AT/config/prod.secret.exs'
    "
  fi
}

I have configured

  • I am able to ssh into my build server without password
  • Configured .ssh/config file proppery
  • Used ssh-copy-id to add key to authorized-keys file
  • check my shell to by zsh in passwd

I don’t understand

  • Why is edeliver trying to use my computer name “linux-6h0b” instead of the the build_host “build-server.local”?

Thanks for your help.

Where Next?

Popular in Questions Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

Other popular topics Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 49134 226
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New

We're in Beta

About us Mission Statement