PeteManchester / MediaPlayer

61 stars 20 forks source link

ubuntu 20.04 ARM64 on Pi: fatal error on startup #78

Closed ghost closed 4 years ago

ghost commented 4 years ago

I've trying to run MediaPlayer on 64-bit Ubuntu on by Pi 4B using openjdk-8-jre-headless. I get the following error at startup:

ubuntu@tarmachan2:~/mediaplayer$ Exception in thread "main" java.lang.UnsatisfiedLinkError: no ohNet in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
        at java.lang.Runtime.loadLibrary0(Runtime.java:870)
        at java.lang.System.loadLibrary(System.java:1124)
        at org.openhome.net.core.InitParams.<clinit>(InitParams.java:77)
        at org.rpi.main.SimpleDevice.initSimpleDevice(SimpleDevice.java:137)
        at org.rpi.main.SimpleDevice.<init>(SimpleDevice.java:105)
        at org.rpi.main.StartMe.main(StartMe.java:97)

The java process is still running, but there's nothing listening on the network. Mediaplayer log:

Friendly Name :         Default
Version :                       0.0.9.5
Host name  :                    tarmachan2.lan
StartTime :                     Sun May 03 15:41:32 UTC 2020
LocalTime :                     Sun May 03 15:41:32 UTC 2020
DST  :                          Offset = 0
Timezone :                      Etc/UTC, Coordinated Universal Time, Coordinated Universal Time

2020-05-03 15:41:32,718 [main] FATAL [org.rpi.config.Config] ###Start of app.properties###
2020-05-03 15:41:32,719 [main] FATAL [org.rpi.config.Config] 'mplayer_cache_min' : '80'
2020-05-03 15:41:32,719 [main] FATAL [org.rpi.config.Config] 'mplayer_playlist' : 'asx,b4s,kpl,m3u,pls,ram,rm,smil,wax,wvx'
2020-05-03 15:41:32,719 [main] FATAL [org.rpi.config.Config] 'airplay_latency_enabled' : 'true'
2020-05-03 15:41:32,719 [main] FATAL [org.rpi.config.Config] 'mplayer_path' : '/usr/bin/mplayer'
2020-05-03 15:41:32,719 [main] FATAL [org.rpi.config.Config] 'mediaplayer_enable_receiver' : 'true'
2020-05-03 15:41:32,719 [main] FATAL [org.rpi.config.Config] 'mplayer_cache_size' : '520'
2020-05-03 15:41:32,720 [main] FATAL [org.rpi.config.Config] 'java_sound_software_mixer_enabled' : 'false'
2020-05-03 15:41:32,720 [main] FATAL [org.rpi.config.Config] 'mediaplayer_player' : 'mpd'
2020-05-03 15:41:32,720 [main] FATAL [org.rpi.config.Config] 'airplay_enabled' : 'true'
2020-05-03 15:41:32,720 [main] FATAL [org.rpi.config.Config] 'mediaplayer_playlist_max' : '1000'
2020-05-03 15:41:32,720 [main] FATAL [org.rpi.config.Config] 'log_file_name' : 'mediaplayer.log'
2020-05-03 15:41:32,720 [main] FATAL [org.rpi.config.Config] 'mpd_port' : '6600'
2020-05-03 15:41:32,720 [main] FATAL [org.rpi.config.Config] 'web_server_enabled' : 'true'
2020-05-03 15:41:32,720 [main] FATAL [org.rpi.config.Config] 'log_console_level' : 'off'
2020-05-03 15:41:32,720 [main] FATAL [org.rpi.config.Config] 'airplay_port' : '5002'
2020-05-03 15:41:32,720 [main] FATAL [org.rpi.config.Config] 'web_server_port' : '8088'
2020-05-03 15:41:32,721 [main] FATAL [org.rpi.config.Config] 'mpd_preload_timer' : '3'
2020-05-03 15:41:32,721 [main] FATAL [org.rpi.config.Config] 'airplay_master_volume_enabled' : 'true'
2020-05-03 15:41:32,721 [main] FATAL [org.rpi.config.Config] 'mpd_host' : 'localhost'
2020-05-03 15:41:32,721 [main] FATAL [org.rpi.config.Config] 'mediaplayer_friendly_name' : 'Default'
2020-05-03 15:41:32,721 [main] FATAL [org.rpi.config.Config] 'mediaplayer_save_local_playlist' : 'true'
2020-05-03 15:41:32,721 [main] FATAL [org.rpi.config.Config] 'openhome_port' : '52821'
2020-05-03 15:41:32,721 [main] FATAL [org.rpi.config.Config] 'log_file_level' : 'warn'
2020-05-03 15:41:32,721 [main] FATAL [org.rpi.config.Config] 'songcast_latency_enabled' : 'false'
2020-05-03 15:41:32,721 [main] FATAL [org.rpi.config.Config] 'mediaplayer_max_volume' : '100'
2020-05-03 15:41:32,722 [main] FATAL [org.rpi.config.Config] 'mediaplayer_startup_volume' : '-1'
2020-05-03 15:41:32,722 [main] FATAL [org.rpi.config.Config] 'pins_device_max' : '20'
2020-05-03 15:41:32,722 [main] FATAL [org.rpi.config.Config] 'radio_tunein_partnerid' : ''
2020-05-03 15:41:32,722 [main] FATAL [org.rpi.config.Config] 'openhome_log_level' : 'Error'
2020-05-03 15:41:32,722 [main] FATAL [org.rpi.config.Config] 'mediaplayer_enable_avTransport' : 'true'
2020-05-03 15:41:32,722 [main] FATAL [org.rpi.config.Config] 'java_soundcard_suffix' : '[PLUGHW:0,0]--PRIMARY SOUND DRIVER'
2020-05-03 15:41:32,722 [main] FATAL [org.rpi.config.Config] 'pins_service_url' : 'http://192.168.1.205:8081/PinServiceManager1/webapi/broadcast'
2020-05-03 15:41:32,722 [main] FATAL [org.rpi.config.Config] ###End of app.properties####
2020-05-03 15:41:32,909 [main] FATAL [org.rpi.main.StartMe] #####Start of System Properties#########
2020-05-03 15:41:32,914 [main] FATAL [org.rpi.main.StartMe] awt.toolkit=sun.awt.X11.XToolkit
2020-05-03 15:41:32,914 [main] FATAL [org.rpi.main.StartMe] file.encoding=UTF-8
2020-05-03 15:41:32,914 [main] FATAL [org.rpi.main.StartMe] file.encoding.pkg=sun.io
2020-05-03 15:41:32,914 [main] FATAL [org.rpi.main.StartMe] file.separator=/
2020-05-03 15:41:32,914 [main] FATAL [org.rpi.main.StartMe] java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
2020-05-03 15:41:32,914 [main] FATAL [org.rpi.main.StartMe] java.awt.printerjob=sun.print.PSPrinterJob
2020-05-03 15:41:32,915 [main] FATAL [org.rpi.main.StartMe] java.class.path=/home/ubuntu/mediaplayer/mediaplayer.jar
2020-05-03 15:41:32,915 [main] FATAL [org.rpi.main.StartMe] java.class.version=52.0
2020-05-03 15:41:32,915 [main] FATAL [org.rpi.main.StartMe] java.endorsed.dirs=/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/endorsed
2020-05-03 15:41:32,915 [main] FATAL [org.rpi.main.StartMe] java.ext.dirs=/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/ext:/usr/java/packages/lib/ext
2020-05-03 15:41:32,915 [main] FATAL [org.rpi.main.StartMe] java.home=/usr/lib/jvm/java-8-openjdk-arm64/jre
2020-05-03 15:41:32,915 [main] FATAL [org.rpi.main.StartMe] java.io.tmpdir=/tmp
2020-05-03 15:41:32,915 [main] FATAL [org.rpi.main.StartMe] java.library.path=/usr/java/packages/lib/aarch64:/usr/lib/aarch64-linux-gnu/jni:/lib/aarch64-linux-gnu:/usr/lib/aarch64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
2020-05-03 15:41:32,916 [main] FATAL [org.rpi.main.StartMe] java.runtime.name=OpenJDK Runtime Environment
2020-05-03 15:41:32,916 [main] FATAL [org.rpi.main.StartMe] java.runtime.version=1.8.0_252-8u252-b09-1ubuntu1-b09
2020-05-03 15:41:32,916 [main] FATAL [org.rpi.main.StartMe] java.specification.name=Java Platform API Specification
2020-05-03 15:41:32,916 [main] FATAL [org.rpi.main.StartMe] java.specification.vendor=Oracle Corporation
2020-05-03 15:41:32,916 [main] FATAL [org.rpi.main.StartMe] java.specification.version=1.8
2020-05-03 15:41:32,916 [main] FATAL [org.rpi.main.StartMe] java.vendor=Private Build
2020-05-03 15:41:32,916 [main] FATAL [org.rpi.main.StartMe] java.vendor.url=http://java.oracle.com/
2020-05-03 15:41:32,916 [main] FATAL [org.rpi.main.StartMe] java.vendor.url.bug=http://bugreport.sun.com/bugreport/
2020-05-03 15:41:32,916 [main] FATAL [org.rpi.main.StartMe] java.version=1.8.0_252
2020-05-03 15:41:32,917 [main] FATAL [org.rpi.main.StartMe] java.vm.info=mixed mode
2020-05-03 15:41:32,917 [main] FATAL [org.rpi.main.StartMe] java.vm.name=OpenJDK 64-Bit Server VM
2020-05-03 15:41:32,917 [main] FATAL [org.rpi.main.StartMe] java.vm.specification.name=Java Virtual Machine Specification
2020-05-03 15:41:32,917 [main] FATAL [org.rpi.main.StartMe] java.vm.specification.vendor=Oracle Corporation
2020-05-03 15:41:32,917 [main] FATAL [org.rpi.main.StartMe] java.vm.specification.version=1.8
2020-05-03 15:41:32,917 [main] FATAL [org.rpi.main.StartMe] java.vm.vendor=Private Build
2020-05-03 15:41:32,917 [main] FATAL [org.rpi.main.StartMe] java.vm.version=25.252-b09
2020-05-03 15:41:32,917 [main] FATAL [org.rpi.main.StartMe] line.separator=

2020-05-03 15:41:32,917 [main] FATAL [org.rpi.main.StartMe] os.arch=aarch64
2020-05-03 15:41:32,917 [main] FATAL [org.rpi.main.StartMe] os.name=Linux
2020-05-03 15:41:32,918 [main] FATAL [org.rpi.main.StartMe] os.version=5.4.0-1008-raspi
2020-05-03 15:41:32,918 [main] FATAL [org.rpi.main.StartMe] path.separator=:
2020-05-03 15:41:32,918 [main] FATAL [org.rpi.main.StartMe] sun.arch.data.model=64
2020-05-03 15:41:32,918 [main] FATAL [org.rpi.main.StartMe] sun.boot.class.path=/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/resources.jar:/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/rt.jar:/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/jsse.jar:/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/jce.jar:/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/jfr.jar:/usr/lib/jvm/java-8-openjdk-arm64/jre/classes
2020-05-03 15:41:32,918 [main] FATAL [org.rpi.main.StartMe] sun.boot.library.path=/usr/lib/jvm/java-8-openjdk-arm64/jre/lib/aarch64
2020-05-03 15:41:32,918 [main] FATAL [org.rpi.main.StartMe] sun.cpu.endian=little
2020-05-03 15:41:32,918 [main] FATAL [org.rpi.main.StartMe] sun.cpu.isalist=
2020-05-03 15:41:32,918 [main] FATAL [org.rpi.main.StartMe] sun.io.unicode.encoding=UnicodeLittle
2020-05-03 15:41:32,918 [main] FATAL [org.rpi.main.StartMe] sun.java.command=/home/ubuntu/mediaplayer/mediaplayer.jar
2020-05-03 15:41:32,918 [main] FATAL [org.rpi.main.StartMe] sun.java.launcher=SUN_STANDARD
2020-05-03 15:41:32,919 [main] FATAL [org.rpi.main.StartMe] sun.jnu.encoding=UTF-8
2020-05-03 15:41:32,919 [main] FATAL [org.rpi.main.StartMe] sun.management.compiler=HotSpot 64-Bit Tiered Compilers
2020-05-03 15:41:32,919 [main] FATAL [org.rpi.main.StartMe] sun.os.patch.level=unknown
2020-05-03 15:41:32,919 [main] FATAL [org.rpi.main.StartMe] user.dir=/home/ubuntu/mediaplayer
2020-05-03 15:41:32,919 [main] FATAL [org.rpi.main.StartMe] user.home=/home/ubuntu
2020-05-03 15:41:32,919 [main] FATAL [org.rpi.main.StartMe] user.language=en
2020-05-03 15:41:32,919 [main] FATAL [org.rpi.main.StartMe] user.name=ubuntu
2020-05-03 15:41:32,919 [main] FATAL [org.rpi.main.StartMe] user.timezone=Etc/UTC
2020-05-03 15:41:32,919 [main] FATAL [org.rpi.main.StartMe] #####End of System Properties#########
2020-05-03 15:41:32,920 [main] FATAL [org.rpi.main.StartMe]
2020-05-03 15:41:32,922 [main] FATAL [org.rpi.main.StartMe] #####Start of System Variables#########
2020-05-03 15:41:32,924 [main] FATAL [org.rpi.main.StartMe] PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
2020-05-03 15:41:32,924 [main] FATAL [org.rpi.main.StartMe] LESSCLOSE=/usr/bin/lesspipe %s %s
2020-05-03 15:41:32,924 [main] FATAL [org.rpi.main.StartMe] SHELL=/bin/bash
2020-05-03 15:41:32,924 [main] FATAL [org.rpi.main.StartMe] LESSOPEN=| /usr/bin/lesspipe %s
2020-05-03 15:41:32,925 [main] FATAL [org.rpi.main.StartMe] XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
2020-05-03 15:41:32,925 [main] FATAL [org.rpi.main.StartMe] SSH_TTY=/dev/pts/1
2020-05-03 15:41:32,925 [main] FATAL [org.rpi.main.StartMe] SSH_CLIENT=192.168.1.48 58003 22
2020-05-03 15:41:32,925 [main] FATAL [org.rpi.main.StartMe] TERM=xterm
2020-05-03 15:41:32,925 [main] FATAL [org.rpi.main.StartMe] OLDPWD=/home/ubuntu/mediaplayer
2020-05-03 15:41:32,925 [main] FATAL [org.rpi.main.StartMe] MOTD_SHOWN=pam
2020-05-03 15:41:32,925 [main] FATAL [org.rpi.main.StartMe] USER=ubuntu
2020-05-03 15:41:32,925 [main] FATAL [org.rpi.main.StartMe] LANG=C.UTF-8
2020-05-03 15:41:32,926 [main] FATAL [org.rpi.main.StartMe] DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
2020-05-03 15:41:32,926 [main] FATAL [org.rpi.main.StartMe] XDG_SESSION_ID=6
2020-05-03 15:41:32,926 [main] FATAL [org.rpi.main.StartMe] XDG_SESSION_TYPE=tty
2020-05-03 15:41:32,926 [main] FATAL [org.rpi.main.StartMe] SSH_CONNECTION=192.168.1.48 58003 192.168.1.69 22
2020-05-03 15:41:32,926 [main] FATAL [org.rpi.main.StartMe] LOGNAME=ubuntu
2020-05-03 15:41:32,926 [main] FATAL [org.rpi.main.StartMe] PWD=/home/ubuntu/mediaplayer
2020-05-03 15:41:32,926 [main] FATAL [org.rpi.main.StartMe] LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
2020-05-03 15:41:32,927 [main] FATAL [org.rpi.main.StartMe] XDG_RUNTIME_DIR=/run/user/1000
2020-05-03 15:41:32,927 [main] FATAL [org.rpi.main.StartMe] HOME=/home/ubuntu
2020-05-03 15:41:32,928 [main] FATAL [org.rpi.main.StartMe] SHLVL=1
2020-05-03 15:41:32,928 [main] FATAL [org.rpi.main.StartMe] XDG_SESSION_CLASS=user
2020-05-03 15:41:32,929 [main] FATAL [org.rpi.main.StartMe] _=./run.sh
2020-05-03 15:41:32,929 [main] FATAL [org.rpi.main.StartMe] #####End of System Variables#########
2020-05-03 15:41:32,929 [main] FATAL [org.rpi.main.StartMe]
2020-05-03 15:41:33,017 [main] WARN  [org.rpi.os.OSManager] Using full_path /home/ubuntu/mediaplayer/mediaplayer_lib/ohNet/default

MediaPlayer runs fine on the same machine with 32-bit Ubuntu 20.04. I believe the following is required to get MediaPlayer running on aarch64:

I had a go at building ohNet, and I got it to produce, among other things, libohNet.so, and placed it in mediaplayer_lib/ohNet/default, but MediaPlayer errors out, requiring libohNetJni.so. How do I get it to build that?

ghost commented 4 years ago

Never mind - I've got it going using the libohNet.so and libohNetJni.so from MinimServer's arm64 build.

PeteManchester commented 4 years ago

Hi, Good to hear you got it working.

Rather than it defaulting to:

/home/ubuntu/mediaplayer/mediaplayer_lib/ohNet/default

I would like to try and find a way to identify that the mediaplayer is running on aarch64 and so if you have time can you send me a log file where you have the log level set to debug

So far the only things I can see in the log file that I could use are these:

2020-05-03 15:41:32,917 [main] FATAL [org.rpi.main.StartMe] os.arch=aarch64 2020-05-03 15:41:32,917 [main] FATAL [org.rpi.main.StartMe] os.name=Linux 2020-05-03 15:41:32,918 [main] FATAL [org.rpi.main.StartMe] os.version=5.4.0-1008-raspi 2020-05-03 15:41:32,918 [main] FATAL [org.rpi.main.StartMe] sun.arch.data.model=64

If you could send the log file to pete.hoyle1@gmail.com please.

ghost commented 4 years ago

Email sent - thanks 😁

ghost commented 4 years ago

Fixed by 55dc540f630c4c657ffee4b7d4c461c99da56336