Solr throwing 'org.apache.commons.exec.ExecuteException' on Start - apache

I am setting up Solr for Centos 7. When i try to execute any sample project for ex. using ./bin/solr start -e techproducts, its throwing error of 'Exception : org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)' . How to fix this. Java is installed under '/usr/bin/java'
I tried with changing Java home directory path
./bin/solr start -e techproducts
*** [WARN] *** Your Max Processes Limit is currently 31165.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
Solr home directory /tmp/solr-7.7.2/example/techproducts/solr already exists.
Starting up Solr on port 8983 using command:
"bin/solr" start -p 8983 -s "example/techproducts/solr"
*** [WARN] *** Your Max Processes Limit is currently 31165.
It should be set to 65000 to avoid operational disruption.
If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
WARNING: Starting Solr as the root user is a security risk and not considered best practice. Exiting.
Please consult the Reference Guide. To override this check, start with argument '-force'
ERROR: Failed to start Solr using command: "bin/solr" start -p 8983 -s "example/techproducts/solr" Exception : org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)

Credit for the answer should go to #MatsLindh (see comment above). I'm adding it here for others who may experience the same problem.
The issue is that Solr doesn't want you to run it as a root user - or what it thinks is a root user (I've seen this issue with WSL as well and one isn't running as root).
Using root is a security risk but you can force Solr to start anyways by adding -force to the command, for example:
bin/solr start -e cloud -force

Related

DSpace 7.1 AIP restore StackOverflowError

I try to migrate from DSpace 6.4 to 7.1. New Dspace is installed on other machine (virtual machine on Centos 7 with 8Gb of RAM)
I have created full site AIP backup with user passwords. (total size of packages - 11Gb)
I've tried to do full restore but always got the same error.
So I'm just trying to import only "first level without childs"
JAVA_OPTS="-Xmx2048m -Xss4m -Dfile.encoding=UTF-8" /dspace/bin/dspace packager -r -k -t AIP -e dinkwi.test#gmail.com -o skipIfParentMissing=true -i 123456789/0 /home/dimich/11111/repo.zip
It doesn't matter if I use -k or -f param, output ia always the same
Ingesting package located at /home/dimich/11111/repo.zip
Exception: null
java.lang.StackOverflowError
at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:788)
at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:802)
.... (more then 1k lines)
at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:802)
my dspace.log ended with
2021-12-20 11:05:28,141 INFO unknown unknown org.dspace.eperson.GroupServiceImpl # dinkwi.test#gmail.com::update_group:group_id=9e6a2038-01d9-41ad-96b9-c6fb55b44381
2021-12-20 11:05:30,048 INFO unknown unknown org.dspace.eperson.GroupServiceImpl # dinkwi.test#gmail.com::update_group:group_id=23aaa7e9-ca2d-4af5-af64-600f7126e2be
2021-12-20 11:05:30,800 INFO unknown unknown org.springframework.cache.ehcache.EhCacheManagerFactoryBean # Shutting down EhCache CacheManager 'org.dspace.services'
So I just want to figure out the problem: small stack or some bug in user/group that fails with infinite loop/recursion, or maybe something else...
Main problem - i'm good in php/mysql and have no experience with java/postgre and the way how to debug this ...
Any help would be appreciated.
p.s after failed restore I always run command
/dspace/bin/dspace cleanup -v

Setting {WSL::Bash} as default shell throws an error in cmder

note: backend error output: -v: -c: line 0: unexpected EOF while looking for matching `''
-v: -c: line 1: syntax error: unexpected end of file
ConEmuC: Root process was alive less than 10 sec, ExitCode=0.
Press Enter or Esc to close console...
This is error i am getting.
Also i have set the fish shell as default shell in WSL.
For WSL1 on windows 10 build later than 1909 (yes wsl2 is available to me but for corporate reasons i cant use it)
Try setting your command to wsl.exe -new_console:d:C:\_stuff\code -cur_console:p5 and the task parameters to /dir "c:/_stuff/code" /icon "c:/_distros/ubuntu/ubuntu1804.exe"
You may need to change the file locations to make the command and parameters suitable for your setup. c:/_stuff/code is where i keep all my repositories and c:/_distros/ubuntu is where i have installed ubuntu.

can't start rabbitmq-server after installation

I'm trying to use rabbitmq for a django tutorial but when I want to start the server I get this error:
~$ sudo rabbitmq-server
Configuring logger redirection
14:49:57.041 [error]
14:49:57.044 [error] BOOT FAILED
BOOT FAILED
14:49:57.044 [error] ===========
===========
14:49:57.044 [error] ERROR: could not bind to distribution port 25672, it is in use by another node: rabbit#wss
ERROR: could not bind to distribution port 25672, it is in use by another node: rabbit#wss
14:49:57.045 [error]
14:49:58.046 [error] Supervisor rabbit_prelaunch_sup had child prelaunch started with rabbit_prelaunch:run_prelaunch_first_phase() at undefined exit with reason {dist_port_already_used,25672,"rabbit","wss"} in context start_error
14:49:58.046 [error] CRASH REPORT Process <0.153.0> with 0 neighbours exited with reason: {{shutdown,{failed_to_start_child,prelaunch,{dist_port_already_used,25672,"rabbit","wss"}}},{rabbit_prelaunch_app,start,[normal,[]]}} in application_master:init/4 line 138
{"Kernel pid terminated",application_controller,"{application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,{dist_port_already_used,25672,\"rabbit\",\"wss\"}}},{rabbit_prelaunch_app,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,{dist_port_already_used,25672,"rabbit","wss"}}},{rabbit_prelau
Crash dump is being written to: erl_crash.dump...done
I've searched for port to see that if it's in use or not and I used lsof -i :25672 and I get nothing.
I don't know too much about these things so if you need anything please tell me.
Try:
sudo lsof -i :25672
sudo kill <PID>
sudo rabbitmq-server
Where <PID> is the process ID that is occupying port 25672
I have encountered this issue. I figured out that this issue is coming because the rabbitmq-server is already running on the machine.
I have used the following command
rabbitmqctl.bat status to know the status of the rabbitmq-server. This helped me to know if the server is up or down.
If it is up, this could the reason you are getting the error that you have specified in your post.
You can issue the following command to make the server down
rabbitmqctl.bat stop
Now you can try starting the rabbitmq-server by issuing the following command
rabbitmq-server start
Note that I am using Windows. And I have executed these commands by pointing the command prompt to C:\Program Files\RabbitMQ\rabbitmq_server-3.8.14\sbin as my rabbitmq installation directory is C:\Program Files\RabbitMQ\rabbitmq_server-3.8.14.
I have encountered this before. Here is what caused it and how I fixed it:
This is one of those commands which requires the magic word sudo (i.e it needs a superuser privilege).
If you forget to add sudo to the command, it begins the process but later fails when it hits a superuser-only roadblock. This leaves you with an incomplete process. Now when you decide to add sudo, it attempts the same process again but finds out that someone without the right privilege has made a mess or is still messing around.
Then the solution will be to cancel out whatever the first command has started and try again.
sudo lsof -i :25672
This list out details about the port 25672
You will see the PID (process ID) e.g 1301
Then stop the process on that port with:
sudo kill <PID>
for example, sudo kill 1301
And make sure you are killing the right process if not you may get into trouble.
Now, retry the command with sudo:
sudo rabbitmq-server
ALSO,
In most cases, this error occurs because without deliberately stopping the rabbitmq-server, it always keeps running even after you restart you system.
another way to stop rabitmq server windows+R then type "services.msc" and then find for RabitMq.slelect and stop from left top corner.
Then re run your rabitmq server.
-Hi guys, I am putting up an answer that can help Googlers to run multiple rabbitmq-server on the same machine. Trying to achieve the latter, I ran into a similar error reported in the first place and solved that by defining:
export RABBITMQ_DIST_PORT=anything_other_than_25672
as stated in the documentation:
https://www.rabbitmq.com/networking.html#epmd-inet-dist-port-range
if you are using windows go to task manager and stop rabbitmq from running...
then reload the rabbitmq-server
For Linux others answered but in Windows you should press Ctrl+Alt+delete and select task management and in that end proccess that depends on erlang.
Note that it requires Administrator previlage.
Now enter this command to start rabbitmq-server:
rabbitmq-server start
Every time you restart your computer you should do these steps.For prevent do them again you should stop rabbitmq service from startup services.
went through same problem in windows, it is already running after installation as a service
so just enable the plugins from the rabbitmq commandline by entering the code as
rabbitmq-plugins enable management_plugin
than go to the localhost:15672 and good to go.
This means that your port 25672 is already in use
try: -
sudo lsof -i :25672
sudo kill <PID>
and now start your rabbitmq server using
sudo rabbitmq-server

podman CentOS 8 not starting container as non-root user

I am trying to start busybox container as non root on CentOS 8 server, but its giving the below message.
What is the correct way to start the container as non-root user?
podman run -it --name busy docker.io/library/busybox sh
Trying to pull docker.io/library/busybox...Getting image source signatures
Copying blob bdbbaa22dec6 done
Copying config 6d5fcfe5ff done
Writing manifest to image destination
Storing signatures
ERRO[0003] Error pulling image ref //busybox:latest: Error committing the finished image: error adding layer with blob "sha256:bdbbaa22dec6b7fe23106d2c1b1f43d9598cd8fc33706cc27c1d938ecd5bffc7": Error processing tar file(exit status 1): there might not be enough IDs available in the namespace (requested 65534:65534 for /home): lchown /home: invalid argument
Failed
Error: unable to pull docker.io/library/busybox: unable to pull image: Error committing the finished image: error adding layer with blob "sha256:bdbbaa22dec6b7fe23106d2c1b1f43d9598cd8fc33706cc27c1d938ecd5bffc7": Error processing tar file(exit status 1): there might not be enough IDs available in the namespace (requested 65534:65534 for /home): lchown /home: invalid argument
Yes, the command you run is correct. On my Fedora 31 system it works just fine.
[testuser#fedora31 ~]$ podman run -it --name busy docker.io/library/busybox sh
Trying to pull docker.io/library/busybox...
Getting image source signatures
Copying blob bdbbaa22dec6 done
Copying config 6d5fcfe5ff done
Writing manifest to image destination
Storing signatures
/ # exit
[testuser#fedora31 ~]$ podman --version
podman version 1.8.0
[testuser#fedora31 ~]$
The flag --rm is also often useful.
It seems the error you get is related to the UID mapping.
Here is some information regarding running "rootless" podman:
https://github.com/containers/libpod/blob/master/docs/tutorials/rootless_tutorial.md
What also might be interesting:
"Does not work on NFS or parallel filesystem homedirs"
Quote from
https://github.com/containers/libpod/blob/master/rootless.md

Reindexing Zebra Because there are no results found in opac and intranet search in KOHA Integrated Library System

I have a freshly installed Koha 3.16 in a Debian Server. I already imported the MARC records into the catalog, but when I search it on Opac , there is no results found.
I read this link: My Zebra Indexing won’t work! How do I fix it? (AKA: I search for stuff and nothing comes up! Help!)
I have tried to follow what has been said in this link. But unfortunately Im stuck with the third step.
export PERL5LIB=/usr/share/koha/lib
export KOHA_CONF=/usr/share/koha/koha-conf.xml
/usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -r -v -x
I run this commands, but still, no luck. I tried to rebuild zebra using the command:
sudo koha-rebuild-zebra -f -v mylibrary
The result shows:
Zebra configuration information
================================
Zebra biblio directory = /var/lib/koha/mylibrary/biblios
Zebra authorities directory = /var/lib/koha/mylibrary/authorities
Koha directory = /usr/share/koha/intranet/cgi-bin
Lockfile = /var/lock/koha/mylibrary/rebuild/rebuild..LCK
BIBLIONUMBER in : 999$c
BIBLIOITEMNUMBER in : 999$d
================================
skipping authorities
====================
exporting biblio
====================
Records exported: 7922
====================
REINDEXING zebra
====================
18:04:12-13/11 zebraidx(8862) [warn] zebra_lock_create fail fname=/var/lock/koha/mylibrary/biblios/norm..LCK [No such file or directory]
18:04:12-13/11 zebraidx(8862) [warn] zebra_lock_create fail fname=/var/lock/koha/mylibrary/biblios/shadow..LCK [No such file or directory]
18:04:12-13/11 zebraidx(8862) [fatal] Could not select database biblios errCode=109
18:04:12-13/11 zebraidx(8863) [warn] zebra_lock_create fail fname=/var/lock/koha/mylibrary/biblios/norm..LCK [No such file or directory]
18:04:12-13/11 zebraidx(8863) [warn] zebra_lock_create fail fname=/var/lock/koha/mylibrary/biblios/shadow..LCK [No such file or directory]
18:04:12-13/11 zebraidx(8863) [fatal] Could not select database biblios errCode=109
====================
CLEANING
====================
Zebra configuration information
================================
Zebra biblio directory = /var/lib/koha/mylibrary/biblios
Zebra authorities directory = /var/lib/koha/mylibrary/authorities
Koha directory = /usr/share/koha/intranet/cgi-bin
Lockfile = /var/lock/koha/mylibrary/rebuild/rebuild..LCK
BIBLIONUMBER in : 999$c
BIBLIOITEMNUMBER in : 999$d
================================
====================
exporting authority
====================
Records exported: 0
====================
REINDEXING zebra
====================
skipping biblios
====================
CLEANING
====================
Whats wrong with reindexing Zebra? How will I fix it? I found a problem same with me, but honestly I dont get how to apply a Patch.Here's the link:
zebraidx errCode=109
Please fix it. I really have to get this working.
Happened the same when install koha in Centos. Try:
Koha-rebuild-zebra -f -v -b mylibrary
You can use these lines to restart the search tables.
sudo zebraidx -c /etc/koha/sites/library/zebra-biblios.cfg drop biblios
sudo zebraidx -c /etc/koha/sites/library/zebra-biblios.cfg commit
koha-rebuild-zebra -b -r -v mylibrary
Finally: Try to change the parameter SearchEngine in the preferences section. Zebra to Solr.
Other parameters (source):
-f, --full Does a reindex of the whole collection. Will run even if USE_INDEXER_DAEMON=yes.
-a, --authorities Only run the indexing process for authority records.
-b, --biblios Only run the indexing process for biblio records.
-q, --quiet Sometimes be a bit quieter for scripts/cronjobs.
-v, --verbose Be verbose. Useful for debugging indexing problems.
Hi your all previous step looks great
after all the above steps as followed by user till /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -r -v -x looks fine
after that you give the following command
zebrasrv -f /path/to/the.KOHA_CONF file i.e xml file which should run in background process else if you get logout indexing also go off
I have a similar problem, zebraserv seems to exit randomly. The log is not much help, as it does not capture what caused the crash. The symptom is that searches don't work. I found that restarting koha fixes the issue. However restarting all the time is not ideal. Some investigation on my system ( Debian 8.3 with Koha 16.05.05.000 ) reveal that the zebraserv process dying is a symptom of the issue. I wrote this script to be run as a cron job ( for root ) that runs every 60 seconds. This appears to make it recover. It seems to happen once every few days.
This has been happening in the last few releases of koha-common via Debian apt-get
I called it /root/check_zebra.sh ..... it is
:
# Add this to cron i.e ( remove the leading "#" ) for root
# * * * * * /root/check_zebra.sh >> /root/check_zebra.log
#
ps ax | grep zebrasrv | grep koha-conf.xml > /dev/null
status=$?
if [ $status = "0" ]
then
:
else
# Restart
echo "============================================="
date
echo "zebrasrv has stopped. Restarting Koka..."
echo "/etc/init.d/koha-common restart"
/etc/init.d/koha-common restart
fi