Redis3.0.3 cluster warning: wrong element type nil at 0 (expected array) - redis

when I create redis cluster, I met errors as follows:
[pirate#zhangbincan src]$ /home/zhangbincan/tools/ruby/ruby-2.2.2/ruby redis-trib.rb create --replicas 1 192.168.1.114:6379 192.168.1.114:6780 192.168.1.114:6381 192.168.1.114:6382 192.168.1.114:6383 192.168.1.114:6384
Creating cluster
Connecting to node 192.168.1.114:6379: OK
/usr/local/ruby2.2.2/lib/ruby/gems/2.2.0/gems/redis3.0.0/lib/redis.rb:182: warning: wrong element type nil at 0 (expected array)
/usr/local/ruby2.2.2/lib/ruby/gems/2.2.0/gems/redis3.0.0/lib/redis.rb:182: warning: ignoring wrong elements is deprecated, remove them explicitly
/usr/local/ruby2.2.2/lib/ruby/gems/2.2.0/gems/redis3.0.0/lib/redis.rb:182: warning: this causes ArgumentError in the next release
/usr/local/ruby2.2.2/lib/ruby/gems/2.2.0/gems/redis3.0.0/lib/redis.rb:182: warning: wrong element type nil at 18 (expected array)
/usr/local/ruby2.2.2/lib/ruby/gems/2.2.0/gems/redis3.0.0/lib/redis.rb:182: warning: this causes ArgumentError in the next release
Connecting to node 192.168.1.114:6780: [ERR] Sorry, can't connect to node 192.168.1.114:6780
The envs are :
[pirate#zhangbincan src]$ gem -v
2.4.8
[pirate#zhangbincan src]$ /home/zhangbincan/tools/ruby/ruby-2.2.2/ruby -v
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]

“Sorry, can't connect to node 192.168.1.114:6780”, check if the port 6780 is ok.

Related

Failure to build arch package - aborting

I'm trying to build a package for ArchLinux with the following command:
extra-x86_64-build -cr archbuild
It fails with the following error:
Dropping capabilities failed: Operation not permitted
Child died too early.
==> ERROR: Aborting...
I have no idea why is it failing.
Update: Running as root or a normal user makes no difference, both return the same error.

Error when installing mod_perl2

I am trying to install mod_perl2 with below configuration: OS: CentOS release 5.5 (Final) Uname -a result: x86_64 x86_64 x86_64 GNU/Linux Perl version: v5.8.8 built for x86_64-linux-thread-multi apache version: Apache/2.2.3 I have downloaded mod_perl2 from Cpan site
when I try to run the "perl Makefile.PL MP_APXS=/usr/local/httpd/bin/apxs" it gives below output:
Subroutine set_version redefined at ./Makefile.PL line 137.
[ info] generating script t/TEST
[ info] generating script ./t/cgi-bin/cookies.pl
[ info] generating script ./t/cgi-bin/next_available_port.pl
Checking for Cwd...ok
Checking for File::Spec...ok
[ info] generating script t/TEST
Generating a Unix-style Makefile
Writing Makefile for mod_perl2
[warning] mod_perl dso library will be built as mod_perl.so
[warning] You'll need to add the following to httpd.conf:
[warning]
[warning] LoadModule perl_module modules/mod_perl.so
[warning]
[warning] depending on your build, mod_perl might not live in
[warning] the modules/ directory.
[warning] Check the results of
[warning]
[warning] $ /usr/local/httpd/bin/apxs -q LIBEXECDIR
[warning]
[warning] and adjust the LoadModule directive accordingly.
After "make" command runs below error occurs:
modperl_env.c: In function ‘modperl_env_magic_local_all’:
modperl_env.c:544: error: ‘MGf_LOCAL’ undeclared (first use in this function)
modperl_env.c:544: error: (Each undeclared identifier is reported only once
modperl_env.c:544: error: for each function it appears in.)
modperl_env.c: At top level:
modperl_env.c:642: warning: excess elements in struct initializer
modperl_env.c:642: warning: (near initialization for ‘MP_vtbl_env’)
modperl_env.c: In function ‘modperl_env_init’:
modperl_env.c:661: warning: passing argument 2 of ‘Perl_mg_find’ discards qualifiers from pointer target type
modperl_env.c:673: warning: implicit declaration of function ‘mg_free_type’
modperl_env.c:678: error: ‘MGf_LOCAL’ undeclared (first use in this function)
modperl_env.c: In function ‘modperl_env_unload’:
modperl_env.c:690: warning: passing argument 2 of ‘Perl_mg_find’ discards qualifiers from pointer target type
make1: * [modperl_env.lo] Error 1
make1: Leaving directory `/opt/mod_perl-2.0.10/src/modules/perl'
make: * [modperl_lib] Error 2
any help is appriciated, if i have asked somthing wrong please guide further (no down votes please :) )
This constant as been introduced in perl 5.9.3, and mod_perl use it from 2.0.10.
http://search.cpan.org/~vpit/Variable-Magic-0.62/lib/Variable/Magic.pm#MGf_LOCAL
https://perl5.git.perl.org/perl.git/commit/a5063e7cd8fef802efd25ffe9df2c3748f4254f6
https://github.com/apache/mod_perl/commit/82827132efd3c2e25cc413c85af61bb63375da6e
https://perldoc.perl.org/perlguts.html
to overcome this you must modify mod_perl to use this constant conditionaly of the perl version:
diff -ruw mod_perl-2.0.11/src/modules/perl/modperl_env.c mod_perl-2.0.11.patched/src/modules/perl/modperl_env.c
--- mod_perl-2.0.11/src/modules/perl/modperl_env.c 2017-12-06 11:08:55.000000000 -0500
+++ mod_perl-2.0.11.patched/src/modules/perl/modperl_env.c 2018-03-27 15:02:14.174790000 -0400
## -541,7 +541,9 ##
nmg = sv_magicext(nsv, mg->mg_obj, mg->mg_type, &MP_vtbl_env, (char*)NULL, 0);
nmg->mg_ptr = mg->mg_ptr;
nmg->mg_flags |= MGf_COPY;
+#if MP_PERL_VERSION_AT_LEAST(5, 9, 3)
nmg->mg_flags |= MGf_LOCAL;
+#endif
return 1;
}
## -679,7 +681,9 ##
/* Add our version instead */
mg = sv_magicext((SV*)ENVHV, (SV*)NULL, PERL_MAGIC_env, &MP_vtbl_env, (char*)NULL, 0);
mg->mg_flags |= MGf_COPY;
+#if MP_PERL_VERSION_AT_LEAST(5, 9, 3)
mg->mg_flags |= MGf_LOCAL;
+#endif
}
void modperl_env_unload(pTHX)
A modified/enhanced version of Mathieu Carbonneaux's patch above was committed to the mod_perl SVN repository on October 8th, 2019:
http://svn.apache.org/viewvc?view=revision&revision=1868115
With this patch, mod_perl 2.0.11 will compile and install using Perl <= 5.8.8.
(Sorry, I don't have the reputation to comment, only answer.)
Why are you trying to build your own version of mod_perl? Centos has a pre-built version of mod_perl which will work with the pre-built version of Perl that is already installed.
$ sudo yum install mod_perl
(Of course, this won't help if you're not using the system Perl)
dont know how but mod_perl-2.0.6 has got installed successfully. had no success with the mod_perl-2.0.10 :(

Error while upgrading RabbitMq from 3.2.4 to 3.6.1 on ubuntu 14.04

I was following instruction given in the link. Updated my repository list and tried to upgrade the version but it gives the following error.
Earlier, cluster of two node of rabbitmq 3.2.4 was running.
Error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
rabbitmq-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 467 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up rabbitmq-server (3.6.1-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)
[1]: http://monkeyhacks.com/post/installing-rabbitmq-on-ubuntu-14-04
In the error log i am getting this :
Cluster upgrade needed but other nodes are running [add_ip_to_listener,
exchange_decorators,
exchange_event_serial,gm,
mirrored_supervisor,
policy_apply_to,
queue_decorators,
remove_user_scope,
semi_durable_route,
topic_trie,
topic_trie_node,
user_admin_to_tags]
and I want [add_ip_to_listener,cluster_name,exchange_event_serial,gm,
internal_system_x,mirrored_supervisor,policy_apply_to,
recoverable_slaves,remove_user_scope,semi_durable_route,
topic_trie,topic_trie_node,user_admin_to_tags,
user_password_hashing]

cloud VM instance broken packages after updating packages to earlier version

I did a apt-get upgrade because the load times of our production server were about 40 seconds. I don't have a snapshot before nor after the upgrade.(Although there is a snapshot of six months old) Load times improved to 15-ish seconds but our erizo service stopped working. Erizo was also running on that instance. Restarting the services didn't help so I tried upgrading the packages to the previous version (https://askubuntu.com/questions/138284/how-to-downgrade-a-package-via-apt-get), just like it was but on almost every package there was an error: the previous package version did not excist.(which is strange, because I copied the output of dpkg -l)
Only a few of them were successfully downgraded but I got a serious error when upgrading e1fslibs to it's previous version.:The following packages have unmet dependencies:
e2fsprogs: PreDepends: e2fslibs
Somehow that messed up initramfs and/or initramfs-tools and now the instance is running but I can't get into it.
Connecting to the instance in google cloud platform :Connecting...
Could not connect, retrying (1/3).
google cloud shell isn't able to gcloud compute ssh : Permission denied (publickey).
using gcloud locally also says Permission denied (publickey).
I checked the following:
There are project public keys defined; there aren't any instance public keys defined or any other metadata ( Google Cloud SSH Keys )
In google cloud platform >> compute engine >> VM instances >> permissions>> I see 'compute' is disabled
verify that the daemon is running by navigating to the serial console output page and looking for output lines prefixed with the accounts-from-metadata: string. If you are using a standard image but you do not see these output prefixes in the serial console output, the daemon might be stopped--> I don't see this so I expect it's NOT running.
check firewall rules:(gcloud compute firewall-rules list)
default-allow-ssh default 0.0.0.0/0 tcp:22 //rule is present
Following packages were upgraded:
apt
apt-transport-https
apt-utils
binutils
cloud-init
cloud-initramfs-growroot
cloud-initramfs-rescuevol
comerr-dev
dosfstools
e2fslibs
e2fsprogs
gce-cloud-config
gce-daemon
gce-imagebundle
gce-startup-scripts
google-cloud-sdk
landscape-client
landscape-common l
ibapt-inst1.4 libapt-pkg4.12
libcomerr2
libss2
libudev0 mountall
nginx
nginx-common
nginx-full
ntp
ntpdate
procps
python-apt
python-apt-common
python-lazr.restfulclient
udev
unattended-upgrades
update-manager-core
upstart
whoopsie
x11-utils
This is get from the serial output ::
- mountall: Event failed
- landscape-client is not configured, please run landscape-config.
What to do next?
Apply a startup script to running instance (following this https://cloud.google.com/compute/docs/startupscript) and try to perform Apt-get upgrade ?
try to create a new public key (again) in google cloud shell to access the instance?
In google cloud shell the first time this file was generated after typing gcloud compute --project "enduring-palace-762" ssh --zone "europe-west1-c" "tta-media-test-2"
WARNING: The private SSH key file for Google Compute Engine does not exist.WARNING: You do not have an SSH key for Google Compute Engine.WARNING: [/usr/bin/ssh-keygen] will be executed to generate a key. This tool needs to create the directory /home/developer/.ssh
the generated public key was stored in /home/developer/.ssh /google_compute_engine.pub I made a copy of that, prepended the username and added the content of the public key to compute engine >> metadata>>ssh keys. *key is accepted but the username doesn't show like it does with all the other username - key pairs
I get Permission denied (publickey) error though when using gcloud compute ssh tta-media-test-2 --zone europe-west1-c
When I provide the ssh key file like this
gcloud compute ssh tta-media-test-2 --zone europe-west1-c --ssh-key-file=my-ssh-keys_copy.pub (pwd is inside the folder where key file is)
WARNING: The public SSH key file for Google Compute Engine does not exist.
WARNING: You do not have an SSH key for Google Compute Engine.
WARNING: [/usr/bin/ssh-keygen] will be executed to generate a key.
I get same result when i generate a new key with ssh-keygen -t rsa -f my-ssh-keys
Any other possible solution would be much appreciated.
[update] I am able to ssh the 'broken' instance from local using ssh user#externalIpOfInstance My plan is to bring it to a upgraded stable state, create a snapshot and see from there..
sudo apt-get -f install
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.99ubuntu13.5) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.13.0-79-generic
E: /usr/share/initramfs-tools/hooks/fixrtc failed with return 1.
update-initramfs: failed for /boot/initrd.img-3.13.0-79-generic with 1.
dpkg: error processing initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
google-chrome-stable
The following packages will be upgraded:
comerr-dev libcomerr2 libss2 unattended-upgrades
4 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 0 B/188 kB of archives.
After this operation, 4,096 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
(Reading database ... 178509 files and directories currently installed.)
Preparing to replace comerr-dev 2.1-1.42-1ubuntu2.2 (using .../comerr-dev_2.1-1.42-1ubuntu2.3_amd64.deb) ...
Unpacking replacement comerr-dev ...
Preparing to replace libcomerr2 1.42-1ubuntu2.2 (using .../libcomerr2_1.42-1ubuntu2.3_amd64.deb) ...
Unpacking replacement libcomerr2 ...
Preparing to replace libss2 1.42-1ubuntu2.2 (using .../libss2_1.42-1ubuntu2.3_amd64.deb) ...
Unpacking replacement libss2 ...
Preparing to replace unattended-upgrades 0.76ubuntu1.1 (using .../unattended-upgrades_0.76ubuntu1.2_all.deb) ...
Unpacking replacement unattended-upgrades ...
Processing triggers for install-info ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up initramfs-tools (0.99ubuntu13.5) ...
update-initramfs: deferring update (trigger activated)
Setting up libcomerr2 (1.42-1ubuntu2.3) ...
Setting up comerr-dev (2.1-1.42-1ubuntu2.3) ...
Setting up libss2 (1.42-1ubuntu2.3) ...
Setting up unattended-upgrades (0.76ubuntu1.2) ...
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.13.0-79-generic
E: /usr/share/initramfs-tools/hooks/fixrtc failed with return 1.
update-initramfs: failed for /boot/initrd.img-3.13.0-79-generic with 1.
dpkg: error processing initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt-get remove initramfs-tools-bin
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
cron : Depends: adduser but it is not going to be installed
procps : Depends: initscripts
upstart : Depends: initscripts
Depends: mountall
Depends: ifupdown (>= 0.6.10ubuntu5)
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
what to do here?
If you were able to SSH into the instance using a given SSH key before, the most likely reason it would stop working is if you somehow removed that SSH key or if the SSH daemon wasn't running/was otherwise broken. It appears as though in the downgrade you broke this machine.
Why do you need this particular VM instance? Does it have important data? If so, you can shut it off, mount its disk using a fresh VM instance, and copy that data off.
If it runs a service, you should probably cut over to a new machine: even if you're able to get into the instance, there's no telling what still works and what doesn't.
i'm facing issue in bigbluebutton insatllation
Reading state information...
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
bigbluebutton : Depends: bbb-config but it is not going to be installed
gce-compute-image-packages : Depends: google-compute-engine but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Cannot generate new REST datasource with Strongloop

I'm new to Loopback, was following this page here: https://docs.strongloop.com/display/public/LB/REST+connector
$ npm install loopback-connector-rest --save
$ slc loopback:datasource
? Enter the data-source name: testrestDS
? Select the connector ...
> REST Services (supported by StrongLoop)
And then I get this error:
events.js:154
throw er; // Unhandled 'error' event
^
TypeError: Cannot set property 'facetName' of undefined
at exports._extend (util.js:770:21)
at module.exports.yeoman.generators.Base.extend.dataSource (/usr/lib/node_modules/strongloop/node_modules/generator-loopback/datasource/index.js:169:18)
at /usr/lib/node_modules/strongloop/node_modules/yeoman-generator/lib/base.js:430:16
at processImmediate [as _immediateCallback] (timers.js:383:17)
I've tried a couple other connector types in the generator and they work (like Mongo even though I don't have that connector installed).
Ubuntu 14.04 64-bit
node v5.7.1
npm v3.6.0
slc v6.0.0
loopback v2.27.0
loopback-connector-rest v1.10.2
I got the same error on my command line, but not in my Docker container based on the strongloop/node image.
In both cases strongloop v6.0.0 but on different versions of node (v0.10.25 versus v0.10.38 in the Docker container) with a different version of generator-loopback (1.16.2 versus 1.20.5 in the Docker container).
I suspect that you need to upgrade to resolve this issue.