Unit neo4j-service.service failed to load - neo4j

installed neo4j 2.2.1 after first removing the previous version.
service neo4j-service start
produces the error:
Failed to start neo4j-service.service: Unit neo4j-service.service failed to load: No such file or directory.
System is:
system: os => {"name"=>"Ubuntu", "family"=>"Debian", "release"=>{"major"=>"15.04", "full"=>"15.04"}, "lsb"=>{"distcodename"=>"vivid", "distid"=>"Ubuntu", "distdescription"=>"Ubuntu 15.04", "distrelease"=>"15.04", "majdistrelease"=>"15.04"}}
Output of the install script:
root#cb-8:~# aptitude install neo4j -y # Install Neo4j, community edition
The following NEW packages will be installed:
daemon{a} neo4j
0 packages upgraded, 2 newly installed, 0 to remove and 0 not to upgrade.
Need to get 0 B/53.2 MB of archives. After unpacking 62.4 MB will be used.
Selecting previously unselected package daemon.
(Reading database ... 183856 files and directories currently installed.)
Preparing to unpack .../daemon_0.6.4-1_amd64.deb ...
Unpacking daemon (0.6.4-1) ...
Selecting previously unselected package neo4j.
Preparing to unpack .../archives/neo4j_2.2.1_all.deb ...
Unpacking neo4j (2.2.1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (219-7ubuntu3) ...
Setting up daemon (0.6.4-1) ...
Setting up neo4j (2.2.1) ...
update-rc.d: error: initscript does not exist: /etc/init.d/neo4j-service
dpkg: error processing package neo4j (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
neo4j
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package. Trying to recover:
Setting up neo4j (2.2.1) ...
update-rc.d: error: initscript does not exist: /etc/init.d/neo4j-service
dpkg: error processing package neo4j (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
neo4j
root#cb-8:~# service neo4j-service status
● neo4j-service.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
/etc/init.d/neo4j-service does in fact exist.
lrwxrwxrwx 1 root root 36 Mar 5 17:28 /etc/init.d/neo4j-service -> /opt/neo4j-community-2.1.7/bin/neo4j
I'm out of ideas and hoping someone might be able to point me in the right direction.
~ Ross

I had the same exact error. However, if installing newer version (3.3.0 in my case) of neo4j the syntax is different. It should be:
service neo4j start
not
service neo4j-service start
To double check you can do:
ls /etc/init.d | grep neo4j
In my case it finds neo4j

Problem solved.
2.2.1 was still linking to 2.1.7 somehow.
removed the spurious link and it all worked.

Related

Bazel inside Alpine container issue

I'm trying to test the build of google/or-tools using the Bazel based build system on various GNU/Linux distro by using various common distros
When trying to use bazel inside an Alpine:edge based Dockerfile (i.e. in a RUN cmd), at "docker build" time.
I don't have a consistency build between my Archlinux and on Github action workflow runners (ubuntu 18.04 IIRC).
Dockerfile: https://github.com/google/or-tools/blob/master/bazel/docker/alpine/Dockerfile
I run it using my Makefile target alpine_build in google/or-tools/bazel
ref: https://github.com/google/or-tools/blob/master/bazel/Makefile
From GH ubuntu-latest (18.04 LTS ?) runner, I got this trace
$ make alpine_build
...
Step 11/11 : RUN bazel build --curses=no --copt='-Wno-sign-compare' //...:all
---> Running in 9a2f9b6f24c7
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Loading:
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
DEBUG: Rule 'com_google_protobuf' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "fe1790ca0df67173702f70d5646b82f48f412b99", shallow_since = "1576187991 -0800"
DEBUG: Call stack for the definition of repository 'com_google_protobuf' which is a git_repository (rule definition at /root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/bazel_tools/tools/build_defs/repo/git.bzl:195:18):
- /home/lib/WORKSPACE:22:1
Loading: 2 packages loaded
Analyzing: 301 targets (16 packages loaded, 0 targets configured)
Analyzing: 301 targets (25 packages loaded, 43 targets configured)
Analyzing: 301 targets (26 packages loaded, 43 targets configured)
...
ref: https://github.com/google/or-tools/runs/568849544?check_suite_focus=true
So everything seems fine up to this point (still need to figure out the jdk javac issue but it's an other topic)
On the contrary on my Archlinux, I've got:
$ make alpine_build
...
Step 11/11 : RUN bazel build --curses=no --copt='-Wno-sign-compare' //...:all
---> Running in e13ca9fd3e84
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Loading:
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
INFO: Call stack for the definition of repository 'com_google_protobuf' which is a git_repository (rule definition at /root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/bazel_tools/tools/build_defs/repo/git.bzl:195:18):
- /home/lib/WORKSPACE:22:1
ERROR: An error occurred during the fetch of repository 'com_google_protobuf':
java.io.IOException: unlinkat(/root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/com_google_protobuf/.git/logs/refs/remotes/origin) (Directory not empty)
ERROR: no such package '#com_google_protobuf//': java.io.IOException: unlinkat(/root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/com_google_protobuf/.git/logs/refs/remotes/origin) (Directory not empty)
ERROR: no such package '#com_google_protobuf//': java.io.IOException: unlinkat(/root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/com_google_protobuf/.git/logs/refs/remotes/origin) (Directory not empty)
INFO: Elapsed time: 29.713s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)
The command '/bin/sh -c bazel build --curses=no --copt='-Wno-sign-compare' //...:all' returned a non-zero code: 1
make: *** [Makefile:121: alpine_build] Error 1
I've tried to look at the file /root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/com_google_protobuf/.git/logs/refs/remotes/origin
using the previous step (alpine_devel) container:
$ make sh_alpine_devel
/home/lib # bazel build --curses=no --copt='-Wno-sign-compare' //...:all
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Loading:
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
INFO: Call stack for the definition of repository 'com_google_protobuf' which is a git_repository (rule definition at /root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/bazel_tools/tools/build_defs/repo/git.bzl:195:18):
- /home/lib/WORKSPACE:22:1
ERROR: An error occurred during the fetch of repository 'com_google_protobuf':
java.io.IOException: unlinkat(/root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/com_google_protobuf/.git/logs/refs/remotes/origin) (Directory not empty)
ERROR: no such package '#com_google_protobuf//': java.io.IOException: unlinkat(/root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/com_google_protobuf/.git/logs/refs/remotes/origin) (Directory not empty)
ERROR: no such package '#com_google_protobuf//': java.io.IOException: unlinkat(/root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/com_google_protobuf/.git/logs/refs/remotes/origin) (Directory not empty)
INFO: Elapsed time: 29.924s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)
cat /root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/com_google_protobuf/.git/logs/
refs/remotes/origin/revert-6272-MutableSequence-import
0000000000000000000000000000000000000000 c5fedd61a48a174054f98684d5ddbc2d11530367 root <root#Flex2.home> 1586336706 +0000 fetch origin refs/heads/*:refs/remotes/origin/* refs/tags/*:refs/tags/*: storing head
note Flex2 is my local machine...
So my questions:
Is it a known issue (ed don't find anything on java.io.IOException: unlinkat) ?
Does Bazel deal with the kernel (or uname -a etc...) which could explain why I don't have the same behaviour from one host to an other ?
May I have more trace to debug this issue ?
How can I fix it ?
Thanks,
Basically you need to tell to bazel to use the java locally installed by alpine than downloading one.
this can be done using the option --host_javabase=#local_jdk//:jdk
ref: https://github.com/google/or-tools/blob/2cb85b4eead4c38e1c54b48044f92087cf165bce/bazel/docker/alpine/Dockerfile#L26
Minimal working example:
https://github.com/Mizux/bazel-cpp/blob/main/ci/docker/alpine/Dockerfile

Unable to configure DSE from Opscenter

I am trying to configure DSE on newly configured centos 7 VM but I am getting error Attempting to configure dse-full 5.1.0, but found a different version installed. Upgrades and downgrades aren't supported." (opscd-pool-4) I am not able to understand why getting this error when the machine is completely new, even I haven't run any DSE command.
ERROR: Received error from node event-subtype="MeldError" job-id="a38724e1-2139-45f5-9266-079638c2ca2e" name="cassandra-5" ssh-management-address="192.168.159.175" node-id="dafe635a-6e98-4ae6-b0ea-6afa0da51731" event-type="error" message="Attempting to configure dse-full 5.1.0, but found a different version installed. Upgrades and downgrades aren't supported." (opscd-pool-4)
I am using Opscentre to configure Node.
Here you go detailed log of LCM
2017-11-29 05:38:37,753 [opscenterd] INFO: configure job started for node name="cassandra-5" ssh-management-address="192.168.138.237" node-id="dafe635a-6e98-4ae6-b0ea-6afa0da51731" (async-thread-macro-32)
2017-11-29 05:38:37,776 [opscenterd] INFO: Trying to establish ssh connection name="cassandra-5" ssh-management-address="192.168.138.237" node-id="dafe635a-6e98-4ae6-b0ea-6afa0da51731" node-name="cassandra-5" job-id="4fae4fe1-ca3c-4924-abdb-62c4cf4ad878" (async-thread-macro-32)
2017-11-29 05:38:38,515 [opscenterd] INFO: Received milestone from node name="cassandra-5" ssh-management-address="192.168.138.237" node-id="dafe635a-6e98-4ae6-b0ea-6afa0da51731" message="Uploaded facts to OpsCenter server" job-id="4fae4fe1-ca3c-4924-abdb-62c4cf4ad878" (opscd-pool-0)
2017-11-29 05:38:40,135 [opscenterd] ERROR: Received error from node event-subtype="MeldError" job-id="4fae4fe1-ca3c-4924-abdb-62c4cf4ad878" name="cassandra-5" ssh-management-address="192.168.138.237" node-id="dafe635a-6e98-4ae6-b0ea-6afa0da51731" event-type="error" message="Attempting to configure dse-full 5.1.0, but found a different version installed. Upgrades and downgrades aren't supported." (opscd-pool-7)
2017-11-29 05:38:40,161 [opscenterd] ERROR: Configure job 4fae4fe1-ca3c-4924-abdb-62c4cf4ad878 failed! (async-thread-macro-33)
2017-11-29 05:38:41,102 [opscenterd] INFO: configure job finished for node name="cassandra-5" ssh-management-address="192.168.138.237" node-id="dafe635a-6e98-4ae6-b0ea-6afa0da51731" (async-thread-macro-32)
Here you go node info:
[root#li1639-135 ~]# dpkg -l dse-full
-bash: dpkg: command not found
[root#li1639-135 ~]# yum info dse-full
Loaded plugins: fastestmirror
base | 3.6 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
(1/4): base/7/x86_64/group_gz | 156 kB 00:00
(2/4): extras/7/x86_64/primary_db | 130 kB 00:00
(3/4): base/7/x86_64/primary_db | 5.7 MB 00:00
(4/4): updates/7/x86_64/primary_db | 3.6 MB 00:00
Determining fastest mirrors
* base: mirrors.linode.com
* extras: mirrors.linode.com
* updates: mirrors.linode.com
Error: No matching Packages to list
Job ID4fae4fe1-ca3c-4924-abdb-62c4cf4ad878
11/29/2017, 5:38:40AM UTC ERROR - MELDERROR Attempting to configure dse-full 5.1.0, but found a different version installed. Upgrades and downgrades aren't supported.
11/29/2017, 5:38:40AM UTC SHELL-COMMAND - RESULT Finished executing command: rpm -qa | grep -E ^dse-full-[[:digit:]] | grep 5.1.0
11/29/2017, 5:38:39AM UTC SHELL-COMMAND - INVOCATION Invoked command: rpm -qa | grep -E ^dse-full-[[:digit:]] | grep 5.1.0
11/29/2017, 5:38:39AM UTC CHECK - IS-PACKAGE-INSTALLED Checking if package dse-full is installed with version 5.1.0
11/29/2017, 5:38:39AM UTC CHANGE - PACKAGE-PROXY Not using proxy
11/29/2017, 5:38:38AM UTC MILESTONE - UPLOADED-FACTS Uploaded facts to OpsCenter server
11/29/2017, 5:38:38AM UTC SHELL-COMMAND - INVOCATION Invoked command: if [ -x "$(which yum)" ] && [ -f "/etc/redhat-release" -o -f "/etc/SuSE-release" -o -f "/etc/system-release" ]; then echo -n "yum"; elif [ -x "$(which...
Updated Answer
I was able to sync up with Ranjeet offline and found that the logs posted above were the result of configure jobs, which require that DSE is already installed. When running install jobs, things proceeded as expected.
There were also some issues with newly supported platforms and platform checks working in confusing ways, but none of that is reflected in the logs for the original post in this question.
Original Answer
OpsCenter/LCM engineer here, I work on the provisioning features.
"Attempting to configure dse-full 5.1.0, but found a different version installed. Upgrades and downgrades aren't supported." The meaning of the error message seems pretty clear. You're asking OpsCenter/LCM to install/configure DSE 5.1.0. Are you positive that you don't have a different version already installed?
On apt-based target machines, you can check what version of DSE is install with 'dpkg -l dse-full'
On yum-based target machines, you can check what version of DSE is installed with 'yum info dse-full'
If you're really trying to install DSE 5.1.0, but a different version is already present on your nodes, you'll have to upgrade/downgrade outside OpsCenter LCM and can the resume managing configs with LCM after the desired version is installed. See http://docs.datastax.com/en/upgrade/doc/upgrade/datastax_enterprise/upgrdDSE.html
If you're attempting to install some other version (which matches what's already installed), then you'll have to clone your config profile and set the correct DSE version when you create the new CP. See: https://support.datastax.com/hc/en-us/articles/212267063-Lifecycle-Manager-Cloning-Configuration-Profiles
If you believe the error from OpsCenter/LCM is mistaken, and that you don't really have a different version of DSE installed on the target nodes, then we'll need more log snippets from LCM with the events leading up to the error, and information about how you confirmed the DSE version on all nodes.

Chef - Recipe package fails to find candidate version

I am installing and configuring a very basic Jenkins installation using Chef. When i attempt to run the following recipe:
include_recipe "apt::default"
apt_repository "jenkins" do
uri "http://pkg.jenkins-ci.org/debian"
key "http://pkg.jenkins-ci.org/debian/jenkins-ci.org"
components ["binary/"]
action :add
end
package "jenkins" do
version '2.62'
end
service "jenkins" do
supports [:stop, :start, :restart]
action [:start, :enable]
end
I receive the following errors (displayed in the terminal):
192.168.9.207 [2017-05-25T10:50:58-04:00] ERROR: Running exception handlers
192.168.9.207 Running handlers complete
192.168.9.207 [2017-05-25T10:50:58-04:00] ERROR: Exception handlers complete
192.168.9.207 Chef Client failed. 2 resources updated in 20 seconds
192.168.9.207 [2017-05-25T10:50:58-04:00] INFO: Sending resource update report (run-id: 2b59b80e-b787-4e93-805b-837b4d3264fb)
192.168.9.207 [2017-05-25T10:50:58-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
192.168.9.207 [2017-05-25T10:50:58-04:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
192.168.9.207 [2017-05-25T10:50:58-04:00] ERROR: apt_package[jenkins] (jenkins-installation::default line 21) had an error: Chef::Exceptions::Package: No candidate version available for jenkins
192.168.9.207 [2017-05-25T10:50:58-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
The error explains that there is no candidate version available for Jenkins. After the run fails, if I run sudo apt-get update on the managed node I receive the following error:
Err http://pkg.jenkins-ci.org trusty/binary/ amd64 Packages
404 Not Found
Err http://pkg.jenkins-ci.org trusty/binary/ i386 Packages
404 Not Found
Ign http://pkg.jenkins-ci.org trusty/binary/ Translation-en_US
Ign http://pkg.jenkins-ci.org trusty/binary/ Translation-en
Fetched 5,976 kB in 3s (1,528 kB/s)
W: Failed to fetch http://pkg.jenkins-ci.org/debian/dists/trusty/binary//binary-amd64/Packages 404 Not Found
W: Failed to fetch http://pkg.jenkins-ci.org/debian/dists/trusty/binary//binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
I am fairly new to Chef. This error appears to be related to retrieving a Jenkins package, however I am not sure how to remedy this error. Please let me know if additional information is required to troubleshoot this issue.
Thank you to everybody in advance for any guidance you are able to provide. I have searched through the Chef documentation but haven't seen much aside from specifying the package version: https://docs.chef.io/resource_package.html.
Specify distribution 'binary/' instead of components 'binary/'. This will fix the 404s that you get because of trusty/binary/.
At least, this is what I see from the "official" Jenkins cookbook, which I btw. suggest to use.
EDIT: So the result would be:
apt_repository "jenkins" do
uri "http://pkg.jenkins-ci.org/debian"
key "http://pkg.jenkins-ci.org/debian/jenkins-ci.org"
distribution "binary/"
end

Failed to install rabbitmq-server on Linux(Oracle Linux Server release 6.7/RHEL)

I am getting following error while installing.
$ sudo yum install rabbitmq-server
Loaded plugins: aliases, changelog, fastestmirror, kabi, presto, refresh-packagekit, security, tmprepo, ulninfo, verify, versionlock
Loading support for kernel ABI
Setting up Install Process
Loading mirror speeds from cached hostfile
* epel: archive.linux.duke.edu
* ol6_UEKR3: slcac475.us.oracle.com
* ol6_latest: slcac475.us.oracle.com
Resolving Dependencies
--> Running transaction check
---> Package rabbitmq-server.noarch 0:3.1.5-1.el6 will be installed
--> Finished Dependency Resolution`
...
...
...
groupadd: Can't get unique system GID (no more available GIDs)
useradd: group 'rabbitmq' does not exist
error: %pre(rabbitmq-server-3.1.5-1.el6.noarch) scriptlet failed, exit status 6
Error in PREIN scriptlet in rpm package rabbitmq-server-3.1.5-1.el6.noarch
error: install: %pre scriptlet failed (2), skipping rabbitmq-server-3.1.5-1.el6
Verifying :
rabbitmq-server-3.1.5-1.el6.noarch
Failed
rabbitmq-server.noarch 0:3.1.5-1.el6
Complete!
Note: I have already installed the erlang
I have refereed few posts already there
Installing rabbitmq-server on RHEL
RabbitMQ install issue on Centos 5.5
Go to /etc/login.defs and check if you have something like this, if not add it into it.
SYS_GID_MIN 2000
SYS_GID_MAX 9000

RabbitMQ will not start after upgrade 3.3.3-1

After updating RabbitMQ to version 3.3.3-1 using their APT repository, it will no longer start:
Setting up rabbitmq-server (3.3.3-1) ...
* Starting message broker rabbitmq-server * FAILED - check /var/log/rabbitmq/startup_{log, _err}
[fail]
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
dpkg: error processing package rabbitmq-server (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
rabbitmq-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
startup_log:
{"init terminating in do_boot",{{case_clause,{ok,[]}},[{rabbit_prelaunch,dist_port_set_check,0,[]},{rabbit_prelaunch,start,0,[]},{init,start_it,1,[]},{init,start_em,1,[]}]}}
startup_err:
Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
erl_crash.dump
I'm running Ubuntu 14.04 LTS (GNU/Linux 3.13.0-29-generic x86_64)
Erlang version: 1:17.0
I can't seem to find any information on why it is failing to start. Any help would be much appreciated.
Looking at rabbit_prelaunch I think this could happen if you have a config file but it is completely empty. That's not allowed (not a legal Erlang term), but this exception certainly sucks. I'll file a bug to fix that.
EDIT: fixed in 3.3.4.

Resources