How to config throttling in wso2 4.0.0 active-active deployment pattern - wso2-api-manager

I follow this doc
to configure an Active-Active API-M Deployment, but it fails when run command api-manager.sh.
[root#localhost bin]# ./api-manager.sh
JAVA_HOME environment variable is set to /usr/java/jdk1.8.0_191
CARBON_HOME environment variable is set to /home/wso2/wso2am-4.0.0
Using Java memory options: -Xms256m -Xmx1024m
[2022-03-13 10:55:04,145] SEVERE {org.wso2.carbon.server.Main handleConfiguration} - Error
while perfo
rming configuration changes org.wso2.config.mapper.ConfigParserException: Error while reading
metadata
at org.wso2.config.mapper.MetaDataParser.readLastModifiedValue(MetaDataParser.java:76)
at org.wso2.config.mapper.MetaDataParser.getChangedFiles(MetaDataParser.java:164)
at org.wso2.config.mapper.ConfigParser.parse(ConfigParser.java:108)
at org.wso2.carbon.server.Main.handleConfiguration(Main.java:236)
at org.wso2.carbon.server.Main.main(Main.java:107)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:69)
at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:51)
Caused by: java.io.FileNotFoundException: /home/wso2/wso2am-
4.0.0/repository/deployment/server/eventpub
lishers/jmsEventPublisher2.xml (No such file or directory) at j
ava.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.(FileInputStream.java:138)
at org.wso2.config.mapper.MetaDataParser.getMetadata(MetaDataParser.java:97)
at org.wso2.config.mapper.MetaDataParser.readLastModifiedValue(MetaDataParser.java:74)
... 10 more
Do i miss anything?

Related

How to set empty context root for payara micro?

my app works with payara server without setting any context root but payara micro is setting default context root as name of my war file. How do I set context root to empty in case ot payara micro ?
one of the way is to set war name as ROOT.war but with that name i get following error while deploying. I tried putting xerces-2.9.1 jar in --addLibs but doesnt work.
2020-08-20T21:36:53.110+0200] [] [SEVERE] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1597952213110] [levelValue: 1000] [[
Exception while invoking class com.sun.enterprise.web.WebApplication start method
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.AbstractMethodError
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:136)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:123)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:280)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:344)
at com.sun.enterprise.v3.server.ApplicationLifecycle.initialize(ApplicationLifecycle.java:584)
at fish.payara.deployment.admin.InitializeAllApplicationsCommand.execute(InitializeAllApplicationsCommand.java:75)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:558)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:554)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:553)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:584)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:576)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:575)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1496)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:120)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1878)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1754)
at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:183)
at com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.run(CommandExecutorImpl.java:96)
at fish.payara.micro.impl.PayaraMicroImpl.bootStrap(PayaraMicroImpl.java:1063)
at fish.payara.micro.impl.PayaraMicroImpl.create(PayaraMicroImpl.java:211)
at fish.payara.micro.impl.PayaraMicroImpl.main(PayaraMicroImpl.java:200)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at fish.payara.micro.boot.loader.MainMethodRunner.run(MainMethodRunner.java:50)
at fish.payara.micro.boot.loader.Launcher.launch(Launcher.java:114)
at fish.payara.micro.boot.loader.Launcher.launch(Launcher.java:73)
at fish.payara.micro.boot.PayaraMicroLauncher.create(PayaraMicroLauncher.java:87)
at fish.payara.micro.boot.PayaraMicroLauncher.main(PayaraMicroLauncher.java:71)
at fish.payara.micro.PayaraMicro.main(PayaraMicro.java:397)
]]
First thing, you shouldn't get an error just because you rename your application to ROOT.war. If that happens on the latest version of Payara Micro, you should raise a github issue: https://github.com/payara/Payara/issues
Now back to the question. You can set the context root with the --contextroot command line option set to /:
java -jar payara-micro.jar --contextroot / app.war
If you deploy multiple applications or resources, you can specify the context root in the name of the deployment file separated by a colon (or semicolon on Windows), e.g.:
java -jar payara-micro.jar app.war:/
Here's complete documentation about this: https://docs.payara.fish/community/docs/5.2020.4/documentation/payara-micro/deploying/deploy-cmd-line.html#define-context-root

REST URL Call throwing file not found exception

Can anybody tell me what could be causing this exception?. Because it is working fine in testing environment and not in the live servers .
I tried checking the differences of test and existing prod war file, but i did not find any differences.
The major change I did was converted project from ANT to MAVEN, but not sure how this is related to this exception.
java.io.FileNotFoundException: http://localhost:8888/getreport
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1890)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at com.sample.SimpleTest.webcontroller.SimpleController.getreport(SimpleController.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)

Run JavaFX Application in Raspberry Pi

I have created a JavaFx application. Now i want to run this application in Raspberry Pi. But while i am trying to run it is not responding and giving me the following error.
Raspberry Pi Information
pi#raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
While i am trying to run my application the following error occurred
cannot open display
cannot create resource
Error details while running from terminal
Exception in Application start method
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$152(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.awt.AWTError: Can't connect to X11 window server using 'localhost:0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
at java.awt.Window.initGC(Window.java:475)
at java.awt.Window.init(Window.java:495)
at java.awt.Window.<init>(Window.java:537)
at java.awt.Frame.<init>(Frame.java:420)
at java.awt.Frame.<init>(Frame.java:385)
at javax.swing.JFrame.<init>(JFrame.java:189)
at com.qps.swing.frame.FirstScene.<init>(FirstScene.java:33)
at qps_swing.QPS_Swing.start(QPS_Swing.java:20)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$159(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294)
at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
... 1 more
Error Details while running from Netbeans IDE
ant -f /home/pi/NetBeansProjects/Test jfxsa-run
init:
deps-clean:
Updating property file: /home/pi/NetBeansProjects/Test/build/built-clean.properties
Deleting directory /home/pi/NetBeansProjects/Test/build
clean:
init:
deps-jar:
Created dir: /home/pi/NetBeansProjects/Test/build
Updating property file: /home/pi/NetBeansProjects/Test/build/built-jar.properties
Created dir: /home/pi/NetBeansProjects/Test/build/classes
Created dir: /home/pi/NetBeansProjects/Test/build/empty
Created dir: /home/pi/NetBeansProjects/Test/build/generated-sources/ap-source-output
Compiling 1 source file to /home/pi/NetBeansProjects/Test/build/classes
compile:
Created dir: /home/pi/NetBeansProjects/Test/dist
Detected JavaFX Ant API version 1.3
Launching <fx:jar> task from /opt/jdk1.8.0_151/jre/../lib/ant-javafx.jar
Warning: From JDK7u25 the Codebase manifest attribute should be used to restrict JAR repurposing.
Please set manifest.custom.codebase property to override the current default non-secure value '*'.
Launching <fx:deploy> task from /opt/jdk1.8.0_151/jre/../lib/ant-javafx.jar
Internal error. Missing resources [/resources/web-files/javafx-loading-100x100.gif]
/home/pi/NetBeansProjects/Test/nbproject/jfx-impl.xml:1487: The following error occurred while executing this line:
/home/pi/NetBeansProjects/Test/nbproject/jfx-impl.xml:3134: The following error occurred while executing this line:
/home/pi/NetBeansProjects/Test/nbproject/jfx-impl.xml:2096: Error: -includedt requires the java deployment toolkit, which is not included in this distribution
BUILD FAILED (total time: 18 seconds)

Error installing bundle listed in startup.properties with url: mvn:org.ops4j.pax.url/pax-url-aether/2.4.7

I keep getting this error when i am trying to start nexus.
Error installing bundle listed in startup.properties with url: mvn:org.ops4j.pax.url/pax-url-aether/2.4.7 and startlevel: 1
java.lang.NullPointerException
at org.apache.karaf.main.Main.destroy(Main.java:593)
at org.sonatype.nexus.karaf.NexusMain.main(NexusMain.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:62)
at
com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:63)
How to solve this?
Are you sure that the file permission is correct for your nexus/system folder? I have had a similar error, where nexus/system where owned by root, and not nexus which is the user I use to run Nexus.
I solved my problem by running sudo chown nexus:nexus -R /opt/nexus/.

Oozie not starting in Amazon EMR

I tried to install Apache oozie in EMR cluster. I am getting the error. “Error: IO_ERROR : java.net.ConnectException: Connection refused”.
Followed the below link for installation:
http://pkavuri.blogspot.in/2013/08/oozie-installation-is-simplified.html
I got the error after running the below command:
bin/oozie admin -oozie http://localhost:11000/oozie -status
The following steps I did after encountering the error:
Moved the Hadoop and common jar files to the folders
“/oozie-3.3.2/distro/target/oozie-3.3.2-distro/oozie-3.3.2/oozie-server/webapps/oozie/WEB-INF/lib”
and “oozie-3.3.2/distro/target/oozie-3.3.2-distro/oozie-3.3.2/lib/”
Downloaded derby in oozie-3.3.2/libext
The error trace after running the command "tail -100f logs/catalina.out":
ERROR: Oozie could not be started
REASON: java.lang.NoClassDefFoundError:
org/apache/hadoop/util/ReflectionUtils
Stacktrace:
----------------------------------------------------------------- java.lang.NoClassDefFoundError: org/apache/hadoop/util/ReflectionUtils
at org.apache.oozie.service.Services.setServiceInternal(Services.java:359)
at org.apache.oozie.service.Services.(Services.java:108)
at org.apache.oozie.servlet.ServicesLoader.contextInitialized(ServicesLoader.java:38)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) Caused
by: java.lang.ClassNotFoundException:
org.apache.hadoop.util.ReflectionUtils
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
... 27 more
Try creating a libext folder and put all hadoop jars , extjs jars in it . Then run oozie-setup.sh and then oozie-run.sh
In this case based on your logs i guess you are missing hadoop-core.jar.

Resources