Getting error with Jetty Solr? - apache

I using Azure to host my VMs. In one VM I have web application based on Laravel Framework and another VM is used to be cache and searching vm. I installed Jetty and Solr on that VM. Now Jetty is running but I can't see that Solr is running. And my web server giving me this error on slack.
```ErrorException: Trying to get property of non-object in /srv/websites/test.com/app/test/Solr/Solr.php:248
Stack trace:
#0 /srv/websites/test.com/app/test/Solr/Solr.php(248): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Trying to get p...', '/srv/websites/r...', 248, Array)
#1 /srv/websites/test.com/app/Http/Controllers/SearchController.php(39): App\test\Solr\Solr->search(Array)
#2 [internal function]: App\Http\Controllers\SearchController->getSearchResponse()
#3 /srv/websites/test.com/bootstrap/cache/compiled.php(9424): call_user_func_array(Array, Array)
#4 /srv/websites/test.com/bootstrap/cache/compiled.php(9486): Illuminate\Routing\Controller->callAction('getSearchRespon...', Array)
#5 /srv/websites/test.com/bootstrap/cache/compiled.php(9466): Illuminate\Routing\ControllerDispatcher->call(Object(App\Http\Controllers\SearchController), Object(Illuminate\Routing\Route), 'getSearchRespon...')
#6 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)).............
One more if try to run this command
$java -jar start.jar
It gives me error like that
</opt/solr># java -jar start.jar
java.io.FileNotFoundException: No XML configuration files specified in start.config or command line.
at org.eclipse.jetty.start.Main.start(Main.java:502)
at org.eclipse.jetty.start.Main.main(Main.java:96)
Usage: java -jar start.jar [options] [properties] [configs]
java -jar start.jar --help # for more information
If run service jetty status command to check status of jetty then the will be like
Checking arguments to Jetty:
START_INI = /opt/jetty/start.ini
JETTY_HOME = /opt/jetty
JETTY_BASE = /opt/jetty
JETTY_CONF = /opt/jetty/etc/jetty.conf
JETTY_PID = /var/run/jetty.pid
JETTY_START = /opt/jetty/start.jar
JETTY_LOGS = /opt/jetty/logs/
CLASSPATH =
JAVA = /bin/java
JAVA_OPTIONS = -Dsolr.solr.home=/opt/solr/solr -Xms1024m -Xmx2048m -Djetty.state=/opt/jetty/jetty.state -Djetty.logs=/opt/jetty/logs/ -Djetty.home=/opt/jetty -Djetty.base=/opt/jetty -Djava.io.tmpdir=/tmp
JETTY_ARGS = jetty-logging.xml jetty-started.xml
RUN_CMD = /bin/java -Dsolr.solr.home=/opt/solr/solr -Xms1024m -Xmx2048m -Djetty.state=/opt/jetty/jetty.state -Djetty.logs=/opt/jetty/logs/ -Djetty.home=/opt/jetty -Djetty.base=/opt/jetty -Djava.io.tmpdir=/tmp -jar /opt/jetty/start.jar jetty-logging.xml jetty-started.xml
Jetty running pid=49855
How can I resolve this issue? Java 1.8 is installed on Jetty VM.
VMs running on CentOS 7.2.
I'm not able ping Jetty vm using this http://my-ip:8983 or http://my-ip:3000 (port changed)

I have been using command like
java -jar /Applications/MAMP/htdocs/solr-4.9.1/example/start.jar
But it stops working and shows the same error as yours.
I solved it by changing the folder:
cd /Applications/MAMP/htdocs/solr-4.9.1/example
and starting it from the folder where start.jar is placed.
java -jar start.jar

Related

Why do we need org.openqa.grid.selenium.GridLauncherV3 in selenium grid

Is there any specific reason why we use GridlauncherV3, Currently doing a project where I use custom servlets for executing some task
For launching node:
java -Dwebdriver.chrome.driver=chromedriver -cp testservlet.jar:selenium-server-standalone.jar org.openqa.grid.selenium.GridLauncherV3 -role node -maxSession 10 -port 4444 -host localhost -hub http://localhost:4444/grid/register -browser browserName=chrome,version=103,platform=LINUX,maxInstances=10 -servlets testservlet.copies.DemoServlet,testservlet.copies.Demo2Servlet
Couldn't find any reason but if removed it throws an error, Were it needs a params
Unrecognized option: -role
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Thanks in advance.
As you are using are using java -cp, it is a requirement to specify the class that contains the main() method.
In the case of creating a jvm to run as selenium grid, you require the class that contains the main() method, in this case that is org.openqa.grid.selenium.GridLauncherV3.
This method is used to initiate the grid with all the required configuration in your cli command.
See the method here: GridLauncherV3

How to start selenium standalone server ith IE11 webdriver?

I'm trying this command in order to start selenium standalone server with internet explorer 11:
java -jar selenium-server-standalone-3.141.59.jar -Dwebdriver.ie.driver=C:\Users\MyUser\Downloads\IEDriverServer_x64_3.14.0\IEDriverServer.exe -Dwebdriver.ie="C:\Program Files\internet explorer\iexplore.exe"
where MyUser is my current username.
But I'm getting exception.
Using selenium standalone server version 2.53.1 works fine with the same arguments but it's recommanded to use the same version for IE webdriver and selenium.
Here's the exception I have:
Exception in thread "main" com.beust.jcommander.ParameterException: Was passed main parameter '-Dwebdriver.ie.driver=C:\Users\Xavier\Downloads\IEDriverServer_x64_3.14.0\IEDriverServer.exe' but no main parameter was defined in your arg class
at com.beust.jcommander.JCommander.initMainParameterValue(JCommander.java:936)
at com.beust.jcommander.JCommander.parseValues(JCommander.java:752)
[...]
Does anyone know how to run it ?
Fixed this by moving -jar .... at the end of the command:
java -Dwebdriver.ie.driver=C:\Users\MyUser\Downloads\IEDriverServer_x64_3.14.0\IEDriverServer.exe -Dwebdriver.ie="C:\Program Files\internet explorer\iexplore.exe" -jar selenium-server-standalone-3.141.59.jar

tomee plus 1.7.2 - /bin/java: No such file or directory error

I'm getting the following error when starting TOMEE plus 1.7.2:
/home/atom/tomee-apps/boss/bin/catalina.sh: line 392: /opt/oracle/jdk/jdk1.8.0_60/jre
/bin/java: No such file or directory
If I do below from console, it works, which means that the java file does exist:
[atom#ustxplmadevapp1 bin]$ /opt/oracle/jdk/jdk1.8.0_60/jre/bin/java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
The startup.sh console output is like below:
[atom#ustxplmadevapp1 bin]$ ./startup.sh
Using CATALINA_BASE: /home/atom/tomee-apps/boss
Using CATALINA_HOME: /home/atom/tomee-apps/boss
Using CATALINA_TMPDIR: /home/atom/tomee-apps/boss/temp
Using JRE_HOME: /opt/oracle/jdk/jdk1.8.0_60/jre
Using CLASSPATH: /home/atom/tomee-apps/boss/bin/bootstrap.jar:/home/atom/tomee-apps/boss/bin/tomcat-juli.jar
Using CATALINA_PID: /var/apps/apache-tomee-plus-1.7.2/boss/tomcat.pid
Existing PID file found during start.
Removing/clearing stale PID file.
Tomcat started.
The setenv.sh is as of below:
JRE_HOME="/opt/oracle/jdk/jdk1.8.0_60/jre"
CATALINA_PID="/var/apps/apache-tomee-plus-1.7.2/boss/tomcat.pid"
Any idea why I'm getting such error? I've notice that the error always has a line break between /opt/oracle/jdk/jdk1.8.0_60/jre and /bin/java. Not sure if that is the cause of what.

Jenkins CLI with HTTPS

My Jenkins server was switched to now using HTTPS. However, now when trying to run jenkins-cli.jar, I get the following error:
Exception in thread "main" java.io.IOException: Failed to connect to https://ncs-jenkins.cisco.com/
at hudson.cli.CLI.getCliTcpPort(CLI.java:266)
at hudson.cli.CLI.<init>(CLI.java:126)
at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)
at hudson.cli.CLI._main(CLI.java:466)
at hudson.cli.CLI.main(CLI.java:382)
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:902)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1208)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1235)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1219)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:440)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
at hudson.cli.CLI.getCliTcpPort(CLI.java:264)
... 4 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:482)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:883)
... 11 more
Is there any way to use Jenkins CLI over HTTPS?
This happens, for example when I try to run even just the help command:
java -jar jenkins-cli.jar -noCertificateCheck -s https://ncs-jenkins.cisco.com:8443/ -i /home/auto/.ssh/id_rsa help
This works for me:
java -jar jenkins-cli.jar -noCertificateCheck -auth #jenkins_creds.txt -s https://jenkins.example.com help
(If I omit -auth then I get an expected error about the need to authenticate to the Jenkins instance, but that doesn't seem relevant to you error.)
java-version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
Jenkins version: 2.138.3
I am wondering whether you have some other piece of equipment between your cli and your Jenkins server that cuts the connection if HTTPS cert verification fails.
I encountered the same problem on one of my jenkins slaves.
Since the slaves were supposed to be identical, I started investigating the slightest differences between the machines.
As it turns out, the java version was slightly different:
java-1.7.0-openjdk-1.7.0.75.x86_64 - On the working machine
java-1.7.0-openjdk-1.7.0.85.x86_64 - On the failing one.
I reverted back to the earlier openjdk version and the problem was fixed.
Since you asked the question only a few days ago, I suspect we've encountered the same problem.
To check your version:
java -showversion -verbose 2>&1 | head -1
To install the previous openjdk version (on centos):
yum install java-1.7.0-openjdk-devel-1:1.7.0.75-2.5.4.0.el6_6.x86_64
If you are using a valid SSL cert.
Checkout the jenkins-cli commands returning connect timed out
PS: This is not a solution but may be a workaround until a solution is found.

Error on starting weblogic server in jdeveloper

Can anyone please help me to resolve this error?
Below is the weblogic server log...
I'm using Jdk 7, and Java Developer for ADF
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: -jrockit
Process exited.
--Weblogic server log-------
*** Using HTTP port 7101 ***
*** Using SSL port 7102 ***
C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\DefaultDomain\bin\startWebLogic.cmd
[waiting for the server to complete its initialization...]
.
.
JAVA Memory arguments: -Xms256m -Xmx512m
.
WLS Start Mode=Development
.
CLASSPATH=C:\Oracle\Middleware\oracle_common\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;C:\Oracle\Middl
eware\patch_wls1035\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\Oracle\Middleware\p
atch_jdev1112\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\PROGRA~1\Java\jdk1.7.0_67
\lib\tools.jar;C:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic_sp.jar;C:\Oracle\Middleware\wls
erver_10.3\server\lib\weblogic.jar;C:\Oracle\Middleware\modules\features\weblogic.server.modules_10.3
.5.0.jar;C:\Oracle\Middleware\wlserver_10.3\server\lib\webservices.jar;C:\Oracle\Middleware\modules\o
rg.apache.ant_1.7.1/lib/ant-all.jar;C:\Oracle\Middleware\modules\net.sf.antcontrib_1.1.0.0_1-
0b2/lib/ant-
contrib.jar;C:\Oracle\Middleware\oracle_common\modules\oracle.jrf_11.1.1\jrf.jar;C:\Oracle\Middleware
\wlserver_10.3\common\derby\lib\derbyclient.jar;C:\Oracle\Middleware\wlserver_10.3\server\lib\xqrl.jar
.
PATH=C:\Oracle\Middleware\patch_wls1035\profiles\default\native;C:\Oracle\Middleware\patch_jdev1112\p
rofiles\default\native;C:\Oracle\Middleware\wlserver_10.3\server\native\win\32;C:\Oracle\Middleware\w
lserver_10.3\server\bin;C:\Oracle\Middleware\modules\org.apache.ant_1.7.1\bin;C:\PROGRA~1\Java\jdk1.7
.0_67\jre\bin;C:\PROGRA~1\Java\jdk1.7.0_67\bin;E:\DB\app\oracle\product\11.2.0\server\bin;;c:\Program
Files\RSA SecurID Token Common;C:\Program Files\Intel\iCLS
Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell
\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program
Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program
Files\Java\jdk1.7.0_67\bin;C:\Oracle\Middleware\wlserver_10.3\server\native\win\32\oci920_8
.
***************************************************
* To start WebLogic Server, use a username and *
* password assigned to an admin-level user. For *
* server administration, use the WebLogic Server *
* console at http:\\hostname:port\console *
***************************************************
starting weblogic with Java version:
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: -jrockit
Starting WLS with line:
C:\PROGRA~1\Java\jdk1.7.0_67\bin\java -jrockit -Xms256m -Xmx512m -Dweblogic.Name=DefaultServer
-Djava.security.policy=C:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.policy -
Djavax.net.ssl.trustStore=C:\Users\inatar\AppData\Local\Temp\trustStore8547229804589400188.jks -
Doracle.jdeveloper.adrs=true -Dweblogic.nodemanager.ServiceEnabled=true -Xverify:none -da -
Dplatform.home=C:\Oracle\Middleware\wlserver_10.3 -
Dwls.home=C:\Oracle\Middleware\wlserver_10.3\server -
Dweblogic.home=C:\Oracle\Middleware\wlserver_10.3\server -Djps.app.credential.overwrite.allowed=true
-Dcommon.components.home=C:\Oracle\Middleware\oracle_common -Djrf.version=11.1.1 -
Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -
Ddomain.home=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\DefaultDomain -
Djrockit.optfile=C:\Oracle\Middleware\oracle_common\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -
Doracle.server.config.dir=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\Defaul
tDomain\config\fmwconfig\servers\DefaultServer -
Doracle.domain.config.dir=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\Defaul
tDomain\config\fmwconfig -
Digf.arisidbeans.carmlloc=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\Defaul
tDomain\config\fmwconfig\carml -
Digf.arisidstack.home=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\DefaultDom
ain\config\fmwconfig\arisidprovider -
Doracle.security.jps.config=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\Defa
ultDomain\config\fmwconfig\jps-config.xml -
Doracle.deployed.app.dir=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\Default
Domain\servers\DefaultServer\tmp\_WL_user -Doracle.deployed.app.ext=\- -
Dweblogic.alternateTypesDirectory=C:\Oracle\Middleware\oracle_common\modules\oracle.ossoiap_11.1.1,C:
\Oracle\Middleware\oracle_common\modules\oracle.oamprovider_11.1.1 -
Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dweblogic.jdbc.remoteEnabled=false -
Dwsm.repository.path=C:\Users\inatar\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\DefaultDoma
in\oracle\store\gmds -Dweblogic.management.discover=true -Dwlw.iterativeDev= - Dwlw.testConsole= -
Dwlw.logErrorsToConsole= -
Dweblogic.ext.dirs=C:\Oracle\Middleware\patch_wls1035\profiles\default\sysext_manifest_classpath;C:\O
racle\Middleware\patch_jdev1112\profiles\default\sysext_manifest_classpath weblogic.Server
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: -jrockit
Process exited.
Unrecognized option: -jrockit Process exited. is the critical error. -jrockit is not an option available to the standard java jdk.
e.g. C:\PROGRA~1\Java\jdk1.7.0_67\bin\java -jrockit is the issue
Your JAVA_VENDOR is being set incorrectly in your setDomainEnv.cmd or startWebLogic.cmd script. It's being set to Oracle but should be set to Sun. You either need to figure out how that environment variable is being set incorrectly or manually fix one of the two .cmd files.
My last post was bad!
Here is the unwrapped set of lines I added:
echo "==> Force JAVA_VM to use -server:"
JAVA_VM=-server
export JAVA_VM
echo "."
echo "."
echo "JAVA Machine: ${JAVA_VM}"
THIS ISSUE IS RESOLVED FOR ME. I JUST WANTED TO POST THE SOLUTION SOMEWHERE...
I was working through exercise 1 on the NoSQL intro: http://www.oracle.com/technetwork/topics/bigdata/articles/intro-to-oracle-nosql-db-hol-1937059.pdf
I tried to deploy the Movieplex application to JDeveloper's internal weblogic server but kept getting hit with a -jrockit VM not found. This was difficult for me to get fixed because: 1 - I am not a heavy java programmer, and 2 - I apparently do not read very well. As for point 1, JRockit is an optimized special JAVA VM that some folks use. You can look that up oon line I guess, but it looks like we do not need it for this tutorial. As for point 2, I spent hours (I ashamedly admit) trying to figure out what .sh scripts were being run to start the Weblogic server running. I did all sorts of find commands, hunted through the binaries and folders underneath the Middleware folders. In the end, all I has to do was read the output log carefully, the script for me is: /home/oracle/.jdeveloper/system11.1.1.6.38.61.92/DefaultDomain/bin/startWebLogic.sh.
I edited the script REPLACING line 129 with below:
echo "==> Force JAVA_VM to use -server:"
JAVA_VM=-server
export JAVA_VM
echo "."
echo "."
echo "JAVA Machine: ${JAVA_VM}"
NOTE: there is another shell script that may be involved, /home/oracle/.jdeveloper/system11.1.1.6.38.61.92/Default/init-info/Domain