I am managing to install Red5 onto my VPS (I can tell it worked from looking up the IP/5080) but when it comes to testing, I get a connection failed error.
I am using terminal on mac for entering commands and cyberduck for accessing the directories/ftp.
I install java & ant, open ports 1935 and 5080 along with Red5 itself.
The problem could be to do with using certain versions but I really don't know after so many attempts to get this connected.
I've attempted to use several tutorials out there, but the commands don't work so I've only been able to narrow down the sources to use.
URL used for installing Red5 w/tutorial: http://www.muktware.io/setup-red5-streaming-media-server/
This source worked for me flawlessly but it doesn't connect, it's the only source I've followed the commands where it created and installed/started up the red5 application.
URL I found useful for further testing: http://blog.svnlabs.com/install-red5-1-0-1-on-centos-release-6-5-final-64-bit/
The second URL helped me because it helped me open ports, install ant which the first one didn't along with exporting paths etc.
Error I receive when testing connection with OFLA demo on Red5:
(110) Connections: true | true
(12643) connected?: true
(12911) NetConnection.onStatus:
data =
version = 4,0,0,1121
type = red5
fmsVer = RED5/1,0,5,0
capabilities = 33
mode = 1
description = Connection succeeded.
code = NetConnection.Connect.Success
level = status
(12914) catchVideos: [type Function]
(12976) NetConnection.onStatus:
stacktrace = org.red5.server.service.ServiceInvoker.invoke(ServiceInvoker.java:106),org.red5.server.net.rtmp.RTMPHandler.invokeCall(RTMPHandler.java:186),org.red5.server.net.rtmp.RTMPHandler.onCommand(RTMPHandler.java:293),org.red5.server.net.rtmp.BaseRTMPHandler.messageReceived(BaseRTMPHandler.java:105),org.red5.server.net.rtmp.ReceivedMessageTask.call(ReceivedMessageTask.java:57),org.red5.server.net.rtmp.ReceivedMessageTask.call(ReceivedMessageTask.java:11),java.util.concurrent.FutureTask.run(FutureTask.java:266),java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511),java.util.concurrent.FutureTask.run(FutureTask.java:266),java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142),java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617),java.lang.Thread.run(Thread.java:745)
11 = java.lang.Thread.run(Thread.java:745)
10 = java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
9 = java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
8 = java.util.concurrent.FutureTask.run(FutureTask.java:266)
7 = java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
6 = java.util.concurrent.FutureTask.run(FutureTask.java:266)
5 = org.red5.server.net.rtmp.ReceivedMessageTask.call(ReceivedMessageTask.java:11)
4 = org.red5.server.net.rtmp.ReceivedMessageTask.call(ReceivedMessageTask.java:57)
3 = org.red5.server.net.rtmp.BaseRTMPHandler.messageReceived(BaseRTMPHandler.java:105)
2 = org.red5.server.net.rtmp.RTMPHandler.onCommand(RTMPHandler.java:293)
1 = org.red5.server.net.rtmp.RTMPHandler.invokeCall(RTMPHandler.java:186)
0 = org.red5.server.service.ServiceInvoker.invoke(ServiceInvoker.java:106)
application = org.red5.server.service.ServiceNotFoundException
description = Service not found: demoService
code = NetConnection.Call.Failed
level = error
I've also tried to use the very latest version of Red 5 but this returns the exact same error.
As for java, I've used:
yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel
and
yum install java
Then for ant I just used
wget http://archive.apache.org/dist/ant/binaries/apache-ant-1.8.2-bin.tar.gz
I know there will be newer versions of ant but I'm open to suggestions on what I could test.
I have Googled this plenty of times and I searched on here before I made this post. I seen a few attempts but since updates appear to affect red5, I'll use this post as a fresh updated version of hopefully tackling the problem.
I've noticed different sources suggest placing the applications into different paths each time
Thanks for your help.
Dev
Related
I've got one week old clean install of OS X (10.12.6) with new installs of R (3.4.1), rJava (0.9-8), and Oracle Java 8 (1.8.0_144-b01). I'm having trouble getting RNetLogo (1.0-4) to start (using NLStart()). Also, my version of Netlogo is 6.0.1.
The code I'm running is:
library(RNetLogo)
NLStart("/Applications/NetLogo 6.0.1/Java",
gui = FALSE, nl.jarname = "netlogo-6.0.1.jar")
The error I'm experiencing is similar to what many others have experienced with this and previous versions of NetLogo and RNetLogo (examples: 1, 2, & 3). I have tried all of the fixes recommended on each of the links (above) but haven't found one that gets me past this error.
Here are the error messages:
java.lang.NoClassDefFoundError: org/nlogo/workspace/Controllable
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
Caused by: java.lang.ClassNotFoundException
at RJavaClassLoader.findClass(RJavaClassLoader.java:383)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 2 more
One in one of the message threads above, they suggest that it is a bug in RNetLogo. This may be true, but I can't find an active message board or bug/issue list associated with this package (it is being regularly maintained).
I reached out to the RNetLogo package maintainer (Jan Thiele) who provided me with an alternate R-based startup procedure for using the NetLogo GUI (credit goes to Robert Schlicht from University of Dresden).
Below is a simplified version of the startup procedure that they provided. To make it work, you may need to install (or reinstall) up-to-date versions of the packages: rJava, JGR, and RNetLogo.
Essentially, the procedure uses base R or RStudio to kick off a different R environment (Java GUI for R -- JGR) that is working with NetLogo on the Mac.
Here's how I start JGR (you may need to adjust the JDK version number):
#Load Java
dyn.load("/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/server/libjvm.dylib")
JGR::JGR() #Start JGR
Then in the Java GUI for R (JGR) start NetLogo:
library(RNetLogo)
NLStart("/Applications/NetLogo 6.0.1/Java", nl.jarname = "netlogo-6.0.1.jar")
Notes:
The "full" path is required for NLStart's nl.path argument.
NetLogo 6.0.2 was recently released and this procedure appears to work fine with that version too.
I am running the following script based on the RSelenium Basics CRAN page:
library(RSelenium)
startServer(args = c("-port 4455"), log = FALSE, invisible = FALSE)
remDr <- remoteDriver(browserName = "chrome")
remDr$open()
This produces the following error:
Exception in thread "main" java.net.BindException: Selenium is already running on port 4444. Or some other service is.
at org.openqa.selenium.server.SeleniumServer.start(SeleniumServer.java:492)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:305)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:245)
at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:64)
Based on the comments from this conversation on GitHub, I've modified my startServer() command like so:
startServer(args = c("-port 4455"), log = FALSE, invisible = FALSE)
I then receive the following error in my console:
Error: Summary: UnknownError
Detail: An unknown server-side error occurred while processing the command.
class: java.lang.IllegalStateException
And this error in the Java prompt that pops up:
14:38:55.098 INFO - Launching a standalone Selenium Server
14:38:55:161 INFO - Java: Oracle Corporation 25.40-b25
14:38:55.161 INFO - OS: Windows 7 6.1 amd64
14:38:55.161 INFO - v2.46.0, with Core v2.46.0. Built from revision 87c69e2
14:38:55.209 INFO - Driver class not found: com.opera.core.systems.OperaDriver
14:38:55.209 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
14:38:55:289 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4455/wd/hub
14:38:55:289 INFO - Selenium Server is up and running
I'm not sure if the lack of an Opera driver is an actual error or just a warning. Regardless, I would like to use Chrome, so it seems like it shouldn't matter. What am I doing wrong?
I was finally able to get RSelenium to work by piecing together information from a number of different sources. I think it would be helpful to have all of this information in one location, so here is the process that I went through to get RSelenium to work on Windows 7 (64-bit) with Chrome as the browser:
Download the 64-bit version of Java. I could not get anything to work with the standard download.
Download ChromeDriver.
Download the Selenium Standalone Server or run checkForServer() from R.
Create a batch file to start the Selenium server. I initially tried to use startServer() from an R script, but it would frequently get stuck and not carry on to the next line in the script. Here is the batch file that I created:
java -jar C:\path\to\selenium-server-standalone.jar -Dwebdriver.chrome.driver=C:\path\to\chromedriver.exe
ChromeDriver can be put in the PATH environmental variable, but I decided to add in the path to ChromeDriver to the batch file (which accomplishes the same goal).
Run the R script. Here is my final script:
library(RSelenium)
shell.exec(paste0("C:\\path\\to\\yourbatchfile.bat"))
Sys.sleep(5)
remDr <- remoteDriver(browserName = "chrome")
remDr$open(silent = TRUE)
remDr$navigate("http://www.google.com")
The Sys.sleep() call was necessary because I would get an error in the remoteDriver() call if it ran before the Selenium Server had finished starting.
It is worth noting that RSelenium has some annoying differences for OSX. The invisible=T/silent=T arguments will not work when you run the yourcommand.command file and the remDr$open() method, respectively. The invisible=T will actually remind you that it only works on Windows. Not a huge deal (and if someone has a workaround I'd appreciate it).
For posterity's sake here's a slight variation for OSX to replace shell.exec using a .command file instead of a .bat with the same contents as above:
yourcommand.command file contents
java -jar /path/to/selenium-server-standalone.jar -Dwebdriver.chrome.driver=/path/to/chromedriver
R script modification
library(RSelenium)
system(paste("open","/path/to/yourcommand.command"))
Sys.sleep(5)
...
Well I was trying to follow the first cup tutorial, but I'm stuck with a Glassfish error.
I'm supposed to this:
1.2.4 Getting the Latest Updates to the Tutorial
Check for any updates to this tutorial by using the Update Center
included with the Java EE 7 SDK.
1.2.4.1 Update the Tutorial Through the Update Center Open the Update Center and check for any updates to the tutorial.
In NetBeans IDE, select the Services tab and expand the Servers node.
Right-click the GlassFish Server instance and select View Update
Center to display the Update Tool. In the tree, select Available
Updates to display a list of updated packages. Look for updates to the
First Cup for Java EE 7 (javaee-firstcup-tutorial) package. If there
is an updated version of First Cup, select First Cup 7.0 for Java EE 7
(javaee-firstcup-tutorial) and click Install.
The thing is, when I try to open the Update Center, this is what I get:
The software needed for this command (updatetool) is not installed.
If you choose to install Update Tool, your system will be automatically
configured to periodically check for software updates. If you would like
to configure the tool to not check for updates, you can override the
default behavior via the tool's Preferences facility.
Exception in thread "main" java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:196)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:658)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at com.sun.pkg.client.Image.checkRepositoryConnection(Image.java:1225)
at com.sun.pkg.client.Catalog.refresh(Catalog.java:132)
at com.sun.pkg.client.Image.refreshCatalogs(Image.java:1627)
at com.sun.pkg.client.Client.main(Client.java:109)
When this tool interacts with package repositories, some system information
such as your system's IP address and operating system type and version
is sent to the repository server. For more information please see:
http://wikis.oracle.com/display/updatecenter/UsageMetricsUC2
Once installation is complete you may re-run this command.
Would you like to install Update Tool now (y/n):
C:\Program Files\glassfish-4.0>"C:\Program Files\Java\jdk1.7.0_40\bin\java" -Dimage.path="C:\Program Files\glassfish-4.0\bin\\.." -jar "C:\Program Files\glassfish-4.0\bin\\..\pkg/lib/pkg-client.jar" refresh
C:\Program Files\glassfish-4.0>"C:\Program Files\Java\jdk1.7.0_40\bin\java" -Dimage.path="C:\Program Files\glassfish-4.0\bin\\.." -jar "C:\Program Files\glassfish-4.0\bin\\..\pkg/lib/pkg-bootstrap.jar" "C:\Users\Fabio\AppData\Local\Temp\pkg-bootstrap11073.props"
Proxy: Using system proxy settings.
Input/output error: Connection reset
Could not download application packages. This could be because:
- a proxy server is needed to access the internet. Please ensure that
the system proxy server settings in your Internet Options control panel
(under Connections:LAN Settings) are correct, or set the HTTP_PROXY
environment variable to the full URL of the proxy server.
- the package server or network connection is slow.
If you are getting time out errors you can try setting the
PKG_CLIENT_CONNECT_TIMEOUT and PKG_CLIENT_READ_TIMEOUT
environment variables and try again. For example to increase
the timeouts to 300 seconds set them to 300
- the package server is down or otherwise inaccessible or it is
generating invalid data. Please contact the provider of the package
server.
This may be a problem with the slow GlassFish update server. Here are some steps you can try:
You should retry first to see if the error occurs again. You can start a cmd, navigate to the \glassfish\bin directory and run updatetool.bat so you can see the output which is printed after the one you posted.
If you are behind a proxy you should make sure it is setup correctly in the system settings.
You can also try to install the updates through the GlassFish admin console. Start your GlassFish instance and navigate to http:\\localhost:4848. On the bottom of the left menu click on Updatetool. There you can choose and install the desired updates.
Another option is to change the timeouts of the pkg tool. To set the timeout to 300 seconds do the following in a cmd (on Windows):
set PKG_CLIENT_CONNECT_TIMEOUT=300
set PKG_CLIENT_READ_TIMEOUT=300
Your last (ok, there may be other ones) option is to just skip the update process and do the tutorial with the current version. It should work anyway and I can see in my GlassFish update center that there is only an update for the tutorial documentation at the moment.
Just set this line into cmd (like administrator):
set PKG_CLIENT_CONNECT_TIMEOUT=300
set PKG_CLIENT_READ_TIMEOUT=300
Maybe the firstcup example is already existed in the install directory. Try to find it in the directory_install_glassfish/glassfish4/docs. The mine contain even javaee-tutorial and firstcup. For the next part, you maybe continue after guide in firstcup.pdf with the part of : Creating Your First Java by create archetype of java project. Good luck !
For the lazy of you the pkg Unix command is:
export PKG_CLIENT_CONNECT_TIMEOUT=300
export PKG_CLIENT_READ_TIMEOUT=300
After being stuck for a while on the installation of GlassFish update server from Netbeans (in my company network, proxy issues), I got it this way:
- Advanced System Settings > System Properties window > Advanced tab, New System Variable: http_proxy, http://username:password#your_proxy:your_port
- Netbeans (running as admin just in case), Services > Server > Glassfish Server > Right button View Domain Update Center, then install
It worked for me, Hope it helps!
I'm using the following on Windows 7:
neo4j-community-1.9.2
Java 7 Update 25
I have Windows Firewall disabled.
When I start Neo4j.bat, both as Administrator and normally, I get the following message:
c:\Tools\neo4j\bin>Neo4j.bat
28/07/13 9:34:27 PM org.neo4j.server.AbstractNeoServer INFO: Setting startup tim
eout to: 120000ms based on -1
A blank Java console window pops up, no messages, then the window disappears after a minute or so.
When I go to http://localhost:7474/, I just get a server not found error.
If I try to install it as a service, the service wouldn't start.
Any ideas what I need to do to start Neo4j? I see here that Neo4j 1.9 does support Java 7:
http://blog.neo4j.org/2013/03/neo4j-19m05-released-wrapping-up.html
base.bat correctly points to windows-service-wrapper-5.jar, so not the windows-service-wrapper-*.jar problem that some people have had in the past. It would be helpful if it outputted an error message.
I just tried it with neo4j 2.0 milestone, and it didn't make any difference. The Java window pops up with no messages, http://localhost:7474/ gets a server not found error, then the Java window closes after a minute or two.
I added JAVA_HOME and JRE_HOME system variables, made no difference. I think I would get an error if Neo4j was not able to locate Java anyway.
I've fixed it.
With help from Neo4j's Google Group, I looked at the logs in data/logs/*.log and data/graph.db/messages.log, and found the following exception:
Caused by: java.rmi.server.ExportException: Port already in use: 1337; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
Once I disabled my other service that uses that port, Neo4j's web admin at http://localhost:7474 worked. I then found out port 1337 is used by Neo4j's remote shell, I disabled it by adding enable_remote_shell = false to neo4j.properties, then I was able to have both Neo4j and my other service running.
I'm using the version 2.2.1 community edition of Neo4j on Windows 7, Java 1.8 update 45
In my case the log file messages.log was under default.graphdb directory. In there, you'll see the root cause of the problem.
I have PHP and the PHP/Java bridge set up on Windows and Tomcat 7.0. All is OK there.
However, I am trying to write a php file with java calls to connect to my Weblogic server installed on my Windows 7 machine to play around with adding/deleting users/groups etc.
This is what I followed: http://docs.oracle.com/cd/E13222_01/wls/docs90/jmx/accessWLS.html I also looked at this one http://weblogic-wonders.com/weblogic/2009/10/11/creating-users-in-weblogic-server-embedded-ldap-programatically/ (but for the second one I get an error on the java:comp/env/jmx/runtime line)
However, I cannot get my set up to recognize "t3" protocols to connect to my weblogic. the weird thing is I can connect via a t3 protocol using jython in a separate standalone script and to the console that way.
There is a section in first link above to make sure that wljmxclient.jar is added to the classpath. I set up a classpath to add that. I even use PHP to exec Weblogic's setWLSenv.cmd right before the connection to my Weblogic server is made to set my classpath . . . it shows the jar file in question being added. Still won't work. I then copied the jar file to the JavaBirde/WEB-INF/lib folder. Still wont' work.
I did try IIOP protocol but then I started down an new path of errors where "not bound in this context" was indicated. I tried switching between the 3 Mservers mentioned in the Oracle doc link above. No luck there either.
I see that others have run into this "t3 protocol not supported" message but I don't see any solutions.
Here is my code:
<?php
require_once("java/Java.inc");
$output=exec("C:\Oracle\Middleware\wlserver_12.1\server\bin\setWLSenv.cmd");
$protocol = "t3";
$hostname = "localhost";
$port="7001";
$jndiroot="/jndi/";
$mserver="weblogic.management.mbeanservers.domainruntime";
$united = $jndiroot.$mserver;
$serviceURL = new java("javax.management.remote.JMXServiceURL",$protocol, $hostname, $port,$united);
$h = new java("java.util.Hashtable");
$h->put("javax.naming.Context.SECURITY_PRINCIPAL", "myUID");
$h->put("javax.naming.Context.SECURITY_CREDENTIALS", "myPWD");
$h->put("javax.management.remote.JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES",
"weblogic.management.remote");
$connector = new java("javax.management.remote.JMXConnectorFactory");
$connector->connect($serviceURL,$h);
?>
This is how I FINALLY connected to my Weblogic:
1) I installed Tomcat 7.0 zip file instead of the installer and set it up manually. In my
setenv.bat file it looks like:
set CATALINA_HOME=C:\Program Files (x86)\Apache Software Foundation\apache-tomcat-7.0.34
set CATALINA_BASE=C:\Program Files (x86)\Apache Software Foundation\apache-tomcat-7.0.34
set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_09
set JRE_HOME=C:\Program Files (x86)\Java\jdk1.7.0_09\jre
set JAVA_OPTS=-Djava.ext.dirs=C:\Oracle\Middleware\wlserver_12.1\server\lib
set CLASSPATH=.;C:\Oracle\Middleware\wlserver_12.1\server\lib\wljmxclient.jar
exit /b 0
2) I enabled IIOP protocol in weblogic through the weblogic console and added a userid/password which I used in num 3 for the userID/password
3) My php script on Tomcat 7 with the PHP/Java Bridge (not the JMXServerURL . . . nowhere did I find that you had to use "rmi" as the protocol")
$serviceURL = new java("javax.management.remote.JMXServiceURL","rmi","localhost","7001","/jndi/iiop://localhost:7001/weblogic.management.mbeanservers.edit");
//"service:jmx:iiop://localhost:7001/jndi/weblogic.management.mbeanservers.edit");
$env = new java("java.util.Hashtable");
$env->put("javax.management.remote.JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES","weblogic.management.remote");
$env->put("javax.naming.Context.SECURITY_PRINCIPAL", "myuserID");
$env->put("javax.naming.Context.SECURITY_CREDENTIALS", "mypassword");
$jmxCon = java("javax.management.remote.JMXConnectorFactory")->newJMXConnector($serviceURL, $env);
$jmxCon->connect();
$connection = $jmxCon->getMBeanServerConnection();
$mbeans = $connection->queryNames(null,null);
foreach($mbeans as $key=>$value) {
echo $key. "=". $value;
}
It connected and printed out all the mbeans for my admin server and my two managed servers that I created for testing.