Arangodb "FATAL Database upgrade check failed for" - arangodb

The arangodb is showing the following error after computer reboot
"FATAL Database upgrade check failed for 'mydatabase'" Please inspect the logs from any errors
i had reinstalled the arangodb, and then, running in first time it was ok, but when I reboot the computer it didn´t start anymore
in the log file was this log messages
´´
2014-07-18T14:49:46Z [6405] INFO ArangoDB 2.2.0 -- ICU 52.1, V8 3.16.14, OpenSSL 1.0.1 14 Mar 2012
2014-07-18T14:49:46Z [6405] INFO using default language 'en'
2014-07-18T14:49:46Z [6405] INFO loaded database '_system' from '/var/lib/arangodb/databases/database-70153'
2014-07-18T14:49:46Z [6405] INFO loaded database 'mydatabase' from '/var/lib/arangodb/databases/database-60101129'
2014-07-18T14:49:46Z [6405] INFO running WAL recovery
2014-07-18T14:49:46Z [6405] INFO dropping database 'mydatabase', directory '/var/lib/arangodb/databases/database-60101129'
2014-07-18T14:49:46Z [6405] INFO creating database 'mydatabase', directory '/var/lib/arangodb/databases/database-60101129'
2014-07-18T14:49:47Z [6405] INFO WAL recovery finished successfully
2014-07-18T14:49:47Z [6405] INFO using endpoint 'tcp://0.0.0.0:8529' for non-encrypted requests
2014-07-18T14:49:47Z [6405] INFO using default API compatibility: 20200
2014-07-18T14:49:47Z [6405] INFO JavaScript using startup '/usr/share/arangodb/js', modules '/usr/share/arangodb/js/server/modules;/usr/share/arangodb/js/common/modules;/usr/share/arangodb/js/node', actions '/usr/share/arangodb/js/actions', application '/var/lib/arangodb-apps'
2014-07-18T14:49:47Z [6405] FATAL Database upgrade check failed for 'mydatabase'. Please inspect the logs from any errors
sorry for my bad english

This is a bug in the start script under Unix. As a workaround can you edit the file /etc/init.d/arangodb and replace the lines
$DAEMON -c $CONF --uid arangodb --gid arangodb --check-version
RETVAL=$?
by
RETVAL=0
This should solve the problem.

The /etc/init.d/arangodb now has this section to resolve your problem:
if [ "$RETVAL" -eq 0 ]; then
$DAEMON --uid arangodb --gid arangodb --pid-file "$PIDFILE" --temp.path "/var/tmp/arangod" --log.foreground-tty false --supervisor $#
RETVAL=$?
log_end_msg $RETVAL
else
log_failure_msg "database version check failed, maybe you need to run 'upgrade'?"
fi

Related

run hazelcast based on docker locally

I want to run Hazelcast for POC for future use based on docker in the aws instances.
I use the next configuration to run in on my laptop for some investigation:
docker run -e JAVA_OPTS="-Dhazelcast.local.publicAddress=192.168.1.227:5701" -itd -p 5701:5701 hazelcast/hazelcast
docker run -e JAVA_OPTS="-Dhazelcast.local.publicAddress=192.168.1.227:5702" -itd -p 5702:5701 hazelcast/hazelcast
It starts ok, but once try to open it in the browser I got next warnings:
docker logs -ft a91ed298117a
2020-02-02T16:30:41.846203500Z ########################################
2020-02-02T16:30:41.846284000Z # JAVA_OPTS=-Dhazelcast.mancenter.enabled=false -Djava.net.preferIPv4Stack=true -Djava.util.logging.config.file=/opt/hazelcast/logging.properties -XX:MaxRAMPercentage=80.0 -Dhazelcast.local.publicAddress=192.168.1.227:5702
2020-02-02T16:30:41.846346700Z # CLASSPATH=/opt/hazelcast/*:/opt/hazelcast/lib/*
2020-02-02T16:30:41.846374200Z # starting now....
2020-02-02T16:30:41.846424700Z ########################################
2020-02-02T16:30:41.846467100Z + exec java -server -Dhazelcast.mancenter.enabled=false -Djava.net.preferIPv4Stack=true -Djava.util.logging.config.file=/opt/hazelcast/logging.properties -XX:MaxRAMPercentage=80.0 -Dhazelcast.local.publicAddress=192.168.1.227:5702 com.hazelcast.core.server.StartServer
Members {size:2, ver:2} [
2020-02-02T16:30:52.360102700Z Member [192.168.1.227]:5701 - e152d11b-df3e-4c29-a363-188842fc624c
2020-02-02T16:30:52.360128200Z Member [192.168.1.227]:5702 - e7811c67-34ef-4ec5-9687-1945d7c36b69 this
2020-02-02T16:30:52.360159400Z ]
2020-02-02T16:30:52.360183200Z
2020-02-02T16:30:53.384531200Z Feb 02, 2020 4:30:53 PM com.hazelcast.core.LifecycleService
2020-02-02T16:30:53.384586000Z INFO: [192.168.1.227]:5702 [dev] [3.12.6] [192.168.1.227]:5702 is STARTED
2020-02-02T16:31:00.582731400Z Feb 02, 2020 4:31:00 PM com.hazelcast.nio.tcp.TcpIpConnection
2020-02-02T16:31:00.582871900Z WARNING: [192.168.1.227]:5702 [dev] [3.12.6] Connection[id=2, /172.17.0.3:5701->/172.17.0.1:60574, qualifier=null, endpoint=null, alive=false, type=NONE] closed. Reason: Exception in Connection[id=2, /172.17.0.3:5701->/172.17.0.1:60574, qualifier=null, endpoint=null, alive=true, type=NONE], thread=hz._hzInstance_1_dev.IO.thread-in-1
2020-02-02T16:31:00.582909200Z java.lang.IllegalStateException: REST API is not enabled.
2020-02-02T16:31:00.583013000Z at com.hazelcast.nio.tcp.UnifiedProtocolDecoder.onRead(UnifiedProtocolDecoder.java:96)
2020-02-02T16:31:00.583049600Z at com.hazelcast.internal.networking.nio.NioInboundPipeline.process(NioInboundPipeline.java:135)
2020-02-02T16:31:00.583077900Z at com.hazelcast.internal.networking.nio.NioThread.processSelectionKey(NioThread.java:369)
2020-02-02T16:31:00.583122400Z at com.hazelcast.internal.networking.nio.NioThread.processSelectionKeys(NioThread.java:354)
2020-02-02T16:31:00.583189100Z at com.hazelcast.internal.networking.nio.NioThread.selectLoop(NioThread.java:280)
2020-02-02T16:31:00.583220000Z at com.hazelcast.internal.networking.nio.NioThread.run(NioThread.java:235)
2020-02-02T16:31:00.583249400Z
2020-02-02T16:31:00.604505300Z Feb 02, 2020 4:31:00 PM com.hazelcast.nio.tcp.TcpIpConnection
Could you please help me to understand where I goes wrong?
The Hazelcast REST API is not enabled by default and that is why you get the exception in the logs. Also, keep in mind, that it does not make much sense to open Hazelcast in the browser, since it does not serve any HTTP webpage.
Saying that, you successfully run Hazelcast cluster in Docker. Now if you want to play with it, the simplest way is to either enable REST API or to use your language of choice and connect with Hazelcast client.
1. REST API
To start Hazelcast with REST API enabled, you need to add -Dhazelcast.rest.enabled=true to your JAVA_OPTS. So in your case, you can run the following commands:
docker run -e JAVA_OPTS="-Dhazelcast.local.publicAddress=192.168.1.227:5701 -Dhazelcast.rest.enabled=true" -itd -p 5701:5701 hazelcast/hazelcast:3.12.6
docker run -e JAVA_OPTS="-Dhazelcast.local.publicAddress=192.168.1.227:5702 -Dhazelcast.rest.enabled=true" -itd -p 5702:5701 hazelcast/hazelcast:3.12.6
Then, you can use Hazelcast REST API, for example to add and read the value form the map:
$ curl -X POST 192.168.1.227:5701/hazelcast/rest/maps/mapName/foo -d "bar"
$ curl 192.168.1.227:5701/hazelcast/rest/maps/mapName/foo
bar
2. Hazelcast Client
There are Hazelcast Clients in most programming languages. You only need to specify 192.168.1.227:5701 and 192.168.1.227:5702 as the address of your Hazelcast cluster. For example, in Python it would look like this.
import hazelcast
config = hazelcast.ClientConfig()
config.network_config.addresses.append("192.168.1.227:5701")
config.network_config.addresses.append("192.168.1.227:5702")
client = hazelcast.HazelcastClient(config)
my_map = client.get_map("map")
my_map.put("key", "value")
client.shutdown()
Then, you can run it with:
pip install hazelcast-python-client && python client.py

not getting confirmation mail from onlyoffice community server

I installed the only office by using the below command :
docker run --net onlyoffice --name onlyoffice-document-server onlyoffice/documentserver
docker run --net onlyoffice --privileged -i -t -d --name onlyoffice-mail-server -p 25:25 -p 143:143 -p 587:587 -h 10.0.2.37 onlyoffice/mailserver
docker run --net onlyoffice -i -t -d --name onlyoffice-community-server -p 80:80 -p 5222:5222 -p 443:443 --link onlyoffice-mail-server:mail_server --link onlyoffice-document-server:document_server onlyoffice/communityserver
and here are the logs of the mail server :
[root#V37 ~]# docker logs 051df1fda9d6
[ INFO ] Checking configuration file: /usr/src/iRedMail/config ... [FOUND]
[ INFO ] Import installation process status from file: /usr/src/iRedMail/runtime/install.status.
Start iRedMail Configurations
[ INFO ] Create required system accounts: vmail, iredapd.
[ INFO ] Configure Apache web server and PHP.
[ INFO ] Configure PHP.
[ INFO ] Configure MySQL database server.
[ INFO ] Configure Postfix (Message Transfer Agent).
[ INFO ] Configure Cluebringer (postfix policy server).
[ INFO ] Configure Dovecot (pop3/imap/managesieve server).
[ INFO ] Configure ClamAV (anti-virus toolkit).
[ INFO ] Configure Amavisd-new (interface between MTA and content checkers).
[ INFO ] Configure SpamAssassin (content-based spam filter).
[ INFO ] Configure OpenDkim.
[ INFO ] Configure Fail2ban (authentication failure monitor).
[ INFO ] Configure Server API.
[ INFO ] Configure SpamTrainer.
[ INFO ] Configure Awstats (logfile analyzer for mail and web server).
[ INFO ] Create self-signed SSL certification files (2048 bits).
[ INFO ] Generate a strong, unique Diffie Hellman Group with openssl, please > wait.
iRedMail-0.9.2 installation and configuration complete.
[ INFO ] Disable SELinux in /etc/selinux/config.
[ INFO ] Removing package(s): sendmail
Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package sendmail.x86_64 0:8.14.4-9.el6_8.1 will be erased
--> Processing Dependency: sendmail = 8.14.4-9.el6_8.1 for package: sendmail-> devel-8.14.4-9.el6_8.1.x86_64
--> Running transaction check
---> Package sendmail-devel.x86_64 0:8.14.4-9.el6_8.1 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================
Package Arch Version Repository Size
Removing:
sendmail x86_64 8.14.4-9.el6_8.1 #base 1.5 M
Removing for dependencies:
sendmail-devel x86_64 8.14.4-9.el6_8.1 #base 254 k
Transaction Summary
Remove 2 Package(s)
Installed size: 1.8 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Erasing : sendmail-devel-8.14.4-9.el6_8.1.x86_64 1/2
Erasing : sendmail-8.14.4-9.el6_8.1.x86_64 2/2
Verifying : sendmail-devel-8.14.4-9.el6_8.1.x86_64 1/2
Verifying : sendmail-8.14.4-9.el6_8.1.x86_64 2/2
Removed:
sendmail.x86_64 0:8.14.4-9.el6_8.1
Dependency Removed:
sendmail-devel.x86_64 0:8.14.4-9.el6_8.1
Complete!
grep: /etc/ssh/sshd_config: No such file or directory
[ INFO ] Copy firewall sample rules: /etc/sysconfig/iptables.
[ INFO ] Restarting firewall ...
[ INFO ] Copy MySQL sample file: /etc/my.cnf.
[ INFO ] Enable SSL support for MySQL server.
URLs of installed web applications:
Webmail:
Username: postmaster#mailserver.onlyoffice.com, Password: orC61TNQ15
Web admin panel (iRedAdmin):
You can login to above links with same credential:
o Username: postmaster#mailserver.onlyoffice.com
o Password: orC61TNQ15
Congratulations, mail server setup completed successfully. Please
read below file for more information:
/usr/src/iRedMail/iRedMail.tips
And it's sent to your mail account postmaster#mailserver.onlyoffice.com.
********************* WARNING **************************************
*
Rebooting your system is required to enable mail services.
mkdir: cannot create directory /var/log/httpd': File exists rm: cannot > remove/var/run/syslogd.pid': No such file or directory
rm: cannot remove /var/run/cbpolicyd.pid': No such file or directory rm: > cannot remove/var/run/opendkim/opendkim.pid': No such file or directory
Waiting for external MySql response
/usr/src/iRedMail/functions/mysql.sh: line 33: ECHO_INFO: command not found
/usr/src/iRedMail/functions/mysql.sh: line 36: ECHO_DEBUG: command not found
Starting crond: [ OK ]
Starting Dovecot Imap: [ OK ]
Starting system logger: [ OK ]
Starting amavisd: [ OK ]
Starting postfix: [FAILED]
Starting cbpolicyd: [ OK ]
Starting Clam AntiVirus Daemon: LibClamAV Warning: > **************************************************
LibClamAV Warning: * The virus database is older than 7 days!
LibClamAV Warning: Please update it as soon as possible. *
LibClamAV Warning: **************************************************
[ OK ]
Starting clamd.amavisd: LibClamAV Warning: > **************************************************
LibClamAV Warning: * The virus database is older than 7 days!
LibClamAV Warning: Please update it as soon as possible. *
LibClamAV Warning: **************************************************
[ OK ]
Starting httpd: httpd: Could not reliably determine the server's fully > qualified domain name, using 10.0.2.37 for ServerName
[ OK ]
Generating default DKIM keys: [ OK ]
Default DKIM keys for 0.2.37 created in /usr/local/etc/opendkim/keys.
Starting OpenDKIM Milter: [ OK ]
Starting spamd: [ OK ]
Starting fail2ban: [ OK ]
Starting server
[root#V37 ~]#
for more log information you can refer this link :
https://github.com/ONLYOFFICE/Docker-CommunityServer/issues/31
i have a VM with 2gb of RAM and 2gb of swap and 100 gb of storage,
since i am not geting the confirmation mail to my mail id, i am not able to access the fetures in the gui.
help in this....
We do not recommend using --link for connecting the docker containers.
In our installation script we only use docker network
docker network create --driver bridge onlyoffice
I would strongly recommend to install ONLYOFFICE Community Edition using the provided script.
Also note that the default smtp server responsible for the activation mails is notify.onlyoffice.info with sender email address postman#notify.onlyoffice.info

Error while execute arangod 3.2 in centos 6.9

I try to execute arangodb 3.2 (version updated) in my server centos 6.9 but don't work, what I can do for fixing it?.
[root#user ~]# arangod
2017-08-18T20:01:34Z [8419] INFO ArangoDB 3.2.1 [linux] 64bit, using jemalloc, VPack 0.1.30, RocksDB 5.6.0, ICU 58.1, V8 5.7.0.0, OpenSSL 1.0.1e-fips 11 Feb 2013
2017-08-18T20:01:34Z [8419] INFO using storage engine mmfiles
2017-08-18T20:01:34Z [8419] INFO {cluster} Starting up with role SINGLE
2017-08-18T20:01:34Z [8419] INFO {syscall} file-descriptors (nofiles) hard limit is 8192, soft limit is 8192
2017-08-18T20:01:34Z [8419] INFO Authentication is turned on (system only), authentication for unix sockets is turned on
2017-08-18T20:01:34Z [8419] ERROR error while opening database collections: got invalid indexes for collection '_fishbowl' (exception location: /var/lib/otherjenkins/workspace/RELEASE__BuildPackages/arangod/MMFiles/MMFilesCollection.cpp:2004). Please report this error to arangodb.com
2017-08-18T20:01:34Z [8419] FATAL cannot start database: got invalid indexes for collection '_fishbowl' (exception location: /var/lib/otherjenkins/workspace/RELEASE__BuildPackages/arangod/MMFiles/MMFilesCollection.cpp:2004). Please report this error to arangodb.com

Services in RHEL7

I already have a service that was written for RHEL6 and there i had some custom service commands that i can execute.Please see below for the extract from the script.
case "$1" in
'start')
start
;;
'stop')
stopit
;;
'restart')
stopit
start
;;
'status')
status
;;
'AppHealthCheck')
AppHealthCheck
;;
*)
echo "Usage: $0 { start | stop | restart | status | AppHealthCheck }"
exit 1
;;
esac
All the called method have there defination...So previously in RHEL6 if i had to execute the service and see if it is healthy i used to execute service $servicename AppHealthCheck .. and it used to work but now in RHEL7 i am not able to define in service unit file if i want to check say the AppHealth...As far as the research i have done i learnt that can define what will be called for service start/stop/restart but was not able to find if we can call any custom methods in the script..Please see my service unit file below:-
[Unit]
Description=SPIRIT Agent Application
[Service]
Type=forking
ExecStart=scripts/Agent start
ExecStop=scripts/Agent stop
ExecReload=scripts/Agent restart
[Install]
Can you one please help me in resolving this issue.Please let me know if more info is required.
The systemd way is to send output to the journal so that systemctl status shows the latest log messages, and tells you if the service is running. If you want more detailed status, you would create a separate command-line command that does AppHealthCheck. It wouldn't be executed via systemctl, it'd be a separate thing.
This is how Pacemaker works, for example. systemctl status pacemaker shows if the service is running.
# systemctl status pacemaker
● pacemaker.service - Pacemaker High Availability Cluster Manager
Loaded: loaded (/usr/lib/systemd/system/pacemaker.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2016-11-10 15:28:11 GMT; 1 weeks 3 days ago
Nov 11 15:54:59 node1 crmd[4422]: notice: Operation svc1_stop_0: ok (node=node1, call=93, rc=0, cib-update=134, confirmed=true)
Nov 11 15:54:59 node1 crmd[4422]: notice: Operation svc2_stop_0: ok (node=node1, call=95, rc=0, cib-update=135, confirmed=true)
Nov 11 15:54:59 node1 crmd[4422]: notice: Operation svc3_stop_0: ok (node=node1, call=97, rc=0, cib-update=136, confirmed=true)
pcs status gives more detailed information about how it's doing.
# pcs status
Cluster name: node
Stack: corosync
Current DC: node2 (version 1.2.3) - partition with quorum
2 nodes and 3 resources configured
Online: [ node1 node2 ]
Full list of resources:
<snip>
PCSD Status:
node1: Online
node2: Online
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled
In RHEL7 we cannot define any custom service commands as we used to do or we can do in RHEL6 server. So even if we are calling any custom service command we have to internally call the 'service $servicename start' or 'systemctl start $servicename' so that the RHEL7 server can recognize that the service is running

Cassandra won't start in linux as a service

I have a debian linux image running on Google compute. Can successfully get cassandra working with "sudo cassandra" or "sudo cassandra -f" but then as soon as I log off this stops working. But when I try to run this as a service it simply doesnt say anything and doesnt start it either! I installed it using the aptget package v2.1.
I've tried sudo service cassandra start. It looks like its doing something and then quits without any logs.
Please help me run this up as a service. I can't even locate where the logs are stored when I run it as a service.
I ran into this issue recently, and as BrianC indicated it can be an out of memory condition. In my case I could successfully start cassandra with sudo cassandra -f but not with /etc/init.d/cassandra start.
For me, the last log entry in /var/log/cassandra/system.log when starting as a service was:
INFO [main] 2015-04-30 10:58:16,234 CassandraDaemon.java (line 248) Classpath: /etc/cassandra:/usr/share/cassandra/lib/antlr-3.2.jar:/usr/share/cassandra/lib/commons-cli-1.1.jar:/usr/share/cassandra/lib/commons-codec-1.2.jar:/usr/share/cassandra/lib/commons-lang3-3.1.jar:/usr/share/cassandra/lib/compress-lzf-0.8.4.jar:/usr/share/cassandra/lib/concurrentlinkedhashmap-lru-1.3.jar:/usr/share/cassandra/lib/disruptor-3.0.1.jar:/usr/share/cassandra/lib/guava-15.0.jar:/usr/share/cassandra/lib/high-scale-lib-1.1.2.jar:/usr/share/cassandra/lib/jackson-core-asl-1.9.2.jar:/usr/share/cassandra/lib/jackson-mapper-asl-1.9.2.jar:/usr/share/cassandra/lib/jamm-0.2.5.jar:/usr/share/cassandra/lib/jbcrypt-0.3m.jar:/usr/share/cassandra/lib/jline-1.0.jar:/usr/share/cassandra/lib/json-simple-1.1.jar:/usr/share/cassandra/lib/libthrift-0.9.1.jar:/usr/share/cassandra/lib/log4j-1.2.16.jar:/usr/share/cassandra/lib/lz4-1.2.0.jar:/usr/share/cassandra/lib/metrics-core-2.2.0.jar:/usr/share/cassandra/lib/netty-3.6.6.Final.jar:/usr/share/cassandra/lib/reporter-config-2.1.0.jar:/usr/share/cassandra/lib/servlet-api-2.5-20081211.jar:/usr/share/cassandra/lib/slf4j-api-1.7.2.jar:/usr/share/cassandra/lib/slf4j-log4j12-1.7.2.jar:/usr/share/cassandra/lib/snakeyaml-1.11.jar:/usr/share/cassandra/lib/snappy-java-1.0.5.jar:/usr/share/cassandra/lib/snaptree-0.1.jar:/usr/share/cassandra/lib/super-csv-2.1.0.jar:/usr/share/cassandra/lib/thrift-server-0.3.7.jar:/usr/share/cassandra/apache-cassandra-2.0.14.jar:/usr/share/cassandra/apache-cassandra-thrift-2.0.14.jar:/usr/share/cassandra/apache-cassandra.jar:/usr/share/cassandra/stress.jar:/usr/share/java/jna.jar::/usr/share/cassandra/lib/jamm-0.2.5.jar:/usr/share/cassandra/lib/jamm-0.2.5.jar
And nothing afterwards. If it is a memory problem you should be able to verify this in your syslog. If if contains something like:
Apr 30 10:53:39 dev kernel: [1173246.957818] Out of memory: Kill process 8229 (java) score 132 or sacrifice child
Apr 30 10:53:39 dev kernel: [1173246.957831] Killed process 8229 (java) total-vm:634084kB, anon-rss:286772kB, file-rss:12676kB
Increase your ram. In my case I increased it to 2GB and it started fine.

Resources