RabbitMQ Plugin Dependencies - erlang

I'm setting up a special ubuntu vm for rabbitmq plugin development. I am working through the plugin development guide here: http://www.rabbitmq.com/plugin-development.html
The metronome plugin is working, so I wanted to get the rabbitmq_management plugin working as well.
I set up the necessary symlinks and when I run rabbitmq-plugin enable rabbitmq_management, I get the following error in the console:
% ../scripts/rabbitmq-plugins enable rabbitmq_management
Error: The following dependencies could not be found:
mochiweb
webmachine
I don't know where to put these dependencies (mochiweb, webmachine) so the rabbitmq_management (or it's dependencies) can see them.
I have tried to clone from git and make those projects directly in the rabbitmq-server/plugins directory with no luck

Some plugins depend on other plugins. In this case you need the mochiweb and webmachine plugins. Place them inside the broker plugins folder

I had the same problem:
Error: The following plugins could not be found:
RabbitMQ_management
After a long period, of reinstall, remove and reinstall. The solution is simply that the plugin name is case sensitive. Therefore, check the plugin directory for the correct case. Simply changing the command from:
RabbitMQ-plugins enable RabbitMQ_Management
to
RabbitMQ-plugins enable rabbitmq_management
solved my issue.

Related

Cache folder not writable Bitbucket Docker

I have currently a problem to build and to run my app using bitbucket pipeline:
I have a error about the cache folder which is not writable:
warning Skipping preferred cache folder "/home/node/.cache/yarn" because it is not writable.
warning Skipping preferred cache folder "/tmp/.yarn-cache-1000" because it is not writable.
warning Skipping preferred cache folder "/tmp/.yarn-cache" because it is not writable.
error Yarn hasn't been able to find a cache folder it can use. Please use the explicit --
cache-folder option to tell it what location to use, or make one of the preferred locations
writable.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I'm using a bitbucket-pipelines.yml and a dockerfile.
Thank you
I came across the same problem (also using Docker and Bitbucket Pipelines). Except that I was using k8s to deploy the app.
What I did was change the next line in my deployment to false:
securityContext:
readOnlyRootFilesystem: false (it was `true`)
It solved it for me!

Install dependencies in container using deps.edn

I inherited a clojure code base and I'm trying to containerize it for local development. The creators used deps.edn to manage the dependencies. However, I can't figure out what RUN command I should use to pre-install the dependencies for the project.
Currently, my entrypoint is the following ['clj', '-m', 'app'] which installs the dependencies every time I start the container.
How do I pre-install dependencies for a clojure project using a Docker RUN command?
Deps/CLI caching is described here. Generally speaking, dependencies are downloaded once and saved in a subdirectory of the project directory named
./.cpcache # "class path cache"
The ./.cpcache directory is analagous to the ~/.m2 cache directory used by Maven and related tools (e.g. Leiningen).
If you run the code locally, you should be able to copy the .cpcache dir with its cached dependencies into your Docker container. Then the dependencies don't need to be re-downloaded
for each startup of the Docker container.
See also the Deps/CLI overview.
P.S.
This template project is set up to run using both lein and Deps/CLI via the Kaocha tool. You may find the comparison helpful.
P.P.S.
You may find it easiest to run your code by building an uberjar file which contains all your code and all
dependencies in a single artifact. You can do this either using Leiningen or other tools such as depstar. You then invoke the application with a single command like:
java -jar demo-0.1.0-standalone.jar
Running this should do it:
clj -P

Jenkins Master: Updating plugin data fails

On my Jenkins Master, versio 2.203, when I'm trying to update the plugins, I have this error:
java.security.cert.CertificateException: No subject alternative DNS name matching updates.jenkins.io found.
at java.base/sun.security.util.HostnameChecker.matchDNS(HostnameChecker.java:207)
at java.base/sun.security.util.HostnameChecker.match(HostnameChecker.java:98)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:455)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:429)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:625)
I have tried the option JENKINS_JAVA_OPTIONS ="(..) -Djsse.enableSNIExtension=false" but didn't work.
Any idea what I can do?
Thank you.
Removing -Djsse.enableSNIExtension=false from the Jenkins Java options fixed it for me. On Ubuntu, I went to the etc/default/jenkins file, located JAVA_ARGS and removed -Djsse.enableSNIExtension=false from this line. You need to reboot the mahcine after that for the new settings to get in effect before you try to update the plugins again on Jenkins.

Error "plugin is in use but not enabled" in kong environment

We are trying to use the hello-world plugin described in this page - https://streamdata.io/blog/developing-an-helloworld-kong-plugin/
also we have tried this as well - https://github.com/brndmg/kong-plugin-hello-world
We are facing this error in logs:
2017/09/19 09:47:15 [error] 1#0: init_by_lua error: /usr/local/share/lua/5.1/kong.lua:154: hello-world plugin is in use but not enabled
stack traceback:
[C]: in function 'assert'
/usr/local/share/lua/5.1/kong.lua:154: in function 'init'
init_by_lua:3: in main chunk
The Kong version we are using is 0.11.0.
Can someone suggest what could we be missing?
Kong raises this error because you are asking it to run a plugin called hello-world, without providing the code for this plugin.
This error is trying to say that this plugin is configured to be running on an API/Consumer in the datastore (PostgreSQL or Cassandra), but not added to the Kong configuration custom_plugins settings.
To load a custom plugin, you need two things:
The plugin must be installed in the LUA_PATH (refer to the docs here)
The plugin name must be added to the custom_plugins setting for Kong to load it (from the LUA_PATH)
You can edit your configuration file to make Kong load the plugin:
custom_plugins = hello-world
or specify it via an environment variable:
export KONG_CUSTOM_PLUGINS=hello-world
If you are still seeing this error, it could mean that you are not starting Kong with the configuration file you are editing. Start Kong in verbose mode to see what configuration file it is reading and what is the values of custom_plugins:
$ kong start --vv
You can read more on how to install and custom plugins for 0.11 in the Plugins Development Guide section of the website.
I fixed this issue by adding things in custom_plugins and lua_package_path .
Here are the steps to enable and use custom plugin in kong Env.
1 - Add custom plugin name in --- custom_plugins = hello-world
2 - Install hello-world plugin by using following steps ---
If you have source code of your plugin then move into it and execute the command --- "luarocks make"
it will install your plugin.
now you have to execute a command "make install-dev" make sure your plugin have makefile like as --
Once you execute this command "make install-dev". it will create lua file at a location something like that -
/your-plugin-path/lua_modules/share/lua/5.1/kong/plugins/your-plugin-name/?.lua
just copy this path and add it into the kong configuration file in lua_package_path
Something like that --
lua_package_path=/your-plugin-path/lua_modules/share/lua/5.1/kong/plugins/your-plugin-name/?.lua
Now you done your job.
Just start kong -- kong start --vv
You will see that the plugin loaded into kong plugin env.
#Enjoy

Stop bower from asking for statistics when installing

I'm trying to set up an automated package build for an app which uses bower. When it gets to bower install in the postinstall, bower prompts:
[?] May bower anonymously report usage statistics to improve the tool
over time? (Y/n)
This is screwing up the automated scripts. I could write an expect script to deal with this but I'd rather not if I don't have to. Is there a way to get it to shut up?
As was noted in a comment, this was raised as an issue at github. At the end of that issue there's reference to a minor note at the end of the CHANGELOG comments:
NOTE: It's advisable that users use --config.interactive=false on automated scripts.
You can create a ~/.bowerrc file, which is useful when using bower to install components in a Docker environment:
{
"interactive": false
}
Another option is setting an environment variable (source):
export CI=true
It seems that you could use
bower --config.analytics=false install
to disable only Analytics question.
#see https://github.com/bower/bower/pull/1470
In addition to the existing answers, note that when you are running bower from grunt (e.g. with grunt bower-install-simple, you'll have to add this not into any .bowerrc file, but into the Gruntfile.js. I recently added this line to prevent our CI getting stuck due to unresolvable dependencies:
grunt.initConfig({
...,
/**
* Downloads and installs library dependencies via bower
* defined in bower.json.
*/
'bower-install-simple': {
options: {
...,
+ interactive: false
}
}
});
General way to bypass input for most commands: yes.
yes | bower install
yes | grunt build

Resources