isAuthorized() Exception: Can not close file with id 0 because it is still in use - config

I upgraded Orientdb from 2.0.16 to 2.2.4.
In 2.0.16 all is fine(databases run and login in browser is working). But now not in 2.2.4. There I get this one in the log:
2016-07-10 20:59:41:942 WARNI {db=OSystem} MBean with name
com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations:id=1899654914,name="OSystem",type=OAtomicOperationsMangerMXBean
has already registered. Probably your system was not shutdown
correctly or you have several running applications which use OrientDB
engine inside [OAtomicOperationsManager] 2016-07-10 20:59:41:944 SEVER
isAuthorized() Exception: Can not close file with id 0 because it is
still in use
DB name="OSystem" [OSystemUserAuthenticator]
So I tried to run it locally on my Windows machine. I just downloaded the whole folder and then startet server.bat. And it works without any error.
So why on an Ubuntu it throws that error? And why it works with the same folder on a Windows machine? I did not change anything except the memory settings, that need to be lower on the Ubuntu machine.
When I try to start server.sh today...
I get this one:
sh /home/ubuntu/orientdb/bin/server.sh
.
.` `
, `:.
`,` ,:`
.,. :,,
.,, ,,,
. .,.::::: ```` ::::::::: :::::::::
,` .::,,,,::.,,,,,,`;; .: :::::::::: ::: :::
`,. ::,,,,,,,:.,,.` ` .: ::: ::: ::: :::
,,:,:,,,,,,,,::. ` ` `` .: ::: ::: ::: :::
,,:.,,,,,,,,,: `::, ,, ::,::` : :,::` :::: ::: ::: ::: :::
,:,,,,,,,,,,::,: ,, :. : :: : .: ::: ::: :::::::
:,,,,,,,,,,:,:: ,, : : : : .: ::: ::: :::::::::
` :,,,,,,,,,,:,::, ,, .:::::::: : : .: ::: ::: ::: :::
`,...,,:,,,,,,,,,: .:,. ,, ,, : : .: ::: ::: ::: :::
.,,,,::,,,,,,,: `: , ,, : ` : : .: ::: ::: ::: :::
...,::,,,,::.. `: .,, :, : : : .: ::::::::::: ::: :::
,::::,,,. `: ,, ::::: : : .: ::::::::: ::::::::::
,,:` `,,.
,,, .,`
,,. `, GRAPH DATABASE
`` `.
`` orientdb.com
`
removing old pid file /home/ubuntu/orientdb/bin/orient.pid
2016-07-13 21:06:28:451 INFO Loading configuration from: /home/ubuntu/orientdb/config/orientdb-server-config.xml... [OServerConfigurationLoaderXml]
2016-07-13 21:06:29:355 INFO OrientDB Server v2.2.4 (build 2.2.x#rf5282664db9300ef3358fb4d7e2066ad418c2e61; 2016-07-08 12:30:59+0000) is starting up... [OServer]
2016-07-13 21:06:29:372 INFO Databases directory: /home/ubuntu/orientdb/databases [OServer]Error during initialization of engine 'plocal', engine will be removed
java.lang.reflect.InaccessibleObjectException: Unable to make member of class com.sun.management.internal.OperatingSystemImpl accessible: module jdk.management does not export com.sun.management.internal to unnamed module #41e68d87
at sun.reflect.Reflection.throwInaccessibleObjectException(java.base#9-internal/Reflection.java:420)
at java.lang.reflect.AccessibleObject.checkCanSetAccessible(java.base#9-internal/AccessibleObject.java:174)
at java.lang.reflect.Method.checkCanSetAccessible(java.base#9-internal/Method.java:189)
at java.lang.reflect.Method.setAccessible(java.base#9-internal/Method.java:183)
at com.orientechnologies.common.util.OMemory.getPhysicalMemorySize(OMemory.java:65)
at com.orientechnologies.orient.core.engine.OMemoryAndLocalPaginatedEnginesInitializer.configureDefaultDiskCacheSize(OMemoryAndLocalPaginatedEnginesInitializer.java:80)
at com.orientechnologies.orient.core.engine.OMemoryAndLocalPaginatedEnginesInitializer.configureDefaults(OMemoryAndLocalPaginatedEnginesInitializer.java:63)
at com.orientechnologies.orient.core.engine.OMemoryAndLocalPaginatedEnginesInitializer.initialize(OMemoryAndLocalPaginatedEnginesInitializer.java:52)
at com.orientechnologies.orient.core.engine.local.OEngineLocalPaginated.startup(OEngineLocalPaginated.java:56)
at com.orientechnologies.orient.core.Orient.startEngine(Orient.java:872)
at com.orientechnologies.orient.core.Orient.loadStorage(Orient.java:480)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:167)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:148)
at com.orientechnologies.orient.server.OSystemDatabase.init(OSystemDatabase.java:151)
at com.orientechnologies.orient.server.OSystemDatabase.<init>(OSystemDatabase.java:44)
at com.orientechnologies.orient.server.OServer.initSystemDatabase(OServer.java:1227)
at com.orientechnologies.orient.server.OServer.activate(OServer.java:342)
at com.orientechnologies.orient.server.OServerMain.main(OServerMain.java:41)
Error during engine shutdown
java.lang.NullPointerException
at com.orientechnologies.orient.core.engine.local.OEngineLocalPaginated.shutdown(OEngineLocalPaginated.java:112)
at com.orientechnologies.orient.core.Orient.startEngine(Orient.java:878)
at com.orientechnologies.orient.core.Orient.loadStorage(Orient.java:480)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:167)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:148)
at com.orientechnologies.orient.server.OSystemDatabase.init(OSystemDatabase.java:151)
at com.orientechnologies.orient.server.OSystemDatabase.<init>(OSystemDatabase.java:44)
at com.orientechnologies.orient.server.OServer.initSystemDatabase(OServer.java:1227)
at com.orientechnologies.orient.server.OServer.activate(OServer.java:342)
at com.orientechnologies.orient.server.OServerMain.main(OServerMain.java:41)
Exception in thread "main" com.orientechnologies.orient.core.exception.ODatabaseException: Error on opening database 'plocal:/home/ubuntu/orientdb/databases/OSystem'
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:187)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:148)
at com.orientechnologies.orient.server.OSystemDatabase.init(OSystemDatabase.java:151)
at com.orientechnologies.orient.server.OSystemDatabase.<init>(OSystemDatabase.java:44)
at com.orientechnologies.orient.server.OServer.initSystemDatabase(OServer.java:1227)
at com.orientechnologies.orient.server.OServer.activate(OServer.java:342)
at com.orientechnologies.orient.server.OServerMain.main(OServerMain.java:41)
Caused by: com.orientechnologies.orient.core.exception.OConfigurationException: Error on opening database: the engine 'plocal' was unable to start. URL was: plocal:/home/ubuntu/orientdb/databases/OSystem. Registered engines was: [memory, remote, plocal]
DB name="plocal:/home/ubuntu/orientdb/databases/OSystem"
at com.orientechnologies.orient.core.Orient.loadStorage(Orient.java:481)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:167)
... 6 more
So there should not be another Java process... and this never happenend to me in the old version. And what is the OSystem good for? I don't know why it is created. Maybe this is the reason for my issue?
I'm now not even able to start the server. I always get the same message. When I run shutdown.sh I get pid file detected, killing process. I'm out of ideas except downgrading =/
...and sometimes I get...
sh /home/ubuntu/orientdb/bin/server.sh
.
.` `
, `:.
`,` ,:`
.,. :,,
.,, ,,,
. .,.::::: ```` ::::::::: :::::::::
,` .::,,,,::.,,,,,,`;; .: :::::::::: ::: :::
`,. ::,,,,,,,:.,,.` ` .: ::: ::: ::: :::
,,:,:,,,,,,,,::. ` ` `` .: ::: ::: ::: :::
,,:.,,,,,,,,,: `::, ,, ::,::` : :,::` :::: ::: ::: ::: :::
,:,,,,,,,,,,::,: ,, :. : :: : .: ::: ::: :::::::
:,,,,,,,,,,:,:: ,, : : : : .: ::: ::: :::::::::
` :,,,,,,,,,,:,::, ,, .:::::::: : : .: ::: ::: ::: :::
`,...,,:,,,,,,,,,: .:,. ,, ,, : : .: ::: ::: ::: :::
.,,,,::,,,,,,,: `: , ,, : ` : : .: ::: ::: ::: :::
...,::,,,,::.. `: .,, :, : : : .: ::::::::::: ::: :::
,::::,,,. `: ,, ::::: : : .: ::::::::: ::::::::::
,,:` `,,.
,,, .,`
,,. `, GRAPH DATABASE
`` `.
`` orientdb.com
`
2016-07-13 21:14:57:687 INFO Loading configuration from: /home/ubuntu/orientdb/config/orientdb-server-config.xml... [OServerConfigurationLoaderXml]
2016-07-13 21:14:58:821 INFO OrientDB Server v2.2.4 (build 2.2.x#rf5282664db9300ef3358fb4d7e2066ad418c2e61; 2016-07-08 12:30:59+0000) is starting up... [OServer]
2016-07-13 21:14:58:858 INFO Databases directory: /home/ubuntu/orientdb/databases [OServer]Error during initialization of engine 'plocal', engine will be removed
java.lang.reflect.InaccessibleObjectException: Unable to make member of class com.sun.management.internal.OperatingSystemImpl accessible: module jdk.management does not export com.sun.management.internal to unnamed module #41e68d87
at sun.reflect.Reflection.throwInaccessibleObjectException(java.base#9-internal/Reflection.java:420)
at java.lang.reflect.AccessibleObject.checkCanSetAccessible(java.base#9-internal/AccessibleObject.java:174)
at java.lang.reflect.Method.checkCanSetAccessible(java.base#9-internal/Method.java:189)
at java.lang.reflect.Method.setAccessible(java.base#9-internal/Method.java:183)
at com.orientechnologies.common.util.OMemory.getPhysicalMemorySize(OMemory.java:65)
at com.orientechnologies.orient.core.engine.OMemoryAndLocalPaginatedEnginesInitializer.configureDefaultDiskCacheSize(OMemoryAndLocalPaginatedEnginesInitializer.java:80)
at com.orientechnologies.orient.core.engine.OMemoryAndLocalPaginatedEnginesInitializer.configureDefaults(OMemoryAndLocalPaginatedEnginesInitializer.java:63)
at com.orientechnologies.orient.core.engine.OMemoryAndLocalPaginatedEnginesInitializer.initialize(OMemoryAndLocalPaginatedEnginesInitializer.java:52)
at com.orientechnologies.orient.core.engine.local.OEngineLocalPaginated.startup(OEngineLocalPaginated.java:56)
at com.orientechnologies.orient.core.Orient.startEngine(Orient.java:872)
at com.orientechnologies.orient.core.Orient.loadStorage(Orient.java:480)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:167)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:148)
at com.orientechnologies.orient.server.OSystemDatabase.init(OSystemDatabase.java:151)
at com.orientechnologies.orient.server.OSystemDatabase.<init>(OSystemDatabase.java:44)
at com.orientechnologies.orient.server.OServer.initSystemDatabase(OServer.java:1227)
at com.orientechnologies.orient.server.OServer.activate(OServer.java:342)
at com.orientechnologies.orient.server.OServerMain.main(OServerMain.java:41)
Error during engine shutdown
java.lang.NullPointerException
at com.orientechnologies.orient.core.engine.local.OEngineLocalPaginated.shutdown(OEngineLocalPaginated.java:112)
at com.orientechnologies.orient.core.Orient.startEngine(Orient.java:878)
at com.orientechnologies.orient.core.Orient.loadStorage(Orient.java:480)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:167)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:148)
at com.orientechnologies.orient.server.OSystemDatabase.init(OSystemDatabase.java:151)
at com.orientechnologies.orient.server.OSystemDatabase.<init>(OSystemDatabase.java:44)
at com.orientechnologies.orient.server.OServer.initSystemDatabase(OServer.java:1227)
at com.orientechnologies.orient.server.OServer.activate(OServer.java:342)
at com.orientechnologies.orient.server.OServerMain.main(OServerMain.java:41)
Exception in thread "main" com.orientechnologies.orient.core.exception.ODatabaseException: Error on opening database 'plocal:/home/ubuntu/orientdb/databases/OSystem'
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:187)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:148)
at com.orientechnologies.orient.server.OSystemDatabase.init(OSystemDatabase.java:151)
at com.orientechnologies.orient.server.OSystemDatabase.<init>(OSystemDatabase.java:44)
at com.orientechnologies.orient.server.OServer.initSystemDatabase(OServer.java:1227)
at com.orientechnologies.orient.server.OServer.activate(OServer.java:342)
at com.orientechnologies.orient.server.OServerMain.main(OServerMain.java:41)
Caused by: com.orientechnologies.orient.core.exception.OConfigurationException: Error on opening database: the engine 'plocal' was unable to start. URL was: plocal:/home/ubuntu/orientdb/databases/OSystem. Registered engines was: [memory, remote, plocal]
DB name="plocal:/home/ubuntu/orientdb/databases/OSystem"
at com.orientechnologies.orient.core.Orient.loadStorage(Orient.java:481)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.<init>(ODatabaseDocumentTx.java:167)
... 6 more
Now I tried to downgrade JDK9 to JDK8
It downgraded to JDK 8...
root:~# sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-9-openjdk-amd64/bin/java 1091 auto mode
1 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode
2 /usr/lib/jvm/java-9-openjdk-amd64/bin/java 1091 manual mode
Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in manual mode
root:~# java -version
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~16.04.1-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
root:~# javac -version
javac 9-internal
but still the same errors...
2016-07-15 14:53:48:347 WARNI {db=OSystem} MBean with name com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations:id=954836302,name="OSystem",type=OAtomicOperationsMangerMXBean has already registered. Probably your system was not shutdown correctly or you have several running applications which use OrientDB engine inside [OAtomicOperationsManager]
2016-07-15 14:53:48:359 SEVER isAuthorized() Exception: Can not close file with id 0 because it is still in use
DB name="OSystem" [OSystemUserAuthenticator]
Maybe my JAVA_HOME is wrong?
# echo $JAVA_HOME
/usr/lib/jvm/java-8-openjdk-amd64
# sudo update-alternatives --config java
update-alternatives: warning: alternative /usr/lib/jvm/java-9-openjdk-amd64/bin/java (part of link group java) doesn't exist; removing from list of alternatives
There is 1 choice for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 auto mode
* 1 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode
Press <enter> to keep the current choice[*], or type selection number:

Came here with the same problem, was able to fix it by uninstalling java9 and installing java8 instead. Here are the steps I followed.
sudo apt-get remove openjdk-9-jdk
sudo apt-get autoremove
sudo apt-get install openjdk-8-jdk
Hope this helps.

I got help from here. So the solution is pretty simple. Just set some settings in the server.sh:
if [ -z "$ORIENTDB_OPTS_MEMORY" ] ; then
ORIENTDB_OPTS_MEMORY="-Xms64m -Xmx128m"
fi
if [ -z "$JAVA_OPTS_SCRIPT" ] ; then
JAVA_OPTS_SCRIPT="-Djna.nosys=true -XX:+HeapDumpOnOutOfMemoryError -XX:MaxDirectMemorySize=200g -Djava.awt.headless=true -Dfile.encoding=UTF8 -Drhino.opt.level=9"
fi
# ORIENTDB SETTINGS LIKE DISKCACHE, ETC
if [ -z "$ORIENTDB_SETTINGS" ]; then
ORIENTDB_SETTINGS="-Dstorage.diskCache.bufferSize=128 -Dmemory.chunk.size=33554432"
fi

Related

Can't run nvm of Fish shell on Mac [duplicate]

This question already has an answer here:
How to manage my node version using Fish Shell
(1 answer)
Closed 13 days ago.
I have installed Fish shell via Brew.
According to the instructions given on the terminal while installing Fish, I added:
export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
to
~/.config/fish/config.fish
and to
~/.zprofile
On normal terminal I can run nvm however on fish it says fish: Unknown command: nvm
If I do source ~/.config/fish/config.fish I get:
/opt/homebrew/Cellar/nvm/0.39.3/libexec/nvm.sh (line 386): Unexpected ')' found, expecting '}'
*[!/]*/)
^
from sourcing file /opt/homebrew/Cellar/nvm/0.39.3/libexec/nvm.sh
called on line 3 of file /opt/homebrew/opt/nvm/nvm.sh
from sourcing file /opt/homebrew/opt/nvm/nvm.sh
called on line 6 of file ~/.config/fish/config.fish
from sourcing file ~/.config/fish/config.fish
.: Error while reading file '/opt/homebrew/Cellar/nvm/0.39.3/libexec/nvm.sh'
/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm (line 5): Missing end to balance this if statement
if ! command -v nvm &> /dev/null; then
^^
from sourcing file /opt/homebrew/opt/nvm/etc/bash_completion.d/nvm
called on line 7 of file ~/.config/fish/config.fish
from sourcing file ~/.config/fish/config.fish
.: Error while reading file '/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm'
What can I do to run nvm on Fish?
What the error message tells you is that nvm is not a fish script.
nvm is written as a posix-compatible shell script and fish is intentionally not posix-compatible.
This bit here:
\. "/opt/homebrew/opt/nvm/nvm.sh"
Tells the shell to "source" nvm.sh, meaning to run it in the current shell. That won't work because fish isn't a posix shell.
You'll have to use either another version manager like nvm.fish or use a posix-to-fish shim like bass and do something like its nvm instructions:
bass source ~/.nvm/nvm.sh --no-use ';' nvm use iojs

Arch Linux arm Xorg doesn't display anything on Raspberry Pi 3 when running startx

On my raspberry pi 3 i have Arch Linux Arm Installed. I installed xorg, i3, and all of the drivers for it. i have my xinitrc file set up like default to run i3:
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
exec i3
when I run sudo startx i get this output
X.Org X Server 1.21.1.4
X Protocol Version 11, Revision 0
Current Operating System: Linux archpi 5.15.68-2-rpi-ARCH #1 SMP Mon Sep 19 17:23:23 MDT 2022 armv7l
Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1920x1080M#60 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 root=/dev/mmcblk0p2 rw rootwait console=ttyS0,115200 console=tty1 fsck.repair=yes
Current version of pixman: 0.40.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu Sep 22 04:48:27 2022
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Failed to connect to bus: No medium found
dbus-update-activation-environment: error: unable to connect to D-Bus: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
[libi3] ../i3bar/src/main.c i3bar version 4.20.1 (2021-11-03)
[libi3] ../libi3/font.c Using Pango font monospace, size 8
[libi3] ../libi3/font.c Using Pango font monospace, size 8
i3status: trying to auto-detect output_format setting
i3status: auto-detected "i3bar"
[libi3] ../libi3/font.c Using Pango font monospace, size 8
the error is in Failed to connect to bus: No medium found dbus-update-activation-environment: error: unable to connect to D-Bus: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
I have looked for hours and can not find a way to fix this. After running sudo startx My screen just goes dark and I have to reboot. I appreciate any help give, thanks.

Unattended signing of Reprepro packages with gpg-agent

For my SolydXK repository I'd like to add some packages available in Debian stretch-backports.
I've successfully setup the conf/distributions, conf/updates and FilterList files and the following command runs successfully when logged in to the server:
reprepro -b /path_to_repository_basedir update
When adding files to the repository I correctly have to fill in my gpg passphrase to sign the files. During the session I only have to do that once.
Now I've tried to make the signing unattended by creating this script that's called from my .bash_profile:
#!/bin/sh
OURKEY=ABCDEFGH
PASSPHRASE=my_passphrase
PIDOF=`pidof gpg-agent`
RETVAL=$?
# Decide wether to start gpg-agent daemon.
if [ "$RETVAL" -eq 1 ]; then
echo "Starting gpg-agent daemon."
eval `gpg-agent --allow-preset-passphrase --allow-mark-trusted --default-cache-ttl-ssh 4294967295 --default-cache-ttl 4294967295 --max-cache-ttl 4294967295 --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info"`
else
echo "Daemon gpg-agent already running."
fi
if [ -f "${HOME}/.gpg-agent-info" ]; then
. "${HOME}/.gpg-agent-info"
export GPG_AGENT_INFO
export SSH_AUTH_SOCK
export SSH_AGENT_PID
# Create necessary symbolic link
cp -fs `echo $GPG_AGENT_INFO | cut -d':' -f 1` "${HOME}/.gnupg/"
fi
# Default trust our own key
rm ~/.gnupg/trustlist.txt
for FP in $(gpg2 --fingerprint --with-colons --fingerprint $OURKEY | grep ^fpr | cut -d':' -f 10); do
echo "$FP S" >> ~/.gnupg/trustlist.txt
echo $PASSPHRASE | /usr/lib/gnupg2/gpg-preset-passphrase --preset $FP
done
# Set GPG TTY
export GPG_TTY=$(tty)
I checked the fingerprints (a.k.a. keygrip, but this version of gpgsm does not know the --with-keygrip option) and all seems to be alright. However, when a cron job runs the above update command, an error message states that the passphrase is incorrect.
The server runs on Debian old-squeeze (I know, I have to do something about that, but that's another problem) and that might be a big problem. Here's some version info:
cat /etc/debian_version
6.0.10
uname -r
3.14.52-vs2.3.6.15-1
gpg (GnuPG) 1.4.10
gpg (GnuPG) 2.0.14
gpgsm (GnuPG) 2.0.14
gpg-agent (GnuPG) 2.0.14
So, is there somebody here who has some experience with unattended signing of packages with gpg-agent and can explain to me what I'm doing wrong?

Bash Unexpected End of File Error After Installing RVM

I executed the following commands under BASH to install RVM:
brew install gnupg gnupg2
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
\curl -sSL https://get.rvm.io | bash
Now, when I open my terminal, I receive the following error message:
-bash: eval: line 19: syntax error: unexpected end of file
Here is my .bash_profile:
export PATH=/usr/local/bin:$PATH
eval "$(rbenv init -)i"
alias sbl='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'
#changes prompt to be colorized and rearranges prompt to be "username#hotname:cwd $"
export PS1="\[\033[36m\]\u\[\033[m\]#\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
#enable command line colors, and define colors for the ‘ls’ command
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
#flags -G colorizes output, -h makes sizes human readable, and -F throws a / after a directory
alias ls='ls -GFh'
#Need to add below after 'brew install git bash-completion'
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Can someone point out what is causing the error? I am not familiar with BASH programming. RVM is working.
It looks to me like you have a stray "i" at the end of the second line:
eval "$(rbenv init -)i"
Because of that, eval is trying to run a command sequence that looks something like this:
export PATH="/Users/pc3sq/.rbenv/shims:${PATH}"
# [...]
rbenv() {
# [...]
}i
...and since "}i" is not a valid match for the "{" that starts the function definition, eval runs into the end of the "file" (actually just a string) while it's still looking for a "}" to close the function definition.

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