I have an app on jboss which logging through log4j. When I running my server through bat file (standalone.bat) logs work, but there is a problem under standalone.sh file. Here is how I set JAVA_OPTS in standalone.bat:
set "JAVA_OPTS=%JAVA_OPTS% -Dlog4j.configuration=file:../standalone/configuration/log4j.xml"
and it works. How should I do this in standalone.sh file? I tried something like this:
JAVA_OPTS= "$JAVA_OPTS -Dlog4j.configuration=file:$JBOSS_HOME/standalone/configuration/log4j.xml"
But it doesn't work. Any ideas? Thanks in advance for your help.
The standalone.sh file will be interpreted by the shell, so it needs to be valid shell script. Remove the space after the = and you should be good. That makes the java opts line look like:
JAVA_OPTS="$JAVA_OPTS -Dlog4j.configuration=file:$JBOSS_HOME/standalone/configuration/log4j.xml"
Adding a JAVA_OPTS= line to standalone.conf (as Pawel mentioned) seems to work great. Then run standalone.sh as usual. You should see your JAVA_OPTS listed in the boot-up message.
Related
I did install Snowsql 1.25. Installation went fine.
I configure the config file the the right account (xq59548.us-east-2.aws) user and password.
My .profile file seems fine and so is the $PATH:
Error with zhh - command not found
Has anyone encoutered this issue?
As I see, the path of Snowsql is missing. I can see that my path includes the following:
/Applications/SnowSQL.app/Contents/MacOS
Could you try to run it after adding the above path to your PATH variable?
Yep...The PATH was missing indeed.
The Python librairies were not visible by the z shell program.
I added a zprofile file at the root with the following:
alias snowsql=/Applications/SnowSQL.app/Contents/MacOS/snowsql
And it worked fine.
Funny that the SnowSQL installer does not create that file.
Thanks for your input bud!
I'm writing a PowerShell script to make some modifications to the Advanced Logging that's already in place on a few servers. The main issue I'm having is with the command below that was generated using Configuration Editor:
.\appcmd.exe set config "wh01-02.testlab.com" -section:system.webServer/advancedLogging/server /+"logDefinitions.[baseFileName='Log404'].filter.condition.[operator='0'].[field='Status',operator='Equals',value='404']" /commit:apphost
When I run this script, I get the following error:
ERROR ( message:Cannot find requested collection element. )
Kinda stumped on this one. Ideas anyone?
Ok, figured it out. Looks like I needed to create the 'And' operator first, then run the command:
.\appcmd.exe set config "wh01-02.testlab.com" -section:system.webServer/advancedLogging/server /+"logDefinitions.[baseFileName='Log404'].filter.condition.[operator='And']" /commit:apphost
.\appcmd.exe set config "wh01-02.testlab.com" -section:system.webServer/advancedLogging/server /+"logDefinitions.[baseFileName='Log404'].filter.condition.[operator='And'].[field='Status',operator='Equals',value='404',caseSensitive='False',regularExpression='False']" /commit:apphost
.
Here are these logs that are continuously coming till the end line of code and its very irritating. i need help to turn off these logs
this is an issue of selenium 3.01 and above. I have read it from this link:
You can use LoggingPreferences class and enable the properties. Try this answer it may helps you:
Create a windows batch file with below commands and provide that batch file as a parameter while setting the gecko driver property. Please see the below code.
Batch File as gecko.bat:
#ECHO OFF
C:\Selenium\****\geckodriver.exe --log fatal %* > NUL 2>&1
Set Gecko driver system property in the script before initializing the Firefox driver. Please see below
System.setProperty("webdriver.gecko.driver","C:/Selenium/***/gecko.bat");
WebDriver driver = new FirefoxDriver();
In the above code C:\Selenium\****\geckodriver.exe is the path of the geckodriver.exe in your PC and C:/Selenium/***/gecko.bat is the path of the batch you created and saved on your PC.
This will work for sure. All the best.
I use Yii command line inside web Root folder (C:\xampp\htdocs\myapps\cmd.exe). My command looks like this:
D:\xampp\htdocs\YiiRoot\framework\yiic shell
normally it will works, but now it didn't; I just get no output:
Sorry for late answer.
Have you configured access rules since last time you used it? If index.php isn't accessible without login anymore, the yiic tool will fail. You can overcome that by specifying the path to the config file:
protected\yiic shell protected\config\main.php
I experienced the same thing and in the end I discovered yiic file was unexpectedly empty!
A way to discover what happens behind the scenes is to comment "rem echo off" at the beginning of yiic.bat file.
I want to debug PHP from NetBeans 7.1. My web server is IIS.
I've first of all discovered that NetBeans tries to use XDebug, downloaded it, copied DLL to appropriate folder. Now I would like to know how to configure it properly.
The online php config analyser gave me following advices:
Download php_xdebug-2.1.4-5.3-vc9-nts.dll
Move the downloaded file to C:\Program Files\PHP\v5.3\ext
Edit C:\Program Files\PHP\v5.3\php.ini and add the line
zend_extension = C:\Program Files\PHP\v5.3\ext\php_xdebug-2.1.4-5.3-vc9-nts.dll
Restart the webserver
Ok, everything is clear, except in which section of php.ini to put the line. I'm in doubt.
On the other side, Netbeans complains:
No connection from xdebug was detected within 224 seconds. The reasons
could be that xdebug is not installed or not properly configured. Be
sure that your php.ini file contains these entries:
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost (or hostname)
xdebug.remote_port=9000
And again, in which section of php.ini to put these lines?
You can add xdebug lines anywhere to the php ini file most likely at the end. To check if xdebug is correctly installed check phpinfo function and the debugclient. You can get the debugclient at the xdebug homepage: http://xdebug.org/docs/install. When you start it with the switches -i 9000 -r 9000 it should connect to xdebug after then you can verify it with netstat -an | grep 9000. Then you can load an example webpage and look at the output of the debugclient. Just in case check your xdebug log. When it works with the debugclient you have a good proof and you can make it work with your IDE. This help me a lot: http://forums.netbeans.org/topic1513-30.html. You can also check this script if the xdebug is listen to port 9000:
<?php
$address = '127.0.0.1';
$port = 9000;
$sock = socket_create(AF_INET, SOCK_STREAM, 0);
socket_bind($sock, $address, $port) or die('Unable to bind');
socket_listen($sock);
$client = socket_accept($sock);
echo "connection established: $client";
socket_close($client);
socket_close($sock);
?>
It didn't work for me but give it a try?
I've lighttpd and xdebug on my virtual machine and I use a reverse shell with my remote server. I use Komodo IDE.
You can add it anywhere in the file. If you search for "extension" or ".so" or ".dll" I'm sure you will find an example in the php.ini file. I am not too familiar with Windows, but on linux, typing "php -m" into the terminal lists all the currently loaded modules. Xdebug should be listed twice, once under PHP and once under Zend.
Example
; php -m
Outputs ...
[PHP Modules]
mysql
mysqli
curl
xdebug
[Zend Modules]
xdebug
A couple of things you can check to help get through this is output the phpinfo() on a webpage and check that the php.ini you are editing is the one being loaded. It's listed under "Default Configuration File"
Also after you restart your server. Check the server log to make sure there aren't any errors in the configuration file.
I have xDebug running in Netbeans, but I don't use the configuration they provide in their error message. I only added one line to my .ini file:
zend_extension=<path_to_extension>/xdebug.so
Zend extensions (at least with my setup) require a full path so check that the path is full (which it looks like yours is) and that it is correct.
You could also try putting the extension in your default extension folder listed in phpinfo under "extension_dir".
I had a similar issue and came across a post to fix the problem. My html form (testform.html) was calling a php script (runQuery.php) and Netbeans could not break at the set break points.
After checking all the configuration settings in php.ini and Netbeans by searching on forums like this one, I discovered that netbeans will only break on the break points if the Index file for the project is a PHP file. This is very important otherwise you will spend hours trying to figure out why break points are not working.
In Netbeans go into the File/Project Properties/Run Configuration and check that the Index file is a PHP file. In my case I changed my index file from testform.html to testform.php and it worked, I was able to break on break points.
Yasar.
If you have tried the xdebug thing in php.ini
and it didn't work, I had the same problem. I read online help to no avail. Later I noticed that my url was displaying the wrong address:
localhost/todolist/web/web/index.php?XDEBUG_SESSION_START=netbeans-xdebug
when it was supposed to be
localhost/todolist/web/index.php?XDEBUG_SESSION_START=netbeans-xdebug
I corrected that and got it working.
I was having a similar issue and thanks to J.Money's advice of running PHP -M, I worked out the problem is that my path had a space in it and hence needed double quotes around it:
To solution is to change:
zend_extension = C:\Program Files\PHP\v5.3\ext\php_xdebug-2.1.4-5.3-vc9-nts.dll
To:
zend_extension = "C:\Program Files\PHP\v5.3\ext\php_xdebug-2.1.4-5.3-vc9-nts.dll"
I have also logged this as a bug: http://bugs.xdebug.org/view.php?id=922