babagreensheep / jellyfin-tizen-docker

215 stars 32 forks source link

/bin/sh: 1: tizen: not found #4

Closed 17hoehbr closed 2 years ago

17hoehbr commented 2 years ago

Hi, just tried using this container and I am getting an error when it gets into creating certificates. It seems like the container just isn't setting the PATH variable for some reason even though it's in the docker file. I've deleted and redownloaded the repository locally and am still getting the same error. Below is the log. For reference I am running this on an M1 Macbook Air.

jellyfin-tizen-docker-master % docker build -t jellyfin .

[+] Building 1210.8s (19/32)                                                                                                                     
 => [internal] load build definition from Dockerfile                                                                                        0.0s
 => => transferring dockerfile: 2.59kB                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                           0.0s
 => => transferring context: 2B                                                                                                             0.0s
 => [internal] load metadata for docker.io/library/ubuntu:21.10                                                                             1.2s
 => [ 1/28] FROM docker.io/library/ubuntu:21.10@sha256:14d8cab8d7bd72a01e225cd85bf37bbf08bf88115769316fa86c776df4ea5fed                    27.8s
 => => resolve docker.io/library/ubuntu:21.10@sha256:14d8cab8d7bd72a01e225cd85bf37bbf08bf88115769316fa86c776df4ea5fed                       0.0s
 => => sha256:14d8cab8d7bd72a01e225cd85bf37bbf08bf88115769316fa86c776df4ea5fed 1.42kB / 1.42kB                                              0.0s
 => => sha256:330330705b92fe325e550f8d35519f2213e1168df212cf8095ea10db63fb6afa 529B / 529B                                                  0.0s
 => => sha256:771a596909ab10d1a46e672acfdae2b4ecae9896feb006e47a62f826f30128dc 1.48kB / 1.48kB                                              0.0s
 => => sha256:924f038c577f5fb37fec4317d1c44a40bae2f6ee798dc0e31394270b30d69e8d 29.03MB / 29.03MB                                           26.6s
 => => extracting sha256:924f038c577f5fb37fec4317d1c44a40bae2f6ee798dc0e31394270b30d69e8d                                                   0.9s
 => [internal] load build context                                                                                                           0.0s
 => => transferring context: 304B                                                                                                           0.0s
 => [ 2/28] RUN apt-get update; apt-get -y upgrade; apt-get clean                                                                          27.4s
 => [ 3/28] RUN DEBIAN_FRONTEND=noninteractive TZ=Singapore apt-get -y install tzdata                                                       2.0s
 => [ 4/28] RUN apt-get -qq install -y git openssh-server                                                                                  57.9s
 => [ 5/28] RUN apt-get install -y sudo                                                                                                     3.2s
 => [ 6/28] RUN apt-get install -y curl                                                                                                     1.9s
 => [ 7/28] RUN apt-get -y install expect                                                                                                   3.5s
 => [ 8/28] RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -                                                                   6.7s
 => [ 9/28] RUN apt-get install -y nodejs                                                                                                  27.2s
 => [10/28] RUN npm update                                                                                                                  0.4s
 => [11/28] RUN useradd -m jellyfin -s /bin/bash                                                                                            0.2s
 => [12/28] RUN wget https://download.tizen.org/sdk/Installer/tizen-studio_4.6/web-cli_Tizen_Studio_4.6_ubuntu-64.bin -P /home/jellyfin  1047.4s
 => [13/28] RUN chmod a+x /home/jellyfin/web-cli_Tizen_Studio_4.6_ubuntu-64.bin                                                             0.8s
 => [14/28] RUN ./home/jellyfin/web-cli_Tizen_Studio_4.6_ubuntu-64.bin --accept-license /home/jellyfin/tizen-studio                         2.9s 
 => ERROR [15/28] RUN tizen     certificate         -a Jellyfin         -p 1234         -c SG         -ct SG         -n Jellyfin         -  0.3s 
------                                                                                                                                           
 > [15/28] RUN tizen     certificate         -a Jellyfin         -p 1234         -c SG         -ct SG         -n Jellyfin         -f Jellyfin:   
#18 0.278 /bin/sh: 1: tizen: not found                                                                                                           
------
executor failed running [/bin/sh -c tizen     certificate         -a Jellyfin         -p 1234         -c SG         -ct SG         -n Jellyfin         -f Jellyfin]: exit code: 127
17hoehbr commented 2 years ago

Tested again on my home server. Builds without issue on Ubuntu 22.04. It might be a Mac host specific bug.

babagreensheep commented 2 years ago

I'm so sorry I don't currently have a Mac environment available to test. Let me know if you managed to identify the issue!

17hoehbr commented 2 years ago

It seems like the issue is specifically related to the M1. Tizen Studio is a 64 bit app so trying to run the binary in an arm64 container fails. Running docker build --platform linux/amd64 -t jellyfin . makes the container run through Rosetta which fixes the issue.

olnw commented 2 years ago

I'm getting this same error on Arch Linux with kernel version 5.19.8-arch1-1 and Docker version 20.10.18, build b40c2f6b5d. My CPU is 64-bit (AMD Athlon 3000G).

Step 14/32 : RUN chmod a+x /home/jellyfin/web-cli_Tizen_Studio_4.6_ubuntu-64.bin
 ---> Running in fd79567dfcf0
Removing intermediate container fd79567dfcf0
 ---> 483d7df07f95
Step 15/32 : RUN ./home/jellyfin/web-cli_Tizen_Studio_4.6_ubuntu-64.bin --accept-license /home/jellyfin/tizen-studio
 ---> Running in 2a4c583f720d
setting up jdk at /home/jellyfin/.package-manager/jdk
rm: cannot remove '/home/jellyfin/.package-manager/jdk': No such file or directory
library initialization failed - unable to allocate file descriptor table - out of memory./installer.sh: line 19:    53 Aborted                 (core dumped) "${HOME}/.package-manager/jdk/bin/java" -jar installer.jar "${args[@]}"
Removing intermediate container 2a4c583f720d
 ---> 506f2004e1be
Step 16/32 : ENV PATH=${PATH}:/home/jellyfin/tizen-studio/tools/ide/bin:/home/jellyfin/tizen-studio/tools
 ---> Running in 4a9c77f75803
Removing intermediate container 4a9c77f75803
 ---> 21d2678a7134
Step 17/32 : RUN tizen     certificate         -a Jellyfin         -p 1234         -c SG         -ct SG         -n Jellyfin         -f Jellyfin
 ---> Running in 6762b6c4a4a0
/bin/sh: 1: tizen: not found
The command '/bin/sh -c tizen     certificate         -a Jellyfin         -p 1234         -c SG         -ct SG         -n Jellyfin         -f Jellyfin' returned a non-zero code: 127

Full log at https://pastebin.com/5AxzE7R8

EDIT: Trying to build with docker build --platform linux/amd64 -t jellyfin . resulted in the same error.

jdollar commented 1 year ago

@olnw, unsure if you resolved it or not, but I also ran into a similar issue. From your log it looks to be the same thing that happened to me. The error we both got was:

rm: cannot remove '/home/jellyfin/.package-manager/jdk': No such file or directory library initialization failed - unable to allocate file descriptor table - out of memory./installer.sh: line 19: 53 Aborted (core dumped) "${HOME}/.package-manager/jdk/bin/java" -jar installer.jar "${args[@]}"

To resolve it I followed the steps in this post: https://superuser.com/a/1413390. I updated the docker.service file on my machine (Fedora 37) to have the --default-ulimit nofile=65536:65536 additional parameters. Then after doing a daemon-reload and restart of the docker service it built fine.

Hopefully that'll help anyone who has a similar issue.