I'm trying to configure a dynamic shovel on RabbitMQ 3.2.3 after installing the Shovel plugin. However, when I run the following command:
rabbitmqctl set_parameter shovel test-shovel '{"src-uri": "amqp://", "src-queue": "queueName", "dest-uri": "amqp://user:password#host", "dest-queue": "queueName"}'
...I get this error message:
Error: Validation failed
component shovel not found
The plugin appears to be installed correctly. If I run:
rabbitmq-plugins list
...I get:
[e] amqp_client 3.2.3
[ ] cowboy 0.5.0-rmq3.2.3-git4b93c2d
[ ] eldap 3.2.3-gite309de4
[e] mochiweb 2.7.0-rmq3.2.3-git680dba8
[ ] rabbitmq_amqp1_0 3.2.3
[ ] rabbitmq_auth_backend_ldap 3.2.3
[ ] rabbitmq_auth_mechanism_ssl 3.2.3
[ ] rabbitmq_consistent_hash_exchange 3.2.3
[ ] rabbitmq_federation 3.2.3
[ ] rabbitmq_federation_management 3.2.3
[ ] rabbitmq_jsonrpc 3.2.3
[ ] rabbitmq_jsonrpc_channel 3.2.3
[ ] rabbitmq_jsonrpc_channel_examples 3.2.3
[E] rabbitmq_management 3.2.3
[e] rabbitmq_management_agent 3.2.3
[ ] rabbitmq_management_visualiser 3.2.3
[ ] rabbitmq_mqtt 3.2.3
[E] rabbitmq_shovel 3.2.3
[E] rabbitmq_shovel_management 3.2.3
[ ] rabbitmq_stomp 3.2.3
[ ] rabbitmq_tracing 3.2.3
[e] rabbitmq_web_dispatch 3.2.3
[ ] rabbitmq_web_stomp 3.2.3
[ ] rabbitmq_web_stomp_examples 3.2.3
[ ] rfc4627_jsonrpc 3.2.3-git5e67120
[ ] sockjs 0.3.4-rmq3.2.3-git3132eb9
[e] webmachine 1.10.3-rmq3.2.3-gite9359c7
Also, if I run:
rabbitmqctl eval 'rabbit_shovel_status:status().'
...I get:
[]
...done.
Any ideas?! Thanks in advance!
Looks like dynamic shovels were added in 3.3.0, doh! We're still on 3.2.3.
http://www.rabbitmq.com/release-notes/README-3.3.0.txt
Ok,
Typically this behavior is when you install a plug-in and you don't restart RabbitMQ server.
Restart RMQ is mandatory.
This can also occur due to a race condition in RMQ versions prior to 3.8.6. Until 3.8.6, loading static definitions could happen before plugins were activated, causing this validation error. For more information, see GitHub issue rabbitmq/rabbitmq-server#2384.
Related
I am using junit5 standalone platform launcher and I want to execute the same test class several times using the command line of junit-platform-console-standalone-1.9.2.jar.
I tried repeating (as per junit5 documentation) --select-class argument, i.e:
java -jar junit-platform-console-standalone-1.5.2.jar --select-class=com.pcbsys.nirvana.nJMS.JMSQueueTxSessionConsumerTest --select-class=com.pcbsys.nirvana.nJMS.JMSQueueTxSessionConsumerTest --include-engine=junit-vintage --include-engine=junit-jupiter -cp ...
This yields:
Test run finished after 67368 ms
[ 3 containers found ]
[ 0 containers skipped ]
[ 3 containers started ]
[ 0 containers aborted ]
[ 2 containers successful ]
[ 1 containers failed ]
[ 1 tests found ]
[ 0 tests skipped ]
[ 1 tests started ]
[ 0 tests aborted ]
[ 0 tests successful ]
[ 1 tests failed ]
I can see that the test is executed only once (it is a failing test).
I also tried
--select-iteration=class:com.pcbsys.nirvana.nJMS.JMSQueueTxSessionConsumerTest[2]
but this syntax aims at parametrized tests, so was not the right for me.
Any ideas what needs fixing?
We are currently using AWS Device Farm for testing android applications. Using AWS device farm, first the apk is built. Then, the required artifacts are placed in the testing device's scoped storage. Then, the application is ran(which uses these artifacts).
Lately, I have been facing the following issue when trying to push the artifacts:
(Consider my app's package is "com.myapp")
[ 5%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[ 11%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[ 16%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[ 22%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[ 27%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[ 33%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[ 38%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[ 44%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[ 49%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[ 55%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[ 60%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[ 66%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[ 71%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[ 77%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[ 82%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[ 88%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[ 93%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[ 99%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
[100%] /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
adb: error: failed to copy 'scripts.zip' to '/sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip': remote secure_mkdirs failed: Permission denied
on GOOGLE PIXEL 5 (UNLOCKED) OS 11
Whereas the same logic worked on a few set of devices:
SAMSUNG GALAXY S20 (UNLOCKED) 10
SAMSUNG GALAXY S9 (UNLOCKED) 9
The following command is run to push the scripts.zip file:
adb push scripts.zip /sdcard/Android/data/com.myapp/files/MyFolder/scripts.zip
I read a lot of articles about this error but all of them were using rooted device. Thus on running certain commands, they were able to fix it. In my case, aws cloud contains real device on which the testcases are run and thus rooting the device is not possible.
My requirement is to push the artifact into the scoped storage of my own application using cmd commands.
Thank you in advance.
The scoped storage location of your own app on Pixel devices is
/data/data/com.myapp/files
to copy a file into this folder you can copy it into a temporary location:
adb push scripts.zip /data/local/tmp/scripts.zip
then copy the uploaded file into the app's private location:
adb shell run-as com.myapp cp /data/local/tmp/scripts.zip .
I'm using the complied library of jars of a java project and trying to run a junit 5 test via console launcher. Same test works when i right click and run as junit test but via console launcher it throws the below error.
This is what i'm using to compile the program and it complies without errors
javac -encoding UTF8 -cp /abc/Junit/lib/*:/var/Unit/lib/* /abc/Unit/ /Junit/test/BuildTest.java
and this is how I run the tests
java -jar /abc/Junit/lib/junit-platform-console-standalone-1.6.0.jar --classpath /abc/Junit/lib/*:/abc/Unit/lib/*:/abc/Junit/test --include-classname ".*" --scan-classpath
This is error I'm getting
Thanks for using JUnit! Support its development at https://junit.org/sponsoring
.
+-- JUnit Jupiter [OK]
| '-- buildTests [X] com.build.Info
'-- JUnit Vintage [OK]
Failures (1):
JUnit Jupiter:buildTests
ClassSource [className = 'com.buildTests', filePosition = null]
=> java.lang.NoClassDefFoundError: com.build.VersionInfo
java.lang.Class.getDeclaredFields(Class.java:868)
org.junit.platform.commons.util.ReflectionUtils.getDeclaredFields(ReflectionUtils.java:1334)
org.junit.platform.commons.util.ReflectionUtils.findAllFieldsInHierarchy(ReflectionUtils.java:1092)
org.junit.platform.commons.util.ReflectionUtils.findFields(ReflectionUtils.java:1080)
org.junit.platform.commons.util.AnnotationUtils.findAnnotatedFields(AnnotationUtils.java:371)
[...]
Caused by: java.lang.ClassNotFoundException: com.build.VersionInfo
java.net.URLClassLoader.findClass(URLClassLoader.java:610)
java.lang.ClassLoader.loadClassHelper(ClassLoader.java:935)
java.lang.ClassLoader.loadClass(ClassLoader.java:880)
java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:1225)
java.lang.ClassLoader.loadClass(ClassLoader.java:863)
[...]
Test run finished after 73 ms
[ 3 containers found ]
[ 0 containers skipped ]
[ 3 containers started ]
[ 0 containers aborted ]
[ 2 containers successful ]
[ 1 containers failed ]
[ 1 tests found ]
[ 0 tests skipped ]
[ 0 tests started ]
[ 0 tests aborted ]
[ 0 tests successful ]
[ 0 tests failed ]
Finally, was able to figure out why the error is thrown. Issue was not giving the actual jar and using wild card while running the test. It has to be blah/lib/core.jar not blah/lib/*. Hope this helps someone in the future.
I'm new to SaltStack and I'm working on a build to deploy tomcat and tomcat war files to Ubuntu 16.04 systems. I haven't ran into any issues until my first attempt at deploying a war file with tomcat.war_deployed. If anyone with more experience with SaltStack that could provide me any feedback I'd greatly appreciate it.
/srv/pillar/top.sls
base:
'*':
- tomcat-manager
/srv/pillar/tomcat-manager.sls
tomcat-manager:
user: 'myuser'
passwd: 'mypassword'
Output of salt '*' pillar.test
tomcat-manager:
------------
passwd:
mypassword
user:
myuser
mystate.sls
# Install tomcat8 packages.
install_tomcat:
pkg.installed:
- pkgs:
- tomcat8
- tomcat8-admin
# Install postgresql packages.
install_postgresql:
pkg.installed:
- name: postgresql-9.5
# Start tomcat service.
start_service_tomcat:
service.running:
- name: tomcat8
- enable: True
- require:
- pkg: install_tomcat
- watch:
- file: sync tomcat-users.xml
# Tomcat deploy war files.
deploy_war:
tomcat.war_deployed:
- name: /mywar
- war: salt://files/tomcat/war/mywar.war
- require:
- service: start_service_tomcat
# Start postgresql service.
start_service_postgresql:
service.running:
- name: postgresql
- enable: True
- require:
- pkg: install_postgresql
- watch:
- file: sync pg_hba.conf
- file: sync postgresql.conf
Output of salt '*' state.sls mystate
----------
ID: deploy_war
Function: tomcat.war_deployed
Name: /mywar
Result: False
Comment: F
a
i
l
e
d
t
o
c
r
e
a
t
e
H
T
T
P
r
e
q
u
e
s
t
Started: 15:54:02.314254
Duration: 1980.229 ms
Changes:
[...]
Failed: 1
-------------
Total states run: 12
Total run time: 2.671 s
ERROR: Minions returned with non-zero exit code
Updates
myminion:8080/manager is accessible on my minion(s).
I haven't been able to find if SaltStack officially supports Tomcat8 so I decided to test this with Tomcat7 and it's giving me the same issue.
When I run salt '*' tomcat.version on the minions:
myminion:
Apache Tomcat/7.0.68 (Ubuntu)
myminion2:
Apache Tomcat/8.0.32 (Ubuntu)
Output of salt '*' tomcat.status:
myminion:
False
myminion1:
False
Output of salt '*' tomcat.serverinfo:
myminion:
----------
error:
Failed to create HTTP request
myminion1:
----------
error:
Failed to create HTTP request
I haven't had any luck with search engines for Failed to create HTTP request yet.
Output of sudo salt-call -l debug tomcat.serverinfo:
[DEBUG ] Reading configuration from /etc/salt/minion
[DEBUG ] Including configuration from '/etc/salt/minion.d/_schedule.conf'
[DEBUG ] Reading configuration from /etc/salt/minion.d/_schedule.conf
[DEBUG ] Using cached minion ID from /etc/salt/minion_id: myminion
[DEBUG ] Configuration file path: /etc/salt/minion
[WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
[DEBUG ] Reading configuration from /etc/salt/minion
[DEBUG ] Including configuration from '/etc/salt/minion.d/_schedule.conf'
[DEBUG ] Reading configuration from /etc/salt/minion.d/_schedule.conf
[WARNING ] Unable to find IPv6 record for "myminion" causing a 10 second timeout when rendering grains. Set the dns or /etc/hosts for IPv6 to clear this.
[DEBUG ] Please install 'virt-what' to improve results of the 'virtual' grain.
[DEBUG ] Connecting to master. Attempt 1 of 1
[DEBUG ] Initializing new AsyncAuth for ('/etc/salt/pki/minion', 'myminion', 'tcp://mymaster:4506')
[DEBUG ] Generated random reconnect delay between '1000ms' and '11000ms' (7330)
[DEBUG ] Setting zmq_reconnect_ivl to '7330ms'
[DEBUG ] Setting zmq_reconnect_ivl_max to '11000ms'
[DEBUG ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'myminion', 'tcp://mymaster:4506', 'clear')
[DEBUG ] Decrypting the current master AES key
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG ] SaltEvent PUB socket URI: /var/run/salt/minion/minion_event_bbef5074cf_pub.ipc
[DEBUG ] SaltEvent PULL socket URI: /var/run/salt/minion/minion_event_bbef5074cf_pull.ipc
[DEBUG ] Initializing new IPCClient for path: /var/run/salt/minion/minion_event_bbef5074cf_pull.ipc
[DEBUG ] Sending event: tag = salt/auth/creds; data = {'_stamp': '2017-05-04T18:14:04.328838', 'creds': {'publish_port': 4505, 'aes': '######/#####/###############################################=', 'master_uri': 'tcp://mymaster:4506'}, 'key': ('/etc/salt/pki/minion', 'myminion', 'tcp://mymaster:4506')}
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG ] Determining pillar cache
[DEBUG ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'myminion', 'tcp://mymaster:4506', 'aes')
[DEBUG ] Initializing new AsyncAuth for ('/etc/salt/pki/minion', 'myminion', 'tcp://mymaster:4506')
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG ] LazyLoaded jinja.render
[DEBUG ] LazyLoaded yaml.render
[DEBUG ] LazyLoaded tomcat.serverinfo
[DEBUG ] Initializing new AsyncZeroMQReqChannel for ('/etc/salt/pki/minion', 'myminion', 'tcp://mymaster:4506', 'aes')
[DEBUG ] Initializing new AsyncAuth for ('/etc/salt/pki/minion', 'myminion', 'tcp://mymaster:4506')
[DEBUG ] LazyLoaded nested.output
local:
----------
error:
Failed to create HTTP request
Output of salt-call test.versions:
[WARNING ] Unable to find IPv6 record for "dt-rhettvm-01" causing a 10 second timeout when rendering grains. Set the dns or /etc/hosts for IPv6 to clear this.
local:
Salt Version:
Salt: 2016.11.4
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.4.2
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 1.0.3
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.12 (default, Nov 19 2016, 06:48:10)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.2.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: Ubuntu 16.04 xenial
machine: x86_64
release: 4.4.0-62-generic
system: Linux
version: Ubuntu 16.04 xenia
What worked for me was restarting the tomcat instance on the minion.
The tomcat instance could be running with the old user parameters.
The NUnit-console 2.6.3 sometimes prints out the following error message instead of running tests. Here is excerpt from my Jenkins test build logs:
00:05:02.982 Process 'nunit-console-x86' [PID 3684] has begun profiling.
00:05:03.698 NUnit-Console version 2.6.3.13283
00:05:03.698 Copyright (C) 2002-2012 Charlie Poole.
00:05:03.698 Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
00:05:03.698 Copyright (C) 2000-2002 Philip Craig.
00:05:03.698 All Rights Reserved.
00:05:03.698
00:05:03.698 Runtime Environment -
00:05:03.701 OS Version: Microsoft Windows NT 6.1.7601 Service Pack 1
00:05:03.701 CLR Version: 2.0.50727.5485 ( Net 3.5 )
00:05:03.701
00:05:03.795 ProcessModel: Default DomainUsage: Single
00:05:03.795 Execution Runtime: net-3.5
00:05:33.886 Unable to locate fixture
00:05:33.895 Process 'nunit-console-x86' [PID 3684] has finished profiling.
It happens randomly. I do not change the test assembly or the NUnit configuration. I run NUnit via NCover, but the same problem repeats when I use NUnit alone from the command line.
After enabling the verbose logging in NUnit I noticed that the nunit-agent process prints out its first messages to the log more than half a minute after it was run by the nunit-console. I found out from the source code that nunit-console waits 30 seconds for the spawned nunit-agent process to register itself. Apparently something delays loading nunit-agent so the timeout is hit in nunit-console causing the "Unable to locate fixture ". The nunit-agent process is still running after that and I have to kill it manually.
NUnit-console log:
InternalTrace: Initializing at level Verbose
09:14:08.992 Info [ 1] Runner: NUnit-console.exe starting
09:14:09.006 Debug [ 1] ServiceManager: Added SettingsService
09:14:09.006 Debug [ 1] ServiceManager: Added DomainManager
09:14:09.007 Debug [ 1] ServiceManager: Added ProjectService
09:14:09.007 Debug [ 1] ServiceManager: Added AddinRegistry
09:14:09.007 Debug [ 1] ServiceManager: Added AddinManager
09:14:09.007 Debug [ 1] ServiceManager: Added TestAgency
09:14:09.008 Info [ 1] ServiceManager: Initializing SettingsService
09:14:09.008 Info [ 1] ServiceManager: Initializing DomainManager
09:14:09.008 Info [ 1] ServiceManager: Initializing ProjectService
09:14:09.008 Info [ 1] ServiceManager: Initializing AddinRegistry
09:14:09.008 Info [ 1] ServiceManager: Initializing AddinManager
09:14:09.009 Debug [ 1] ServiceManager: Request for service IAddinRegistry satisfied by AddinRegistry
09:14:09.017 Info [ 1] ServiceManager: Initializing TestAgency
09:14:09.041 Debug [ 1] ServiceManager: Request for service ProjectService satisfied by ProjectService
09:14:09.054 Debug [ 1] RuntimeFrameworkSelector: Current framework is net-3.5
09:14:09.054 Debug [ 1] RuntimeFrameworkSelector: No specific framework requested
09:14:09.054 Debug [ 1] ServiceManager: Request for service ISettings satisfied by SettingsService
09:14:09.058 Debug [ 1] RuntimeFrameworkSelector: Assembly D:\Jenkins\jobs\Job1\GreyBoxTests\bin\Debug\GreyBoxTests.dll uses version 4.0.30319
09:14:09.064 Debug [ 1] ServiceManager: Request for service TestAgency satisfied by TestAgency
09:14:09.065 Debug [ 1] RuntimeFrameworkSelector: Test will use net-4.0 framework
09:14:09.066 Info [ 1] ProcessRunner: Loading GreyBoxTests.dll
09:14:09.067 Info [ 1] TestAgency: Getting agent for use under net-4.0
09:14:09.070 Debug [ 1] TestAgency: Using nunit-agent at c:\Program Files (x86)\NUnit 2.6.3\bin\nunit-agent-x86.exe
09:14:09.091 Info [ 1] TestAgency: Launched Agent process 7240 - see nunit-agent_7240.log
09:14:09.091 Info [ 1] TestAgency: Command line: "c:\Program Files (x86)\NUnit 2.6.3\bin\nunit-agent-x86.exe" 65bc321d-e7dc-4a98-81e6-919b87d5c783 tcp://127.0.0.1:56614/TestAgency
09:14:09.091 Debug [ 1] TestAgency: Waiting for agent {65bc321d-e7dc-4a98-81e6-919b87d5c783} to register
09:14:39.091 Info [ 1] Runner: NUnit-console.exe terminating
NUnit-agent log:
InternalTrace: Initializing at level Verbose
09:14:41.859 Info [ 1] NUnitTestAgent: Agent process 7240 starting
09:14:41.876 Info [ 1] NUnitTestAgent: Running under version 4.0.30319.18444, Net 4.5
09:14:41.876 Info [ 1] NUnitTestAgent: Adding Services
09:14:41.876 Debug [ 1] ServiceManager: Added SettingsService
09:14:41.877 Debug [ 1] ServiceManager: Added ProjectService
09:14:41.877 Debug [ 1] ServiceManager: Added DomainManager
09:14:41.877 Debug [ 1] ServiceManager: Added AddinRegistry
09:14:41.877 Debug [ 1] ServiceManager: Added AddinManager
09:14:41.877 Info [ 1] NUnitTestAgent: Initializing Services
09:14:41.878 Info [ 1] ServiceManager: Initializing SettingsService
09:14:41.878 Info [ 1] ServiceManager: Initializing ProjectService
09:14:41.878 Info [ 1] ServiceManager: Initializing DomainManager
09:14:41.878 Info [ 1] ServiceManager: Initializing AddinRegistry
09:14:41.878 Info [ 1] ServiceManager: Initializing AddinManager
09:14:41.879 Debug [ 1] ServiceManager: Request for service IAddinRegistry satisfied by AddinRegistry
09:14:41.906 Info [ 1] NUnitTestAgent: Connecting to TestAgency at tcp://127.0.0.1:56614/TestAgency
09:14:41.907 Info [ 1] NUnitTestAgent: Starting RemoteTestAgent
09:14:41.908 Info [ 1] RemoteTestAgent: Agent starting
Any NUnit experts could help me with this?
Potential workaround, suggested by Charlie in that Google Groups thread:
One way to avoid this is to stop using the agent. Change the config file
(nunit-console-x86.exe.config) to use the 4.0 CLR before the 2.0 CLR. Then
the test will run in the same process and no agent will be created.
I have confirmed that adding <supportedRuntime version="v4.0.30319" /> inside <startup> in the nunit-console.exe.config file (or nunit-console-x86.exe.config), and removing <supportedRuntime version="v2.0.50727" (if present) does cause my tests to run without spawning an nunit-agent.exe process. I have not confirmed whether that fixes the error "unable to locate fixture" in my case, but the OP (krzysiek_w) did confirm it in the same thread:
I was not aware of the possibility to run tests in nunit-console without the nunit-agent. After setting the supported framework in the nunit-console config file, the tests execute without creating the separate process which completely fixes the problem.
As an additional note, the option /trace=Verbose can be passed to NUnit to get more info, as krzysiek_w did in that thread. For me, those logs are output to C:\Users\(myuser)\AppData\Local\NUnit\logs.