I successfully installed red5 rc1 on windows server 2008 with these parameters:
127.0.0.1 port 5080
as per tutorials.
I execute the StartRed5-NT.bat since it is an NT os... and it gives me Red5 Has Started output.
when i try to then type
127.0.0.1:5080
localhost:5080
or even its externalIP:5080
into a web browser address, i get 404 errors.
Does anyone know what i'm doing wrong that's preventing me to run the test page? I am assuming if the test page doesn't work the server does not work either.
Edit: I have reinstalled a few times and tried other ports with no effective change. Even some of the ports that were used for other services were temporarily disabled to try that port but to no avail.
I found the solution after going through the logs VERY carefully.
to get this to work,(at least on windows 7 and windows server 2008)
the red5.bat must look like this:
#echo off
SETLOCAL
if NOT DEFINED RED5_HOME set RED5_HOME=%~dp0
if NOT DEFINED RED5_MAINCLASS set RED5_MAINCLASS=org.red5.server.Bootstrap
if NOT DEFINED JAVA_HOME goto err
REM JAVA options
REM You can set JAVA_OPTS to add additional options if you want
REM Set up logging options
set LOGGING_OPTS=-Dlogback.ContextSelector=org.red5.logging.LoggingContextSelector -Dcatalina.useNaming=true
REM Set up security options
REM set SECURITY_OPTS= -Djava.security.debug=failure -Djava.security.manager -Djava.security.policy="%RED5_HOME%/conf/red5.policy"
set SECURITY_OPTS=-Djava.security.debug=failure
set JAVA_OPTS=%LOGGING_OPTS% %SECURITY_OPTS% %JAVA_OPTS%
set JYTHON_OPTS=-Dpython.home=lib
set RED5_CLASSPATH=%RED5_HOME%\boot.jar;%RED5_HOME%\conf;%CLASSPATH%
if NOT DEFINED RED5_OPTS set RED5_OPTS=
goto launchRed5
:launchRed5
echo Starting Red5
"%JAVA_HOME%\bin\java" %JYTHON_OPTS% %JAVA_OPTS% -cp "%RED5_CLASSPATH%" %RED5_MAINCLASS% %RED5_OPTS%
goto finally
:err
echo JAVA_HOME environment variable not set! Take a look at the readme.
pause
:finally
ENDLOCAL
then proceed to delete two files:
com.springsource.slf4j.juli-1.6.1.jar
com.springsource.slf4j.log4j-1.6.1.jar
this may only apply to the windows installer version of the application but hopefully if someone hits this, they won't need to waste a lot of time on it.
Related
I want to set Tomcat environment variable as PROD. I tried by putting
set "ENVIRONMENT=PROD"
set JAVA_OPTS="-Dtomcat.runtime.environment.version=PROD"
in catalina.bat
and tried to retrieve it with
env = System.getProperty("tomcat.runtime.environment.version");
but every time env is null! Where exactly does the variable have to be declared in catalina.bat and what's the perfect syntax to set the environment variable? Other possible ways to declare variables are also welcome!
Since you are on Windows and in production, I'm going to assume that you are using a Microsoft Windows Service for Tomcat. If that's the case, the .bat files are completely ignored when launching and stopping Tomcat. There is a service binary that reads the configuration from the Windows Registry and no disk-based scripts are used at all.
If you run the program called tomcatXw.exe (where X is your Tomcat major version number), that will run the configuration GUI. From there, you can configure everything stored in the Registry.
Go to the "System Properties" tab and add your system property -Dtomcat.runtime.environment.version=PROD to the list of properties already found in there. Restart your service and you should be able to see the new system property available to your application (actually the whole JVM, of course).
I'm trying to follow the steps in the RabbitMQ docs here to get clustering with SSL working on Windows. I'm noticing though that the "rabbitmqctl status" command starts failing after the environment variables defined in those steps are set. I'm getting the following error when executing "rabbitmqctl status":
Error: unable to connect to node 'rabbit#server1': nodedown
I've already configured RabbitMQ to use TLS 1.2 and have verified that it's working. I've ensured that my Erlang 18 cookie is the same in the user directory C:\users\me and C:\Windows on the machine, but the error persists, and is stopping other servers from clustering with it. The docs say that the Windows SSL Cluster setup is "Coming soon"... Here are the steps I've taken so far on server1. I think that Erlang wants forward slashes in the paths - this matches the rabbit.config SSL settings.
Combined the contents of my server\cert.pem and server\key.pem into rabbit.pem via the command "type server\cert.pem server\key.pem > server\rabbit.pem"
Created environment variable ERL_SSL_PATH and set to: "C:/Program
Files/erl7.0/lib/ssl-7.0/ebin"
Created environment variable RABBITMQ_CTL_ERL_ARGS and set to: -pa "%ERL_SSL_PATH%" -proto_dist inet_tls -ssl_dist_opt server_certfile C:/OpenSSL-Win64/server/rabbit.pem -ssl_dist_opt server_secure_renegotiate true client_secure_renegotiate true
Created environment variable RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS and set to same value as RABBITMQ_CTL_ERL_ARGS
Copied the erlang cookie at C:\Windows.erlang.cookie to my local user profile directory.
Restarted rabbit using rabbitmq-service start
At this point, on server1, "rabbitmqctl status" no longer works. Attempts to try to join server2 to server1 result in a "node down" error.
Edit 1: I can't get the initial step in the docs working to ask Erlang to report its SSL directory on Windows in order to set ERL_SSL_PATH correctly. Erlang is installed at C:\Program Files\erl7.0 on my server.
Edit 2: Using werl.exe (at C:\Program Files\erl7.0\bin\werl.exe), I was able to issue a command "Foo=io:format(code:lib_dir(ssl, ebin))." and it reported the path as: c:/Program Files/erl7.0/lib/ssl-7.0/ebin. However, this doesn't seem to be the cause of the this issue since that's already what I was using.
Thanks,
Andy
For environment changes to take effect on Windows, the service must be
re-installed. It is not sufficient to restart the service. This can be
done using the installer or on the command line with administrator
permissions
(source)
This will do:
rabbitmq-service.bat stop
rabbitmq-service.bat remove
rabbitmq-service.bat install
rabbitmq-service.bat start
Also, if while the node you're working on is down, the other cluster nodes were running, their state might be assumed to have gone out of sync. In that case, the node might fail to start up and you might need to:
rabbitmqctl force_boot
Check the logs to confirm. (at %RABBIT_BASE%\log\rabbit#server.log)
Late answer but, hopefully this could help a searcher...
I've got an installer that installs the oracle XE database. Recently, I've been asked to close/block port 1521 programmatically during installation. My app is installed using Wix 3.8. I've seen the Wix Firewall Extension, but I don't see a way to specify the action (i.e., "block"). I want to block all incoming traffic on that port, effectively shutting down the listener.
Is there another way to do this or am I missing something with Wix?
In case the Wix extension doesn't support this (which would surprise me), perhaps you can try this VBScript.
Note that I didn't write this script, nor have I used it. Use with caution and at your own risk. Test on a virtual machine.
Set objFirewall = CreateObject("HNetCfg.FwMgr")
Set objPolicy = objFirewall.LocalPolicy.CurrentProfile
Set colPorts = objPolicy.GloballyOpenPorts
Set objPort = colPorts.Item(9999,6)
objPort.Enabled = FALSE
Similar code, but using C#: Automating Windows Firewall with
Update: We weren't able to get WiX installer to do what we wanted, so we wrote our own custom process (not a CustomAction) that runs post install.
The 3 mains steps were:
Configure the sqlnet.ora (\database\app\oracle\product\\server\NETWORK\ADMIN\sqlnet.ora) file to only allow connections from the localhost by appending the following lines:
> TCP.VALIDNODE_CHECKING=YES
> TCP.INVITED_NODES = 127.0.0.1
Set up the TNSListener for local access only by running the following sqlplus commands:
> exec DBMS_XDB.SETLISTENERLOCALACCESS(true);
> SHUTDOWN IMMEDIATE
> STARTUP
Stop the OracleXETNSListener service and disable it (custom VB.net code)
Hope this helps!
For some reason I cannot start RabbitMQ anymore after it crashed.
I am getting the following error:
erlexec: HOME must be set
I've tried to export my home to /home/ubuntu but still getting the same error.
Any ideas?
I'm assuming that you are trying to start rabbitmq with something like service start rabbitmq-server. If so, the service command strips out environment variables. So you will need to either define it in your start up script or in a config file for your startup script (see https://unix.stackexchange.com/a/44378).
Additionally, I believe the rabbitmq home directory is actually /var/lib/rabbitmq/.
I have found suitable solution for myself. You can run epmd service before RabbitMQ server. This is fixing issue with HOME variable and others.
erlexec needs the environment variable HOME to be set in order to place a cookie (that contains a string). If HOME was for some reason unset in the environment that you are running rabbitmq (or rabbitmqctl) in, then you will get this error.
Try to check if HOME is defined by typing:
$ env
to get the list of defined environments. If it was not defined try to define it with
$ export HOME=/var/lib/rabbitmq
If you are using python3 and tox, note that tox by default does not pass current environment variable to the test environment. You will have to add the following to tox.ini
setdev =
HOME=/var/lib/rabbitmq
Just wanted to mention it because it gave me a headache the entire day today and I finally understood what was the issue and I though I should share this hint.
I'm not sure if something odd is happening or if this is normal, but since framework 4 when I create a new site on our IISv6 install I used to get a message saying that changing to framework 4 would cause IIS to restart (but this has gone away since a few updates ago), I think it still restarts the server when I change the framework, just no warning any more. So I did a bit of investigation and wrote a script that allowed me to switch the framework version without doing that.
#Echo Off
set /p id=Enter Site Instance:
echo %id%
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -norestart -s W3SVC/%id%
pause
The problem I now have occurs when I change the app pool on any given web app; it appears to cause the other app pools (including the one I add to) to refresh.
I have sometimes had instances of a switch causing every app pool to stop, and then I have to restart them all again which can cause a bit of downtime. I have taken to only release new sites early in the morning or at the end of my work day, so as to avoid as much disruption as possible, but I dont see why something like this should be happening.
The setup I have is one app pool for test, one for live and one for the admin site, but when I change a site from test to live, it will causes all the app pools to become affected.
Can anyone tell me if this is something that always happened with previous versions of the framework and if there is a possible work around, for example can I script the app pool switch without affecting any of the other app pools
Edit 2011-08-01
found this article: http://msdn.microsoft.com/en-us/library/k6h9cz8h%28VS.80%29.aspx,
which mentions a script called iisapp and looks like it might do the job, will investigate more.
Found the answer on this site: http://forums.iis.net/t/1152572.aspx
using a vbs in adminscripts called adsutil (not the iisapp as I thought...) you can write the following in a batch file.
#Echo Off
set /p id=Enter Site Name:
echo %id%
CD /D C:\inetpub\AdminScripts
Cscript.exe /nologo adsutil.vbs set W3SVC/%id%/root/apppoolid [APP POOL NAME]