Unable to enable Tomcat 8.0.45 log in debug mode - tomcat8

I am starting tomcat from java code as given below.
bootstrap = new Bootstrap();
String [] a = {"-config",serverXmlPath};
bootstrap.init(a);
bootstrap.setAwait(true);
bootstrap.start();
and i want to enable tomcat logs in debug mode.
I tried changing the conf/catalina.properties but it is not reflecting any changes.
org.apache.catalina.startup.ContextConfig.level = FINE
org.apache.catalina.startup.HostConfig.level = FINE
org.apache.catalina.startup.Catalina.level = FINEST
org.apache.catalina.session.ManagerBase.level = FINE
Could you please help me to get out of this issue.

Related

redis-based openstack deploy with kolla

I am trying to implement openstack wallaby with kolla and without memcache but with redis. I have modified the keystone.conf, but still I cannot loging via horizon. Do you know what I can do to resolve the issue? It seems that openstack is working fine and the only problem is with the horizon authentication.
from: keystone.conf
[cache]
backend = dogpile.cache.redis
enabled = True
backend_argument=url:redis://xxx.xx.xx.xxx:6379
[oslo_messaging_notifications]
transport_url =
rabbit://openstack:XeIt7oMj85uaiGyhqlTBTGzsDBVO8km3hh2s1H4wY#xxx.xx.xx.xxx:5672//
driver = kvs

How to find a browser's command_executor string in Heroku

I've run into the following problem while attempting to emulate a mobile browser with chrome on heroku: Selenium ERR_NAME_NOT_RESOLVED on heroku with mobile testing. Based on Josh Lewis's answer, and the python code sample at https://sites.google.com/a/chromium.org/chromedriver/mobile-emulation
from selenium import webdriver
mobile_emulation = { "deviceName": "Nexus 5" }
chrome_options = webdriver.ChromeOptions()
chrome_options.add_experimental_option("mobileEmulation", mobile_emulation)
driver = webdriver.Remote(command_executor='http://127.0.0.1:4444/wd/hub',
desired_capabilities = chrome_options.to_capabilities())
It may be that I need to use a command_executor (defined at https://seleniumhq.github.io/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.webdriver.html) as
command_executor - Either a string representing URL of the remote server or a
custom
remote_connection.RemoteConnection object. Defaults to
‘http://127.0.0.1:4444/wd/hub'
to get my code working. How would I found this with the Heroku chrome buildpack, https://github.com/heroku/heroku-buildpack-google-chrome
edit:
You can download my project for both windows and heroku use at:
https://github.com/kc1/mobiletest
(keep in mind that if you deploy to heroku you have to set FLASK_CONFIG to production. )

Wiki Parsoid error - cannot connect to Parsoid Server

I'm trying to set Parsoid extension and Visual Editor on my wiki page. It is NOT on my localhost. Those who will use the Visual Editor must log in, but the content of the wiki can be read without logging in.
The address is http://contractor.bg/wikimedia/index.php?title=Main_Page
I downloaded the Parsoid extension (in the extension files there is no settings.js file, so I created it according to an example).
My settings are:
in the LocalSettings.php file:
require_once "$IP/extensions/VisualEditor/VisualEditor.php";
$wgDefaultUserOptions['visualeditor-enable'] = 1;
$wgHiddenPrefs[] = 'visualeditor-enable';
wfLoadExtension( 'Parsoid' );
$wgVisualEditorParsoidURL = 'http://contractor.bg:2083';
$wgVisualEditorParsoidPrefix = 'wikimedia';
//$wgSessionsInObjectCache = true;
//$wgVisualEditorParsoidForwardCookies = true;
//$wgVisualEditorParsoidTimeout = 120;
I tried with to uncomment the last lines, but it still does not work.
In the settings.js file:
parsoidConfig.setMwApi( 'wikimedia', { uri: 'http://contractor.bg/wikimedia/api.php' } ); // I also tried setting an interwiki value, I am not quite sure what is the difference)
parsoidConfig.serverPort = 2083;
parsoidConfig.serverInterface = 'contractor.bg';
parsoidConfig.strictSSL = false;
parsoidConfig.allowCORS = 'contractor.bg/wikimedia'; // I also tried only contractor.bg)
At the moment when I try to Edit a page with the Visual Editor, I receive an error:
Error loading data from server: 401: parsoidserver-http: HTTP 401. Would you like to retry?
Parsoid is not a MediaWiki extension (well, there was an extension with this name as a support mechanism for the actual Parsoid, but it was never standalone and is no longer required). It is an external service.
You need to actually start the Parsoid service by running node bin/server.js from the Parsoid directory. Ensure it is actually running on the port you specify in the VisualEditor config (2083) - it looks like you have something else there.

GridGain - programmatically opening nodes using SSH through Grid.startNodes API

I am using Grid.startNodes(java.util.Collection, java.util.Map, boolean, int, int)
as defined here: http://gridgain.com/api/javadoc/org/gridgain/grid/Grid.html#startNodes(java.util.Collection, java.util.Map, boolean, int, int)
Code I am using:
GridConfiguration cfg = GridCfgGenerator.GetConfigurations(true);
Grid grid = GridGain.start(cfg);
Collection<Map<String,Object>> coll = new ArrayList<>();
Map<String, Object> host = new HashMap<String, Object>();
//host.put("host", "23.101.201.136");
host.put("host", "10.0.0.4");
host.put("port", 22);
host.put("uname", "username");
host.put("passwd", "password");
host.put("nodes", 7);
//host.put("ggHome", null); /* don't state so that it will use GRIDGAIN_HOME enviroment var */
host.put("cfg", "/config/partitioned.xml");
coll.add(host);
GridFuture f = grid.startNodes(coll, null, false, 3600 * 3600, 4);
System.out.println("before f.get()");
f.get();
I ran the above code on a vm with a 10.0.0.7
I have remote desktop into the VM whos host IP is 10.0.0.4 and see no changes to state. The code completes and exits. Both VMs are able to run gridgain locally and can discover each other's nodes if I start it using bin/ggstart.bat
I can manually start a node on 10.0.0.4 (the machine I am trying to SSH into via this API). I can start said node by running $GG_HOME/bin/ggstart.bat $GG_HOME/config/partitioned.xml so there is no issue in the configuration file
I am not quite sure how to debug this as I get no errors
Successful completion of the future returned from startNodes(..) method means that your local node has established SSH session and executed a command for each node it was going to start. But successful execution of a command doesn't mean that a node will be actually started, because it can fail for several reasons (e.g., wrong GRIDGAIN_HOME).
You should check the following:
Are there GridGain logs created GRIDGAIN_HOME/work/log directory? If yes, then check them - there could be an exception during startup process.
If there are no new logs, there is something wrong with the executed command. The command can be found in the local node logs - search for "Starting remote node with SSH command: ..." lines. You can try to create an SSH connection in terminal, run this command and see what happens.
Also you may want to check your SSH logs to see whether there are any errors.

Setting up rfc5766 TURN server for WebRTc

I am new and sorry for my English.
I am working on WebRTC Video call, i follow and run Demo application that is apprtc.appspot.com its OK locally. but I am getting following error
"XMLHttpRequest cannot load https://computeengineondemand.appspot.com/turn?username=83926066&key=4080218913. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access."
after Googling i find that i have to Run my own TURN server if i have to publish my application on globally.
I follow this https://www.dialogic.com/den/developer_forums/f/71/p/10238/38432.aspx
to Install TURN server i installed server by following this and server in running.
Now my problem is how to use this Server for my application? how to set or get URL of server to call form app?
thanks in advance.
I believe that this one should help you:
var pcConfig = {};
var pcConstraints = {};
var turnServer = {
username:'authUserNameAsConfiguredOnServer',
credential: 'password',
url:'turn:YOUR_SERVER_IP_HERE:YOUR_SERVER_PORT_HERE'
}
pcConfig.iceServers = [turnServer]
var pc = new RTCPeerConnection(pcConfig, pcConstraints);
// use your conn here