Karaf command not found exception how to troubleshoot? - java

Downloaded karaf 4.0.9 just following getting started doc but keep getting this
org.apache.felix.gogo.runtime.CommandNotFoundException: Command not found: feature:install
whenever i try to do feature:install wrapper from shell
Finding it very difficult to find any help or doc how to trouble shoot? is it a permissions thing? I chowned everything to the same user for simplicity...
Is distribution missing a library? Where do i get it/put it?
New to karaf... Following this: http://karaf.apache.org/manual/latest/#_installation
Just trying to get some basic JDBC/JMS stuff working, install drivers, recieve some msgs, query db, etc

Spent a few hours of reading docs + trial and error to figure this out:
ssh karaf#localhost -p 8101
Will get you full admin shell, apparently this isn't available if you just ./shell from KARAF_HOME/bin

You can check your configurations in users.properties in karaf/etc folder .
Open karaf shell using admin rights.
Start Karaf shell from its bin folder.
Now run karaf console using below command.
ssh username#localhost -p8101
now you can run any command of karaf shell.

Related

Apache Livy : Could not find or load main class org.apache.livy.server.LivyServer

I am trying to start Apache Livy 0.8.0 server on my windows 10 machine for spark 3.1.2 and hadoop 3.2.1. I am taking help from here.. I have successfully built apache livy using maven (I have attached a of it) But I am not able to run the livy server. When I run it I get the following error -
> starting C:/AmazonJDK/jdk1.8.0_332/bin/java -cp /d/ApacheLivy/incubator-livy-master/incubator-livy-master/server/target/jars/*:/d/ApacheLivy/incubator-livy-master/incubator-livy-master/conf:D:/Program_files/spark/conf:D:/ApacheHadoop/hadoop-3.2.1/etc/hadoop: org.apache.livy.server.LivyServer, logging to D:/ApacheLivy/incubator-livy-master/incubator-livy-master/logs/livy--server.out
ps: unknown option -- o
Try `ps --help' for more information.
failed to launch C:/AmazonJDK/jdk1.8.0_332/bin/java -cp /d/ApacheLivy/incubator-livy-master/incubator-livy-master/server/target/jars/*:/d/ApacheLivy/incubator-livy-master/incubator-livy-master/conf:D:/Program_files/spark/conf:D:/ApacheHadoop/hadoop-3.2.1/etc/hadoop: org.apache.livy.server.LivyServer:
Error: Could not find or load main class org.apache.livy.server.LivyServer
full log in D:/ApacheLivy/incubator-livy-master/incubator-livy-master/logs/livy--server.out
I am using Git bash. If you need more information I will provide
The error got resolved when I used Windows Subsystem for Linux (WSL).

Youtrack 6 reboot fails on Fedora and Java Service Wrapper

I have followed http://confluence.jetbrains.com/display/YTD6/Linux.+YouTrack+JAR+as+a+Service on Fedora server. Starting Youtrack 6 as "youtrack" user by
/etc/init.d/youtrack start
command starts properly. I have added youtrack service wrapper on boot by
/sbin/chkconfig --add youtrack
command. But after server reboot Youtrack application is not running.
journalctl -xn
command gives me only this hint
systemd[4000]: Failed at step EXEC spawning /etc/rc.d/init.d/youtrack: Exec format error
I have fixed my permissions like in this thread ''
Starting YouTrack as a service fails without error message''
But error still occurs. I have pasted default template from the tutorial '/etc/rc.d/init.d/youtrack' with only one change:
#export JAVA_HOME=/usr/java/jdk1.6.0_21
export JAVA_HOME=/usr/java/latest
/usr/java/latest points to Oracle JDK 8.
youtrack_initd.template
from youtrack tutorial is missing
#!/bin/sh
on the top of the file. After adding this line "Exec format error" does not occur anymore.

java - Solr localhost:8983 Not Found

I am new to solr. Following the tutorial from here i Can't Get Past Step 2 in the Tutorial. After running java -jar start.jar and then connecting to http://localhost:8983/solr/
i get this error page which says:
HTTP ERROR: 404
Problem accessing /solr/. Reason:
Not Found
Powered by Jetty://
I changed the port from 8983 to 8080 but the problem persisted.
On running ant ant example i get this error message build.xml does nto exist
I am working with windows 7 and the downloaded version of solr is solr-4.9.0.zip.
Please check wheather the port(8983) is already in use or not. You can start solr in alternate port(like 4983) by using the following command
java -Djetty.port=4983 -jar start.jar
And now hit your browser with your doamin name or localhost:port as shown below:
http://yourdoamin.com:4983/solr
If you are still unable to start solr ,then solr log at the follwoing path
../solr-4.9.0/example/logs
Can you please post your solr.log?
Also when you start the solr with: java -Djetty.port=4983 -jar start.jar
Are you able to see server started in the console from where you are executing this?
How are you changing jetty port in solr? Through commands i mentioned above or by changing jetty.xml.
Note: changing port in jetty.xml dont work properly.

specify port for standalone mode in PlayFrameWork 2.2.1

I have two apps developed in PlayFrameWork 2.2.1 named:
1. helloWorld_88
2. helloWorld_99
For helloWorld_88:
I want to build this app run (standalone) on port 88.
For helloWorld_99:
I want to build this app run (standalone) on port 99.
As I know, using "dist" task will help me to build a standalone version of apps but I don't know how to specify the port.
Can anybody advice step by step.
Thanks
Rado
Hi Rado, Thanks for your quick reply.
I have already try this before I post the question, but the port always 9000.
See bellow output from the command line (Windows)
E:\Deploy\helloworld_88\bin>helloworld_88 -Dhttp.port=88
Play server process ID is 2216
[info] play - Application started (Prod)
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
Any other idea
Thanks
I assume that you have built both applications using "play dist" command and that you run them using generated "bin/helloWorld_88" and "bin/helloWorld_99" script files on Linux. (for Windows these files are named "bin/helloWorld_88.bat" and "bin/helloWorld_99.bat")
Go to the "bin" folder and run:
helloWorld_88 -Dhttp.port=88
and then for the second application do:
helloWorld_88 -Dhttp.port=99

PHP - Error installing JavaBridge.war

I'm trying to install JavaBridge as I want to make connections between my php files and Java files.
I need my php request a GET method to Java file, and Java file will get the ID and run some script and return with an ARRAY.
I tried to install JavaBridge, but I get errors while trying to excess to localhost:8080/JavaBridge
javax.servlet.ServletException: php.java.bridge.http.FCGIConnectException: Could not connect to server
php.java.bridge.http.FCGIConnectException: Could not connect to server
java.io.IOException: File \\.\pipe\C:\apache-tomcat-7.0.39\temp\JavaBridge939398813756155712.socket not writable
java.io.IOException: PHP not found. Please install php-cgi. PHP test command was: [php-cgi, -v]
I didn't show out all the errors here, I showed only the first line of each root cause.
I will give more details in my setup.
I'm using XAMPP all the time, with PHP, MySQL in the XAMPP.
Then I just installed Tomcat inorder to install JavaBridge.
I copied JavaBridge.war into c:/tomcats/webapps, copied JavaBridge.jar and php-servlet.jar into c:/tomcats/lib
I assume the problems should lies with the PHP, but I don't know how to fix it as well.
Install PHP again? but I'm not sure too.
Whats the problem with my setup?
Or is there others way to make connections between PHP and Java as what I stated above?
Thank you.
Have you enabled php-cgi?
Here's how u can do it. Go to: xampp\apache\conf\extra\httpd-xampp.conf and uncomment this:
<FilesMatch "\.php$">
SetHandler application/x-httpd-php-cgi
</FilesMatch>
<IfModule actions_module>
Action application/x-httpd-php-cgi "/php-cgi/php-cgi.exe"
</IfModule>
Restart Apache & Tomcat.

Categories

Resources