decanter framework doesnt work as expected in OpenDaylight Karaf shell - opendaylight

I was looking for logging frameworks available in OpenDaylight Controller.
Something similar to ELK stack.
I found apache decanter as a possible way to do this.
https://karaf.apache.org/manual/decanter/latest-1/
The problem is that it works fine with normal karaf shell but doesnt work so with the ODL karaf shell of Oxygen SR4 release.
As per the documentation,
https://karaf.apache.org/download.html#decanter-installation
feature:repo-add decanter
feature:install decanter-appender-elasticsearch
feature:install decanter-collector-log
feature:install decanter-collector-jmx
I tried the same in ODL karaf shell.
I downloaded the Oxygen-SR4 binary and started the karaf shell.
./karaf clean Apache Karaf starting up. Press Enter to open the shell now... 100% [========================================================================]
Karaf started in 0s. Bundle stats: 13 active, 13 total
________ ________ .__ .__ .__ __
\_____ \ ______ ____ ____ \______ \ _____ ___.__.| | |__| ____ | |___/ |_
/ | \\____ \_/ __ \ / \ | | \\__ \< | || | | |/ ___\| | \ __\
/ | \ |_> > ___/| | \| ` \/ __ \\___ || |_| / /_/ > Y \ |
\_______ / __/ \___ >___| /_______ (____ / ____||____/__\___ /|___| /__|
\/|__| \/ \/ \/ \/\/ /_____/ \/
Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.
opendaylight-user#root>system:version
4.1.6
opendaylight-user#root>feature:repo-add decanter Adding feature url
opendaylight-user#root>feature:install decanter-appender-elasticsearch
org.apache.karaf.features.core[org.apache.karaf.features.internal.service.FeaturesServiceImpl] : null
But the same thing works with plain apache karaf shell.
./karaf
__ __ ____
/ //_/____ __________ _/ __/
/ ,< / __ `/ ___/ __ `/ /_
/ /| |/ /_/ / / / /_/ / __/
/_/ |_|\__,_/_/ \__,_/_/
Apache Karaf (4.2.5)
Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
karaf#root()> feature:repo-add decanter Adding feature url mvn:org.apache.karaf.decanter/apache-karaf-decanter/RELEASE/xml/features karaf#root()> feature:install decanter-appender-elasticsearch karaf#root()>
Can anyone point out what is missing here because I feel the shell versions are similar?
Can you also suggest some other logging frameworks to process Karaf logs and data in OpenDaylight Controller(Oxygen SR4) something similar to ELK stack.

we use decanter in upstream OpenDaylight system testing. the features we
install (using the featuresBoot variable in etc/org.apache.karaf.features.cfg are:
odl-jolokia,decanter-collector-jmx,decanter-appender-elasticsearch
but, we also configure the featuresRepositories to have:
mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.0.0/xml/features
here is a wiki page with some extra info.
here is an example of us grabbing data to find Mem Usage and we also
install elasticsearch which lets us see it as a graph over time
Hope it helps.

Related

Is A docker image built by Spring Boot 2.3 better than the one by jib?

So far, I user Spring Boot 2.2 and use jib to build a docker image.
But now, Spring Boot 2.3 released and the
Release Notes says that Spring Boot 2.3 can build a Docker image with Paketo buildpack by default.
Spring Boot 2.3 enhances Docker support with new features
This article says that Spring Boot 2.3 will allow for more efficient Docker builds.
I tried to build a docker image with Spring Boot 2.3.
As bellow, Spring Boot 2.3 can build an image with some jvm options by default to optimize memory.
Container memory limit unset. Configuring JVM for 1G container.
Calculated JVM Memory Configuration: -XX:MaxDirectMemorySize=10M -XX:MaxMetaspaceSize=83555K -XX:ReservedCodeCacheSize=240M -Xss1M -Xmx453020K (Head Room: 0%, Loaded Class Count: 12338, Thread Count: 250, Total Memory: 1.0G)
Adding 127 container CA certificates to JVM truststore
Spring Cloud Bindings Boot Auto-Configuration Enabled
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.3.1.RELEASE)
My Question:
Is A docker image built by Spring Boot 2.3 better than the one by jib?
Not better, but different. Jib can build the image without docker installation.
Spring docker build unpack the jar (slightly better on startup) and put dependencies into a layer. When you build new version, it can reuse those layers (if dependencies not changed), so it just create one layer with your app (which size is way less then the dependencies' size). This cause that the build will be faster. But you have to install local docker.

Starting newer Karaf (4.2.8) on linux, feature:repo-add camel does not work

maybe somebody can help me.
I, was testing karaf in my local windows laptop an everything work fine. But now I'm trying to install it on Centos Linux server, but Im not getting the same results.
My steps:
1-Donwload Karaf from http://www.apache.org/dyn/closer.lua/karaf/4.2.8/apache-karaf-4.2.8.tar.gz
2- Unzipped in the centos linux path: /usr/local/apache-karaf-4.2.8
3- Check the java version installed in the server
JAVA_HOME=/usr/local/jdk1.8.0_251
PATH=.../usr/local/jdk1.8.0_251/jre/bin..
4- run sudo ./bin/karaf and then
karaf: JAVA_HOME not set; results may vary
__ __ ____
/ //_/____ __________ _/ __/
/ ,< / __ / ___/ __/ /_
/ /| |/ // / / / // / __/
// ||__,// __,//
Apache Karaf (4.2.8)
Anyway the shell become active, but I tried to add features and I receved this error ( It doesn't seem to be related to the previous message)
karaf#root()> feature:repo-add camel
Adding feature url mvn:org.apache.camel.karaf/apache-camel/RELEASE/xml/features
Error executing command: Error resolving artifact org.apache.camel.karaf:apache-camel:xml:features:RELEASE: [Failed to resolve version for org.apache.camel.karaf:apache-camel:xml:features:RELEASE: Could not find metadata org.apache.camel.karaf:apache-camel/maven-metadata.xml in local (/root/.m2/repository)] : mvn:org.apache.camel.karaf/apache-camel/RELEASE/xml/features
I did the same on my PC and everything worked perfectly. Im missing something specific for Linux ? Any Idea?
Thanks in advance
Karaf uses etc/org.ops4j.pax.url.mvn.cfg to list all the m2 repos from where he can downloads your bundles/features.
By default, the value for this distribution is :
org.ops4j.pax.url.mvn.repositories= \
https://repo1.maven.org/maven2#id=central, \
https://repository.apache.org/content/groups/snapshots-group#id=apache#snapshots#noreleases, \
https://oss.sonatype.org/content/repositories/ops4j-snapshots#id=ops4j.sonatype.snapshots.deploy#snapshots#noreleases
However, in your case, it seems it tries to get it from /root/.m2/repository. Could you check your etc/org.ops4j.pax.url.mvn.cfg and see if there is no modification to it ?

Angular CLI "ng serve" fails after upgrade to 7.3.8

I am new to Angular CLI. My background is in C# ASP.NET. I recently spun up a ASP.NET Core app with Angular CLI through the project wizard of Visual Studio. All that I needed to do to get things working on http://localhost:4200 was to run npm install #angular/cli
and then
ng serve
and I was good to go.
To get the latest stable release of Angular, I then ran
ng update
Now, ng serve returns the error "The serve command requires to be run in an Angular project, but a project definition could not be found."
Also, one other observation is that the $schema reference to schema.json from the .angular-cli.json file is no longer available in the path "./node_modules/#angular/cli/lib/config/schema.json". The config folder is completely missing and I've read that it the config folder was eliminated in a previous version.
My question, is how do i change my .angular-cli.json or other project files to conform to the new standard?
Below is a screenshot of my current versions.
C:\Users\andrew.kirby\source\repos\SchoolsList\SchoolsList\ClientApp>ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 7.3.8
Node: 10.9.0
OS: win32 x64
Angular: 7.2.14
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
Package Version
------------------------------------------------------
#angular-devkit/architect 0.13.8
#angular-devkit/core 7.3.8
#angular-devkit/schematics 7.3.8
#angular/cli 7.3.8
#schematics/angular 7.3.8
#schematics/update 0.13.8
rxjs 6.5.1
typescript 3.2.4

Spring Roo 2.0.0.RC1 doesn't know its own version number

When I start roo.sh, the command logs a lot of error about the version of libraries and the Roo version:
$ /opt/apps/ggg/spring-roo-2.0.0.RC1/bin/roo.sh
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: com.github.antlrjavaparser.antlr-java-parser:1.0.15
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.commons.codec:1.8.0
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.commons.io:2.4.0
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.commons.lang3:3.1.0
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.fusesource.jansi:1.6.0
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.jsoup:1.9.1
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.aries.subsystem.api:2.0.8
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.aries.subsystem.core:2.0.8
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.aries.util:1.1.1
... More "Auto-deploy" warnings and finally ...
_
___ _ __ _ __(_)_ __ __ _ _ __ ___ ___
/ __| '_ \| '__| | '_ \ / _` | | '__/ _ \ / _ \
\__ \ |_) | | | | | | | (_| | | | | (_) | (_) |
|___/ .__/|_| |_|_| |_|\__, | |_| \___/ \___/
|_| |___/ UNKNOWN VERSION
Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
roo>
And if I create a project, the Spring Roo's version in the pom.xml file created is UNKNOWN VERSION:
<properties>
<roo.version>UNKNOWN VERSION</roo.version>
Then, if I fix the file setting the 2.0.0 RC1 version, when I start again the Roo console, it shows me:
...
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.springframework.roo.wrapping.snakeyaml:1.15.1
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: slf4j.api:1.7.12
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: slf4j.jdk14:1.7.12
_
___ _ __ _ __(_)_ __ __ _ _ __ ___ ___
/ __| '_ \| '__| | '_ \ / _` | | '__/ _ \ / _ \
\__ \ |_) | | | | | | | (_| | | | | (_) | (_) |
|___/ .__/|_| |_|_| |_|\__, | |_| \___/ \___/
|_| |___/ UNKNOWN VERSION
Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
WARNING: You are using Spring Roo UNKNOWN VERSION, but project was generated using Spring Roo 2.0.0 RC1.
If you continue with the execution your project might suffer some changes.
Do you want to continue opening Spring Roo Shell?(YES/No)
How can I fix this issue with the version? Is there a file where I can setup the version number?
I've saw that you're executing the roo.sh script in the following folder:
/opt/apps/ggg
Do you have admin permissions in that folder? Could you try to execute the roo.sh script inside ~/apps/ggg folder?
Let me know if that helps you.
Regards
I found the problem: Spring Roo uses the name of the folder where is contained to known its own version. After rename the folder /opt/apps/ggg/roo to /opt/apps/ggg/spring-roo-2.0.0.RC1 worked as expected.
I known that the original name in the distribution file downloaded from http://projects.spring.io/spring-roo/ was spring-roo-2.0.0.RC1 (I renamed it when I uncompressed the zip into /opt/apps/ggg), but I never thought that Spring used the folder name to known the version, and to be honest, I never saw a behavior like this, but renaming the folder name solve the problem.
Thanks for the help.

Why Spring Roo is showing only a single addon?

Running addon search --refresh returns only a single result:
roo> addon search --refresh
Successfully downloaded Roo add-on Data
1 found, sorted by rank; T = trusted developer; R = Roo 1.2 compatible
ID T R DESCRIPTION -------------------------------------------------------------
01 - Y 0.1.0.BUILD Hindi language support for Spring Roo Web MVC JSP
Scaffolding; #mvc,#localization,locale:hi
--------------------------------------------------------------------------------
I am using spring-roo version 1.2.2
roo> version
____ ____ ____
/ __ \/ __ \/ __ \
/ /_/ / / / / / / /
/ _, _/ /_/ / /_/ /
/_/ |_|\____/\____/ 1.2.2.RELEASE [rev 7d75659]
There have been a handful of problems with the addon repository in recent months - see here, for example. The (somewhat annoying) workaround is that if you can locate the URL for an addon you're interested in, you can still load it via the 'osgi obr url add' and 'osgi obr deploy' commands. You can see an example here.

Resources