PeteManchester / MediaPlayer

61 stars 20 forks source link

More OS updates and now neither player or web browser work at all #105

Closed mightyoakbob closed 7 months ago

mightyoakbob commented 7 months ago

Hi Pete,

I do regular player builds to make sure things still work and this time they didn't - Again!

Althought the main download OS is unchanged Raspberry Pi OS Lite Release date: December 11th 2023 System: 32-bit Kernel version: 6.1 Debian version: 12 (bookworm) Size: 520MB

This download did work fine last month but now when you add the updates with: sudo apt update sudo apt upgrade

There are a torrent of updates that go on for ages. Then MediaPlayer no longer functions at all, no webserver or media player.

I have of course gone through the process a few times to make sure I've not made a mistake.

I don't know where to start. Any suggestions?

Thanks. Bob.

mightyoakbob commented 7 months ago

Don't know if I'm on the right track but as neither the web server or the player even start I did think about Java. Now in the past I used to install java 11 with the command: sudo apt install openjdk-11-jdk

But that now errors with..

The following packages have unmet dependencies: ca-certificates-java : Breaks: openjdk-11-jre-headless (< 11.0.19+7~1~) but 11.0.17+8-2 is to be installed E: Unable to correct problems, you have held broken packages.

So used ... sudo apt install default-jdk Installed and didn't error but the system doesn't work at all. Is that the issue?

Help Bob.

PeteManchester commented 7 months ago

Hi Bob,

I'm not sure what the problem is..

If you do a java -version, does it give you a version number for the java that is installed?

If you get a Java version, what happens if you try to run mediaplayer manually? (sudo /home/pi/mediaplayer/run.sh)

On Mon, 19 Feb 2024 at 15:26, mightyoakbob @.***> wrote:

Don't know if I'm on the right track but as neither the web server or the player even start I did think about Java. Now in the past I used to install java 11 with the command: sudo apt install openjdk-11-jdk

But that now errors with..

The following packages have unmet dependencies: ca-certificates-java : Breaks: openjdk-11-jre-headless (< 11.0.19+71) but 11.0.17+8-2 is to be installed E: Unable to correct problems, you have held broken packages.

So used ... sudo apt install default-jdk Installed and didn't error but the system doesn't work at all. Is that the issue?

Help Bob.

— Reply to this email directly, view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/105#issuecomment-1952688038, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5RVJZAL7ZSDY3DBZPPILTYUNVITAVCNFSM6AAAAABDPRAB7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJSGY4DQMBTHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

mightyoakbob commented 7 months ago

Hi Pete, As i cannot install Java 11 any more I use sudo apt install default-jdk

Which installs openjdk version "17.0.9" 2023-10-17 OpenJDK Runtime Environment (build 17.0.9+9-Raspbian-1deb12u1rpt1) OpenJDK Client VM (build 17.0.9+9-Raspbian-1deb12u1rpt1, mixed mode, emulated-client)

If I use sudo /home/pi/mediaplayer/run.sh, the led on the dac board does a quick flash and that's it. Neither webserver or player present themselves at all.

I don't know if it is a Java issue it just seemed likely to me.

Thanks.

Bob.

PeteManchester commented 7 months ago

Hi Bob,

Do you see anything in the console window when you try running mediaplayer manually, as in any error messages?

Does mediaplayer create any log files? If so is there anything in there as to why it could not start?

On Mon, 19 Feb 2024 at 16:13, mightyoakbob @.***> wrote:

Hi Pete, As i cannot install Java 11 any more I use sudo apt install default-jdk

Which installs openjdk version "17.0.9" 2023-10-17 OpenJDK Runtime Environment (build 17.0.9+9-Raspbian-1deb12u1rpt1) OpenJDK Client VM (build 17.0.9+9-Raspbian-1deb12u1rpt1, mixed mode, emulated-client)

If I use sudo /home/pi/mediaplayer/run.sh, the led on the dac board does a quick flash and that's it. Neither webserver or player present themselves at all.

I don't know if it is a Java issue it just seemed likely to me.

Thanks.

Bob.

— Reply to this email directly, view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/105#issuecomment-1952791136, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5RVJYBD6KSQTVIYPNI33LYUN2Z5AVCNFSM6AAAAABDPRAB7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJSG44TCMJTGY . You are receiving this because you commented.Message ID: @.***>

mightyoakbob commented 7 months ago

Hi Pete, Nothing at all in the putty window other than the start command used.

I have enclosed the log file. It doesn't tell me anything but hopefully you'll see something.

Thanks for helping.

Bob.

mediaplayer.log

mightyoakbob commented 7 months ago

Hi Pete, Just found out Java 11 is now end of life. I don't know if you agree but it looks a strong possibility to me that this is the issue. Has MediaPlayer been updated to cope with Java 17 etc.?

If there is anything I can do, please shout.

Bob.

PeteManchester commented 7 months ago

Hi Bob,

Would you be able to delete that log file, edit the app.properties to set the 'log_file_level' to 'debug' and then try to start again..

From the log file provided I would guess this is the cause of the problem, but I need to see more info to be sure:

2024-02-19 16:08:49,471 [main] WARN [org.rpi.os.OSManager] Using full_path /home/pi/mediaplayer/mediaplayer_lib/ohNet/linux/armv6hf 2024-02-19 16:08:49,472 [main] ERROR [org.rpi.os.OSManager] java.lang.NoSuchFieldException: usr_paths

On Mon, 19 Feb 2024 at 19:43, mightyoakbob @.***> wrote:

Hi Pete, Nothing at all in the putty window other than the start command used.

I have enclosed the log file. It doesn't tell me anything but hopefully you'll see something.

Thanks for helping.

Bob.

mediaplayer.log https://github.com/PeteManchester/MediaPlayer/files/14336307/mediaplayer.log

— Reply to this email directly, view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/105#issuecomment-1953072825, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5RVJZPIDBQAFFFOGKVIOLYUOTP5AVCNFSM6AAAAABDPRAB7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJTGA3TEOBSGU . You are receiving this because you commented.Message ID: @.***>

mightyoakbob commented 7 months ago

Hi Pete, Right I've had a go at doing that. The log level in the file stayed at debug over the reboot which was a relief.

However, I can tell by looking at the app.properties file that MediaPlayer has not run if you know what I mean.

Hope this helps.

Bob.

mediaplayer.log

PeteManchester commented 7 months ago

Media Player attempted to start, but it failed because it looks like one of the environment variable 'usr_paths' it uses is not valid on the new version of OS..

I'll need to have a look and see if I can do anything, but at the moment I don't think there is a quick fix..

Also, I've gone over to the dark side and use Sonos now, so I haven't used MediaPlayer for a while..

2024-02-20 10:21:24,265 [main] DEBUG [org.rpi.os.OSManager] Find Class, Full ClassName: /org/rpi/os/OSManager.class 2024-02-20 10:21:24,266 [main] DEBUG [org.rpi.os.OSManager] Find Class, Proper ClassName: OSManager.class 2024-02-20 10:21:24,269 [main] DEBUG [org.rpi.os.OSManager] Find Class, ClassURL: file:/home/pi/mediaplayer/mediaplayer.jar!/org/rpi/os/OSManager.class 2024-02-20 10:21:24,270 [main] DEBUG [org.rpi.os.OSManager] Find Class, This is a JarFile: /home/pi/mediaplayer/mediaplayer.jar!/org/rpi/os/OSManager.class 2024-02-20 10:21:24,271 [main] DEBUG [org.rpi.os.OSManager] Find File: Returning JarPath: /home/pi/mediaplayer/ 2024-02-20 10:21:24,272 [main] DEBUG [org.rpi.os.OSManager] Path ended with '/'. Updated Path to be: /home/pi/mediaplayer 2024-02-20 10:21:24,272 [main] DEBUG [org.rpi.os.OSManager] Path of this File is: /home/pi/mediaplayer 2024-02-20 10:21:24,273 [main] DEBUG [org.rpi.os.OSManager] OS Name: LINUX 2024-02-20 10:21:24,273 [main] DEBUG [org.rpi.os.OSManager] Its an ARM device, now check, which revision 2024-02-20 10:21:24,525 [main] DEBUG [org.rpi.utils.Utils] Result of /usr/bin/readelf -A /proc/self/exe : Attribute Section: aeabi 2024-02-20 10:21:24,525 [main] DEBUG [org.rpi.utils.Utils] Result of /usr/bin/readelf -A /proc/self/exe : File Attributes 2024-02-20 10:21:24,525 [main] DEBUG [org.rpi.utils.Utils] Result of /usr/bin/readelf -A /proc/self/exe : Tag_CPU_name: "6" 2024-02-20 10:21:24,526 [main] DEBUG [org.rpi.utils.Utils] Result of /usr/bin/readelf -A /proc/self/exe : Tag_CPU_arch: v6 2024-02-20 10:21:24,526 [main] DEBUG [org.rpi.utils.Utils] Result of /usr/bin/readelf -A /proc/self/exe : Tag_ARM_ISA_use: Yes 2024-02-20 10:21:24,526 [main] DEBUG [org.rpi.utils.Utils] Result of /usr/bin/readelf -A /proc/self/exe : Tag_THUMB_ISA_use: Thumb-1 2024-02-20 10:21:24,526 [main] DEBUG [org.rpi.utils.Utils] Result of /usr/bin/readelf -A /proc/self/exe : Tag_FP_arch: VFPv2 2024-02-20 10:21:24,527 [main] DEBUG [org.rpi.utils.Utils] Result of /usr/bin/readelf -A /proc/self/exe : Tag_ABI_PCS_wchar_t: 4 2024-02-20 10:21:24,527 [main] DEBUG [org.rpi.utils.Utils] Result of /usr/bin/readelf -A /proc/self/exe : Tag_ABI_FP_rounding: Needed 2024-02-20 10:21:24,527 [main] DEBUG [org.rpi.utils.Utils] Result of /usr/bin/readelf -A /proc/self/exe : Tag_ABI_FP_denormal: Needed 2024-02-20 10:21:24,527 [main] DEBUG [org.rpi.utils.Utils] Result of /usr/bin/readelf -A /proc/self/exe : Tag_ABI_FP_exceptions: Needed 2024-02-20 10:21:24,528 [main] DEBUG [org.rpi.utils.Utils] Result of /usr/bin/readelf -A /proc/self/exe : Tag_ABI_FP_number_model: IEEE 754 2024-02-20 10:21:24,528 [main] DEBUG [org.rpi.utils.Utils] Result of /usr/bin/readelf -A /proc/self/exe : Tag_ABI_align_needed: 8-byte 2024-02-20 10:21:24,528 [main] DEBUG [org.rpi.utils.Utils] Result of /usr/bin/readelf -A /proc/self/exe : Tag_ABI_align_preserved: 8-byte, except leaf SP 2024-02-20 10:21:24,528 [main] DEBUG [org.rpi.utils.Utils] Result of /usr/bin/readelf -A /proc/self/exe : Tag_ABI_enum_size: int 2024-02-20 10:21:24,529 [main] DEBUG [org.rpi.utils.Utils] Result of /usr/bin/readelf -A /proc/self/exe : Tag_ABI_VFP_args: VFP registers 2024-02-20 10:21:24,529 [main] DEBUG [org.rpi.utils.Utils] Result of /usr/bin/readelf -A /proc/self/exe : Tag_CPU_unaligned_access: v6 2024-02-20 10:21:24,531 [main] DEBUG [org.rpi.os.OSManager] We think this is a Raspi 2024-02-20 10:21:24,534 [main] DEBUG [org.rpi.os.OSManager] This is a HardFloat 2024-02-20 10:21:24,535 [main] WARN [org.rpi.os.OSManager] Using full_path /home/pi/mediaplayer/mediaplayer_lib/ohNet/linux/armv6hf 2024-02-20 10:21:24,536 [main] DEBUG [org.rpi.os.OSManager] Adding Path: /home/pi/mediaplayer/mediaplayer_lib/ohNet/linux/armv6hf 2024-02-20 10:21:24,537 [main] ERROR [org.rpi.os.OSManager] java.lang.NoSuchFieldException: usr_paths

On Tue, 20 Feb 2024 at 10:29, mightyoakbob @.***> wrote:

Hi Pete, Right I've had a go at doing that. The log level in the file stayed at debug over the reboot which was a relief.

However, I can tell by looking at the app.properties file that MediaPlayer has not run if you know what I mean.

Hope this helps.

Bob.

mediaplayer.log https://github.com/PeteManchester/MediaPlayer/files/14342994/mediaplayer.log

— Reply to this email directly, view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/105#issuecomment-1953913108, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5RVJ3IN24LOGJPVHCDIRTYUR3J3AVCNFSM6AAAAABDPRAB7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJTHEYTGMJQHA . You are receiving this because you commented.Message ID: @.***>

mightyoakbob commented 7 months ago

Hi Pete, Oh dear, now you are worrying me. I supply several people with these devices, I know that's not your fault but I'm very concerned.

The irony of you going to Sonos isn't lost on me either. I've given up on sonos for a host of reasons.

  1. Can't play hi-res music.
  2. My library is too big for sonos memory to index.
  3. Constant updates that don't give anything useful. But worse, they insist that the iPad used to control sonos has the latest sonos app installed and that in turn means that the operating system has to be the latest. This places you in a position where over night sonos decree an update, your system no longer works and the only way to fix it is to buy another iPad.

I know about Sonos I've been there. I have your pi players plugged into the back of ours and never go near sonos apps or upgrades.

Please try to fix it, can I pay you ?

Bob.

DoomHammer commented 7 months ago

@mightyoakbob what exactly is your use case?

mightyoakbob commented 7 months ago

Hello,

I use these players to play music stored on a NAS through various sound systems. The key advantage of this player is that it uses the same iPad control point apps as my main player which is a Linn.

I'm not sure if I've answered your question properly, if not just let me know what you want to know.

Thanks.

Bob.

PeteManchester commented 7 months ago

Hi Bob, Let me try and have a look. It might take a while though.

I certainly don’t want paying, but thanks for the offer..

On Tue, 20 Feb 2024 at 19:05, mightyoakbob @.***> wrote:

Hello,

I use these players to play music stored on a NAS through various sound systems. The key advantage of this player is that it uses the same iPad control point apps as my main player which is a Linn.

I'm not sure if I've answered your question properly, if not just let me know what you want to know.

Thanks.

Bob.

— Reply to this email directly, view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/105#issuecomment-1954882374, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5RVJ2UCET7OCG5OW6Z763YUTXY3AVCNFSM6AAAAABDPRAB7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJUHA4DEMZXGQ . You are receiving this because you commented.Message ID: @.***>

mightyoakbob commented 7 months ago

Thanks Pete, Much appreciated.

Someone has pointed out to me by a raspberry pi newsgroup that.. 2024-02-19 16:05:39,769 [main] ERROR [org.rpi.mpdplayer.TCPConnector] java.net.ConnectException: Connection refused 2024-02-19 16:05:39,770 [Thread-0] ERROR [org.rpi.mpdplayer.TCPConnector] java.net.ConnectException: Connection refused 2024-02-19 16:05:39,774 [main] ERROR [org.rpi.mpdplayer.TCPConnector] java.net.ConnectException: Connection refused

Then tye said: Is there something wrong with networking on your Pi? Can you ping google.com? It looks like you've configured this URL: [org.rpi.config.Config] 'pins_service_url' : 'http://192.168.1.205:8088/PinServiceManager1/webapi/broadcast'

My reply: Networking is working fine and there is nothing has never been anything on 205.

Thanks again Pete.

Bob.

PeteManchester commented 7 months ago

I saw that message, don’t worry about it, my guess is MPD was either not started or configured correctly at that point…

On Wed, 21 Feb 2024 at 10:43, mightyoakbob @.***> wrote:

Thanks Pete, Much appreciated.

Someone has pointed out to me by a raspberry pi newsgroup that.. 2024-02-19 16:05:39,769 [main] ERROR [org.rpi.mpdplayer.TCPConnector] java.net.ConnectException: Connection refused 2024-02-19 16:05:39,770 [Thread-0] ERROR [org.rpi.mpdplayer.TCPConnector] java.net.ConnectException: Connection refused 2024-02-19 16:05:39,774 [main] ERROR [org.rpi.mpdplayer.TCPConnector] java.net.ConnectException: Connection refused

Then tye said: Is there something wrong with networking on your Pi? Can you ping google.com? It looks like you've configured this URL: [org.rpi.config.Config] 'pins_service_url' : ' http://192.168.1.205:8088/PinServiceManager1/webapi/broadcast'

My reply: Networking is working fine and there is nothing has never been anything on 205.

Thanks again Pete.

Bob.

— Reply to this email directly, view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/105#issuecomment-1956370300, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5RVJZXQRASDMGKXPGLXFLYUXFTRAVCNFSM6AAAAABDPRAB7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJWGM3TAMZQGA . You are receiving this because you commented.Message ID: @.***>

PeteManchester commented 7 months ago

Hi Bob,

I've pushed a beta version to https://github.com/PeteManchester/MediaPlayer/tree/master/com.upnp.mediaplayer/download/beta .

Can you give that a try please.

The problem is that I was setting the path to the ohNet lib dynamically in the code, however Java 17 no longer supports this, and so I have modified the code to catch and handle that error, but we still need to set the path to the ohNet Lib, I have attempted to do this in the run.sh, see the line:

"export PATH=/home/pi/mediaplayer/mediaplayer_lib/ohNet/linux/armv6hf:$PATH "

I've not been able to test, so you might need to play around with setting the PATH variable..

The reason I set the path to the OhNet lib dynamically originally was because there were a couple of versions of Raspi (hard float and soft float) and they used difference ohNet libraries, plus people wanted to use MediaPlayer on Windows, Mac and other strange Operation Systems, now we just seem to have you using it on Raspi, so it should be easier..

I develop on Windows and I did this to set my path variable:

[image: image.png]

Thanks,

Pete.

On Wed, 21 Feb 2024 at 10:43, mightyoakbob @.***> wrote:

Thanks Pete, Much appreciated.

Someone has pointed out to me by a raspberry pi newsgroup that.. 2024-02-19 16:05:39,769 [main] ERROR [org.rpi.mpdplayer.TCPConnector] java.net.ConnectException: Connection refused 2024-02-19 16:05:39,770 [Thread-0] ERROR [org.rpi.mpdplayer.TCPConnector] java.net.ConnectException: Connection refused 2024-02-19 16:05:39,774 [main] ERROR [org.rpi.mpdplayer.TCPConnector] java.net.ConnectException: Connection refused

Then tye said: Is there something wrong with networking on your Pi? Can you ping google.com? It looks like you've configured this URL: [org.rpi.config.Config] 'pins_service_url' : ' http://192.168.1.205:8088/PinServiceManager1/webapi/broadcast'

My reply: Networking is working fine and there is nothing has never been anything on 205.

Thanks again Pete.

Bob.

— Reply to this email directly, view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/105#issuecomment-1956370300, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5RVJZXQRASDMGKXPGLXFLYUXFTRAVCNFSM6AAAAABDPRAB7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJWGM3TAMZQGA . You are receiving this because you commented.Message ID: @.***>

mightyoakbob commented 7 months ago

Hi Pete, Thanks so much for trying to find this issue. I have built a new system from scratch this evening and tried it. No, it doesn't work. In other computing fields I would be able to play around as you suggest but Java makes zero sense to me at all unfortunately.

usr_paths ???? FieldException ????? I've tried looking at the log file for a clue what does {FATAL} mean? does that mean it's failed? It seems to fail 2 or 3 lines before it attempts to add that path. See attached log file.

Could you make suggestions what I might try changing? Thanks again.

Bob.

MediaPlayer.log

mightyoakbob commented 7 months ago

Hi Pete,

I did decide to check out the $PATH variable. I read that some suggested it should be set in the file /home/pi/.profile and sure enough there were indeed possible additions to the PATH variable in there.

I noticed that in the .profile file the addition were done without the "export" command. No amount of googling shed any light on why or what "export" did that made any sense to me. For that reason the following is probably nonsense.

I worked out that the pattern in .profile was to test for the existence of a directory and if it exists, then add into the path.

I tried it for our path, rebooted and had a look at the log file. No change, still the same error.

I took the radical step, I commented out the line in run.sh. I re-booted.

Still the same error.

Okay, so I removed my code from .profile.

Re-booted. Still the same !!!! Still got the error even though I'd removed both places where the path was being added in.

I didn't expect thst, considered correctly that I didn't know what I was doing.

I typed into the putty window echo $PATH

It showed paths to a few directories in one line.

I typed: PATH=/home/pi/mediaplayer/mediaplayer_lib/ohNet/linux/armv6hf:$PATH

and then echo$PATH

It worked, the path was added at the start of the path string.

I changed the line in run.sh to just.. PATH=/home/pi/mediaplayer/mediaplayer_lib/ohNet/linux/armv6hf:$PATH

Rebooted. Still same error and path NOT added and yet it does get added if that line is typed in the command window.

My conclusions which are in all probability are nonsense...

Somewhere some other code is attempting to add our directory into PATH as it's clearly not the code in run.sh or .profile. I even removed the code completely from run.sh and it still gave the same error.

I don't think the line in question in run.sh has yet been executed at all because the path does not get extended, I think the process bombs out before it gets that far.

I have no understanding at all of what "export" does.

I can't think of anything else to test.

Thanks Pete,

Cheers,

Bob.

PeteManchester commented 7 months ago

Thanks Bob,

Can you set the log level to debug in the app.properties file and then:

Can you try adding these two lines to your run.sh, just above the java -jar ... line:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCRIPTPATH/mediaplayer_lib/ohNet/linux/armv6hf echo $LD_LIBRARY_PATH

and then try running ./run.sh

I tested on my older version of rapsi and that worked, however it seems that 'export' did not work for you, so if you try it without the word 'export' also.

So run.sh should look like this:

!/bin/sh

Absolute path to this script, e.g. /home/pi/mediaplayer/run.sh

SCRIPT=$(readlink -f "$0")

Absolute path this script is in, thus /home/pi/mediaplayer

SCRIPTPATH=$(dirname "$SCRIPT")

TURNOFF_WLAN=true

DIRNAME="$( dirname "$0" )" cd "${DIRNAME}"

export LD_LIBRARY_PATH=/usr/local/lib/

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCRIPTPATH/mediaplayer_lib/ohNet/linux/armv6hfecho Java LibPath: $LD_LIBRARY_PATH java -jar $SCRIPTPATH/mediaplayer.jar & _wlanexist=$(ifconfig | grep wlan) || true if [ "$_wlanexist" ] && [ "$TURNOFF_WLAN" ]; then iwconfig wlan0 power off fi exit 0

On Sun, 25 Feb 2024 at 16:35, mightyoakbob @.***> wrote:

Hi Pete,

I did decide to check out the $PATH variable. I read that some suggested it should be set in the file /home/pi/.profile and sure enough there were indeed possible additions to the PATH variable in there.

I noticed that in the .profile file the addition were done without the "export" command. No amount of googling shed any light on why or what "export" did that made any sense to me. For that reason the following is probably nonsense.

I worked out that the pattern in .profile was to test for the existence of a directory and if it exists, then add into the path.

I tried it for our path, rebooted and had a look at the log file. No change, still the same error.

I took the radical step, I commented out the line in run.sh. I re-booted.

Still the same error.

Okay, so I removed my code from .profile.

Re-booted. Still the same !!!! Still got the error even though I'd removed both places where the path was being added in.

I didn't expect thst, considered correctly that I didn't know what I was doing.

I typed into the putty window echo $PATH

It showed paths to a few directories in one line.

I typed: PATH=/home/pi/mediaplayer/mediaplayer_lib/ohNet/linux/armv6hf:$PATH

and then echo$PATH

It worked, the path was added at the start of the path string.

I changed the line in run.sh to just.. PATH=/home/pi/mediaplayer/mediaplayer_lib/ohNet/linux/armv6hf:$PATH

Rebooted. Still same error and path NOT added and yet it does get added if that line is typed in the command window.

My conclusions which are in all probability are nonsense...

Somewhere some other code is attempting to add our directory into PATH as it's clearly not the code in run.sh or .profile. I even removed the code completely from run.sh and it still gave the same error.

I don't think the line in question in run.sh has yet been executed at all because the path does not get extended, I think the process bombs out before it gets that far.

I have no understanding at all of what "export" does.

I can't think of anything else to test.

Thanks Pete,

Cheers,

Bob.

— Reply to this email directly, view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/105#issuecomment-1962993553, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5RVJ2RRT5GVTLHLNTUTLTYVNR6VAVCNFSM6AAAAABDPRAB7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSHE4TGNJVGM . You are receiving this because you commented.Message ID: @.***>

mightyoakbob commented 7 months ago

Hi Pete, I think I have some good news.. The player is playing music again and appears on Linn Kazoo. The webserver is not running, I've no idea why. The player does not restart after a reboot, I had to ./run.sh manually. The variable $PATH is NOT extended. echo $LD_LIBRARY_PATH gives just a blank line.

I have attached the exact run.sh file, the putty window, and the logfile.

You'll see the start up is still moaning about setting up log4j system properly. I think that is to do with the webserver.

I hope this is helping you figure this out.

Thanks for all your work.

Bob.

PuttyWindow.txt LogFile.txt run.sh.txt

PeteManchester commented 7 months ago

Hi Bob,

You are getting permission denied errors, so you would probably need to do 'sudo ./run.sh', or run it with a user that has the permissions.. Anyway, that's not a problem, because you wouldn't normally be running it that way.

What you need to do now is modify the script for the service you use, I can't remember which method you used to start mediaplayer as a service, but whichever you used you will need to modify the script you used to create the service, to set the LD_LIBRARY_PATH using something like below:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCRIPTPATH/mediaplayer_lib/ohNet/linux/armv6hf

And then re install/update the service.

On Mon, 26 Feb 2024 at 17:02, mightyoakbob @.***> wrote:

Hi Pete, I think I have some good news.. The player is playing music again and appears on Linn Kazoo. The webserver is not running, I've no idea why. The player does not restart after a reboot, I had to ./run.sh manually. The variable $PATH is NOT extended. echo $LD_LIBRARY_PATH gives just a blank line.

I have attached the exact run.sh file, the putty window, and the logfile.

You'll see the start up is still moaning about setting up log4j system properly. I think that is to do with the webserver.

I hope this is helping you figure this out.

Thanks for all your work.

Bob.

PuttyWindow.txt https://github.com/PeteManchester/MediaPlayer/files/14407828/PuttyWindow.txt LogFile.txt https://github.com/PeteManchester/MediaPlayer/files/14407847/LogFile.txt run.sh.txt https://github.com/PeteManchester/MediaPlayer/files/14407849/run.sh.txt

— Reply to this email directly, view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/105#issuecomment-1964656960, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5RVJ6W3BYUQYVLVWTAYTDYVS53LAVCNFSM6AAAAABDPRAB7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRUGY2TMOJWGA . You are receiving this because you commented.Message ID: @.***>

mightyoakbob commented 7 months ago

Hi Pete, Struggling a bit with this to be honest. After some problems last year I spent days simplifying the install of MediaPlayer considerably. My install notes are now just this simple.....

cd /home/pi/mediaplayer sudo /home/pi/mediaplayer/run.sh cd scripts/systemd sudo install -v -m 755 mediaplayer.service /etc/systemd/system sudo install -v -m 755 run_systemd.sh /home/pi/mediaplayer sudo systemctl enable mediaplayer.service sudo systemctl start mediaplayer.service

I just don't understand enough to work out which file to modify. If its Mediaplayer.service that is in 3 sections; Unit, Service and Install, looks important to use the correct section so where? run_systemd.sh is possible I suppose and so I tried it, it broke the system completely had to restore.

I can tell you that if I use sudo as you suggested to run the modified run.sh file then the webserver also runs. So we are getting there but I just don't know enough to get there at the moment.

So is it the mediaplayer.service file? If so, where in that file seems important. Lastly, the code you tell me to add is confusing me. It looks like two lines here with one having 'export' on it and the other begins 'LD_LIBRARY......' Is it one line or two I can't work it out.

Thanks.

Bob.

PeteManchester commented 7 months ago

It is the run_system.sh file that you need to modify..

Like the run.sh, you add the line just before the java -jar line...

Looks like Github is screwing up the formatting of the line you should add, it should all be one line:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCRIPTPATH/mediaplayer_lib/ohNet/ linux/armv6hf

Maybe if you get email notifications for updates to the case have a look at the email..

And a screen shot of the same run_system.sh

[image: image.png]

I've also pushed a beta version to Github with the updated files..

On Mon, 26 Feb 2024 at 19:58, mightyoakbob @.***> wrote:

Hi Pete, Struggling a bit with this to be honest. After some problems last year I spent days simplifying the install of MediaPlayer considerably. My install notes are now just this simple.....

cd /home/pi/mediaplayer sudo /home/pi/mediaplayer/run.sh cd scripts/systemd sudo install -v -m 755 mediaplayer.service /etc/systemd/system sudo install -v -m 755 run_systemd.sh /home/pi/mediaplayer sudo systemctl enable mediaplayer.service sudo systemctl start mediaplayer.service

I just don't understand enough to work out which file to modify. If its Mediaplayer.service that is in 3 sections; Unit, Service and Install, looks important to use the correct section so where? run_systemd.sh is possible I suppose and so I tried it, it broke the system completely had to restore.

I can tell you that if I use sudo as you suggested to run the modified run.sh file then the webserver also runs. So we are getting there but I just don't know enough to get there at the moment.

So is it the mediaplayer.service file? If so, where in that file seems important. Lastly, the code you tell me to add is confusing me. It looks like two lines here with one having 'export' on it and the other begins 'LD_LIBRARY......' Is it one line or two I can't work it out.

Thanks.

Bob.

— Reply to this email directly, view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/105#issuecomment-1965147081, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5RVJ2C5C3W5MBCAYV3AL3YVTSQHAVCNFSM6AAAAABDPRAB7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRVGE2DOMBYGE . You are receiving this because you commented.Message ID: @.***>

mightyoakbob commented 7 months ago

Hi Pete, It works !! Thank you.

I would have got there last night but for one mistake. I realised that to modify either of the two systemd scripts, it was best done in the original scripts folder and then use: sudo install -v -m 755 mediaplayer.service /etc/systemd/system sudo install -v -m 755 run_systemd.sh /home/pi/mediaplayer Which installs and sets permissions. So that's what I did.

What I didn't know was that although the command didn't error and told me it had deleted the original file and replace it, there was more needed - authentication. I simply rebooted the pi and it broke it completely.

What I did today was sudo systemctl start mediaplayer.service. That told me to run systemctl daemon-reload. I was that close last night !!!

Thanks again Pete, I really am most grateful.

Wish I understood more so I didn't need to bother you.

Cheers,

Bob.