MoneroOcean/xmrig

if i run this code "curl -s -L https://raw.githubusercontent.com/MoneroOcean/xmrig_setup/master/setup_moneroocean_miner.sh | bash -s <monero address> it give me this error:

Jayanti33719 opened this issue · 4 comments

-- Logs begin at Tue 2022-02-08 00:19:37 GMT. --
Feb 08 06:31:00 ************ systemd[1]: Stopped Monero miner service.
-- Subject: Unit moneroocean_miner.service has finished shutting down
-- Defined-By: systemd
-- Support: https://*********

-- Unit moneroocean_miner.service has finished shutting down.
Feb 08 06:31:00 ************ systemd[1]: Started Monero miner service.
-- Subject: Unit moneroocean_miner.service has finished start-up
-- Defined-By: systemd
-- Support: *********

-- Unit moneroocean_miner.service has finished starting up.

-- The start-up result is done.
Feb 08 06:31:00 ************ systemd[1]: moneroocean_miner.service: Main process exited, code=exited, status=203/EXEC
Feb 08 06:31:00 ************ systemd[1]: moneroocean_miner.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: ***********

-- The unit moneroocean_miner.service has entered the 'failed' state with result 'exit-code'.
Feb 08 06:31:00 ************ systemd[1]: moneroocean_miner.service: Service RestartSec=100ms expired, scheduling restart.
Feb 08 06:31:00 ************ systemd[1]: moneroocean_miner.service: Scheduled restart job, restart counter is at 5.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: ************

-- Automatic restarting of the unit moneroocean_miner.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Feb 08 06:31:00 ************ systemd[1]: Stopped Monero miner service.
-- Subject: Unit moneroocean_miner.service has finished shutting down
-- Defined-By: systemd
-- Support: ************

-- Unit moneroocean_miner.service has finished shutting down.
Feb 08 06:31:00 ************ systemd[1]: moneroocean_miner.service: Start request repeated too quickly.
Feb 08 06:31:00 ************ systemd[1]: moneroocean_miner.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: ************

-- The unit moneroocean_miner.service has entered the 'failed' state with result 'exit-code'.
Feb 08 06:31:00 ************ systemd[1]: Failed to start Monero miner service.
-- Subject: Unit moneroocean_miner.service has failed
-- Defined-By: systemd
-- Support: ************

-- Unit moneroocean_miner.service has failed.

-- The result is failed.

Sent from Mail for Windows

Can you systemctl stop moneroocean_miner the service manually, and systemctl start moneroocean_miner the service manually, followed by a journalctl -u moneroocean_miner -f ? Post that log here.

Have the same problem:

$ journalctl -u moneroocean_miner -f
Apr 22 21:05:06 node1 systemd[1]: Stopped Monero miner service.
Apr 22 21:05:06 node1 systemd[1]: Started Monero miner service.
Apr 22 21:05:06 node1 xmrig[6624]: /home/toaster/moneroocean/xmrig: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Apr 22 21:05:06 node1 systemd[1]: moneroocean_miner.service: Main process exited, code=exited, status=127/n/a
Apr 22 21:05:06 node1 systemd[1]: moneroocean_miner.service: Failed with result 'exit-code'.
Apr 22 21:05:06 node1 systemd[1]: moneroocean_miner.service: Scheduled restart job, restart counter is at 5.
Apr 22 21:05:06 node1 systemd[1]: Stopped Monero miner service.
Apr 22 21:05:06 node1 systemd[1]: moneroocean_miner.service: Start request repeated too quickly.
Apr 22 21:05:06 node1 systemd[1]: moneroocean_miner.service: Failed with result 'exit-code'.
Apr 22 21:05:06 node1 systemd[1]: Failed to start Monero miner service.

Same after sudo apt install libssl3.

Do this first

Can you try the following?
echo $LD_LIBRARY_PATH
Note down the path this gives you.

Next, run cd /usr/local/lib64 && ls | grep libcrypto.so.1.1.
If this returns a result of libcrypto.so.1.1, please

Try the following

which will tell the library loader that the libcrypto file could also be in another folder, besides the one it looks in by default:
ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1

What this does specifically, is change the variable LD_LIBRARY_PATH to the value /usr/local/lib64 and appends all paths that LD_LIBRARY_PATH originally contained after it.
This should result in echo $LD_LIBRARY_PATH returning /usr/lib64:/usr/local/lib64 (or any variant containing at least these two in this way).

Alternatively:

If you'd rather NOT touch the LD LIBRARY PATH variable, you could also try adding links for the two files that will redirect any requests to a different folder. This is possibly more resistant to future tampering with the LD LIBRARY PATH.
ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1
ln -s /usr/local/lib64/libssl.so.1.1 /usr/lib64/libssl.so.1.1

Feb 08 06:31:00 ************ systemd[1]: moneroocean_miner.service: Main process exited, code=exited, status=203/EXEC

Pretty sure I just fixed this kind of issue today for RHEL.
See if you have SE Linux installed by doing which semanage if it is installed it should show up with /usr/sbin/semanage
If SE Linux is installed then you will need to setup the xmrig binary doing as so sudo semanage fcontext -a -t bin_t $HOME/moneroocean/xmrig and sudo restorecon -vF $HOME/moneroocean/xmrig
This assumes that your xmrig binary is installed in your home directory under "moneroocean".
This fix should work for any Linux distribution that uses SE Linux in "enforcing" mode.

I still need to do a PR of my patch for the setup script.