activemq/apache-activemq-5.9.0/conf/activemq.xml (No such file or directory)? - activemq

i have just installed activemq, but when i try to run the following command:
./activemq start xbean:file:workspace/activemq/apache-activemq-5.9.0/conf/activemq.xml
I get the following:
emq/apache-activemq-5.9.0/conf/activemq.xml
INFO: Loading '/etc/default/activemq'
INFO: Using java '/usr/bin/java'
INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details
INFO: pidfile created : '/home/pi/workspace/activemq/apache-activemq-5.9.0/data/activemq-pi.pid' (pid '2576')
activemq/apache-activemq-5.9.0/bin/activemq status returns the following:
INFO: Loading '/etc/default/activemq'
INFO: Using java '/usr/bin/java'
ActiveMQ not running
The activemq.log says the following:
Caused by: java.io.FileNotFoundException: workspace/activemq/apache-activemq-5.9.0/conf/activemq.xml./activemq (No such file or directory)
But the activemq.xml file is there?. I am very new to activemq and dont know where to go from here, thank you.

Related

how to inject sonar-project.properties into msbuild in sonarqube

I have a c-sharp solution (say sample.sln), but to run sonarqube analysis, as per the docs, i have run the following command:
".\3rdparty\sonarqube\msbuild\SonarScanner.MSBuild.exe" begin /k:"comm"
/n:"comm" /v:"2.0"
/d:sonar.cs.dotcover.reportsPaths=
"D:\Jenkins\workspace\comm\TEST\CoverageReport.html"
/d:sonar.host.url="http://101.149.24.128"
/d:sonar.sources="D:\Jenkins\workspace\comm\source\*.cs"
msbuild comm.sln /t:Rebuild
".\3rdparty\sonarqube\msbuild\SonarScanner.MSBuild.exe" end
but getting this error :
SONAR_SCANNER_OPTS is not configured. Setting it to the default value of -Xmx1024m
Calling the SonarQube Scanner...
INFO: Scanner configuration file: D:\Jenkins\workspace\comm\3rdparty\sonarqube\msbuild\sonar-scanner-3.2.0.1227\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: D:\Jenkins\workspace\comm\.sonarqube\out\sonar-project.properties
INFO: SonarQube Scanner 3.2.0.1227
INFO: Java 1.8.0_151 Oracle Corporation (64-bit)
INFO: Windows Server 2016 10.0 amd64
INFO: SONAR_SCANNER_OPTS=-Xmx1024m
INFO: User cache: C:\Users\jenkins\.sonar\cache
INFO: SonarQube server 6.7.5
INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
INFO: Publish mode
INFO: Load global settings
INFO: Load global settings (done) | time=278ms
INFO: Server id: 7950B4AD-AWYRoMpRpurWib7aM-qP
INFO: User cache: C:\Users\jenkins\.sonar\cache
INFO: Load plugins index
INFO: Load plugins index (done) | time=84ms
INFO: Process project properties
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 13.565s
INFO: Final Memory: 6M/84M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: Unable to load component class org.sonar.scanner.scan.ProjectLock
ERROR: Caused by: Unable to load component class org.sonar.scanner.scan.DefaultInputModuleHierarchy
ERROR: Caused by: Unable to load component class org.sonar.scanner.scan.ProjectBuildersExecutor
ERROR: Caused by: Unable to load component class com.talanlabs.sonar.plugins.gitlab.CommitProjectBuilder
ERROR: Caused by: Unable to load component class com.talanlabs.sonar.plugins.gitlab.GitLabPluginConfiguration
ERROR: Caused by: Unable to load component class org.sonar.scanner.scan.MutableProjectSettings
ERROR: Caused by: Unable to load component class org.sonar.api.batch.bootstrap.ProjectReactor
**ERROR: Caused by: Illegal char <*> at index 43: D:\Jenkins\workspace\comm\source\*.cs**
ERROR:
The SonarQube Scanner did not complete successfully
so i thought of adding, all the sonar related properties into sonar-project.properties, and kept inside the project root folder, and ran the analysis. but got an error below.
sonar-project.properties files are not understood by the SonarScanner for MSBuild. Remove those files from the following folders: D:\Jenkins\workspace\comm
have looked at this question
what i could infer from this post is, we cannot set sonar-project.properties for msbuild ? is it ?
So then how to do include/exclude files/folders from code coverage in sonar analysis ? I don't have admin access, to set administrative global exclusions
Any help ?
P.S using sonarqube LTS 6.7.6

Providing path to Firefox/Chrome/IE installation in cygwin

I'm trying to launch Firefox remotely on a windows machine from UNIX box using remotewebdriver.
I've tried by adding Firefox in the PATH as below:
$ echo $PATH
/cygdrive/c/Program Files (x86)/Google/Chrome/Application/:/cygdrive/c/Program Files (x86)/Mozilla Firefox/
But still the browser fails to launch as the geckodriver.exe tries to find Firefox in the windows default path.
Here is the log from selenium hub:
1486475449767 mozprofile::profile INFO Using profile path
C:\cygwin64\tmp\rus
t_mozprofile.Rmyr2i85U1HV
1486475449774 geckodriver::marionette INFO Starting browser
C:\Program Files (x86)\Mozilla Firefox\firefox.exe
I also tried adding below property while launching selenium node:
-Dwebdriver.firefox.bin="/cygdrive/c/Program Files (x86)/Mozilla Firefox/"
However, the exception was thrown:
Caused by: org.openqa.selenium.WebDriverException: 'webdriver.firefox.bin' property set, but unable to locate the requested binary: /cygdrive/c/Program Files (x86)/Mozilla Firefox/.exe
..........
Exception: Could not initialize class org.openqa.selenium.firefox.internal.Executable
Is there a way to provide the path to the firefox installation folder?
EDIT:
After providing parameters:
-Dwebdriver.gecko.driver=geckodriver.exe -Dwebdriver.firefox.bin="firefox/firefox.exe"
The execution gets stuck at:
1486534065121 mozprofile::profile INFO Using profile path C:\cygwin64\tmp\rust_mozprofile.eqdfIaNAGjDu
1486534065135 geckodriver::marionette INFO Starting browser >C:\cygwin64\home\Administrator\firefox\firefox.exe
1486534065198 geckodriver::marionette INFO Connecting to Marionette on localhost:56702
1486534068740 Marionette INFO Listening on port 56702
Try escape characters and specify the .exe file:
-Dwebdriver.firefox.bin="/cygdrive/c/Program Files\ (x86)/Mozilla Firefox/firefox.exe"

Endeca baseline failed as 'permission denied' in renaming the Dgraph log file [duplicate]

During baseline update, I am getting error as backup_log_dir_for_component_Dgraph2 failed.
1. Below is the error from baseline_update.out file
Setting flag 'baseline_data_ready' in the EAC.
1 file(s) moved.
[06.28.16 05:26:02] INFO: Checking definition from AppConfig.xml against existing EAC provisioning.
[06.28.16 05:26:02] INFO: Definition has not changed.
[06.28.16 05:26:02] INFO: Starting baseline update script.
[06.28.16 05:26:02] INFO: Acquired lock 'update_lock'.
.
.
.
more logs in between
.
.
.
[06.28.16 05:26:17] INFO: [ITLHost] Starting component 'Forge'.
[06.28.16 05:45:14] INFO: [ITLHost] Starting backup utility 'backup_log_dir_for_component_Dgidx'.
[06.28.16 05:45:15] INFO: [ITLHost] Starting component 'Dgidx'.
[06.28.16 06:00:59] INFO: [MDEXHost] Starting shell utility 'cleanDir_local-dgraph-input'.
[06.28.16 06:01:01] INFO: [MDEXHost] Starting shell utility 'rmdir_dgraph-input-old'.
[06.28.16 06:01:03] INFO: [MDEXHost] Starting copy utility 'copy_index_to_host_MDEXHost'.
[06.28.16 06:01:26] INFO: Applying index to dgraphs in restart group 'A'.
[06.28.16 06:01:26] INFO: [MDEXHost] Starting shell utility 'mkpath_dgraph-input-new'.
[06.28.16 06:01:27] INFO: [MDEXHost] Starting copy utility 'copy_index_to_temp_new_dgraph_input_dir_for_Dgraph1'.
[06.28.16 06:01:59] INFO: [MDEXHost] Starting shell utility 'move_dgraph-input_to_dgraph-input-old'.
[06.28.16 06:02:01] INFO: [MDEXHost] Starting shell utility 'move_dgraph-input-new_to_dgraph-input'.
[06.28.16 06:02:02] INFO: [MDEXHost] Starting backup utility 'backup_log_dir_for_component_Dgraph1'.
[06.28.16 06:02:03] INFO: [MDEXHost] Starting component 'Dgraph1'.
[06.28.16 06:02:10] INFO: [MDEXHost] Starting shell utility 'rmdir_dgraph-input-old'.
[06.28.16 06:02:12] INFO: Applying index to dgraphs in restart group 'B'.
[06.28.16 06:02:12] INFO: [MDEXHost] Starting shell utility 'mkpath_dgraph-input-new'.
[06.28.16 06:02:13] INFO: [MDEXHost] Starting copy utility 'copy_index_to_temp_new_dgraph_input_dir_for_Dgraph2'.
[06.28.16 06:02:38] INFO: Stopping component 'Dgraph2'.
[06.28.16 06:02:39] INFO: [MDEXHost] Starting shell utility 'move_dgraph-input_to_dgraph-input-old'.
[06.28.16 06:02:40] INFO: [MDEXHost] Starting shell utility 'move_dgraph-input-new_to_dgraph-input'.
[06.28.16 06:02:42]
INFO: [MDEXHost] Starting backup utility 'backup_log_dir_for_component_Dgraph2'.
[06.28.16 06:02:43] SEVERE: Utility 'backup_log_dir_for_component_Dgraph2' failed. Refer to utility logs in [ENDECA_CONF]/logs/archive on host MDEXHost.
Occurred while executing line 5 of valid BeanShell script:
[[
2|
3| DgraphCluster.cleanDirs();
4| DgraphCluster.copyIndexToDgraphServers();
5| DgraphCluster.applyIndex();
6|
7|
]]
[06.28.16 06:02:43] SEVERE: Error executing valid BeanShell script.
Occurred while executing line 35 of valid BeanShell script:
[[
32| Dgidx.run();
33|
34| // distributed index, update Dgraphs
35| DistributeIndexAndApply.run();
36|
37| // if Web Studio is integrated, update Web Studio with latest
38| // dimension values
]]
[06.28.16 06:02:43] SEVERE: Caught an exception while invoking method 'run' on object 'BaselineUpdate'. Releasing locks.
2. Below is the error from backup_log_dir_for_component_Dgraph2.log file (Filepath PlatformServices\workspace\logs\archive)
Renaming G:\Endeca\MyEndecaApp\config\script\..\..\.\logs\dgraphs\Dgraph2 to G:\Endeca\MyEndecaApp\config\script\..\..\.\logs\dgraphs\Dgraph2.2016_06_28.06_02_42
Unable to rename G:\Endeca\MyEndecaApp\config\script\..\..\.\logs\dgraphs\Dgraph2 to G:\Endeca\MyEndecaApp\config\script\..\..\.\logs\dgraphs\Dgraph2.2016_06_28.06_02_42: Permission denied
I tried running the baseline update again and again, sometimes Dgraph1 fails and sometime Dgraph2. After failure the dgraph also stopped.
Edit 1: I have observed that when I stops both the dgraphs from workbench and then run baseline update, it always ran successfully. I tried this 4-5 times.
We know baseline_update stops dgraph before doing backup of log folder. So I am assuming dgraph is not stopped properly before baseline_update do backup of log folder and so it generates error.
Please help me in resolving the issue. I am novice in Endeca Administration
Thank you
There are a couple of scenarios that will cause the permission problem.
According to the Endeca Installation Documentation you should install Endeca as a specific user on the Windows Server. Lets assume that user is called 'endeca'. Did you make sure that the 'endeca' user is the current owner of the G:\Endeca\MyEndecaApp folder and subfolders? After specifying the 'owner' you also need to set the permissions on this folder as Full to the 'endeca' user. Are you running your Endeca Services as the 'endeca' user?
Assuming you've done the above and you still have an issue it can also happen based on how you start your index. If you kick off a baseline index from the CMD prompt, are you doing this as yourself, the 'endeca' user or 'Administrator'? Depending on who you ran the last index as will determine if you have permission to all the subsequent runs. I tend to do CMD line executions as 'Administrator' and have had very few permission problems.
Are you perhaps inspecting the log files in 'Notepad.exe'? It locks the file aggressively so you won't be able to rename the file, or the folder, if you have it open in 'Notepad'. Either make sure you don't have it open in 'Notepad' or rather use 'Notepad++' which doesn't lock the file.
Lastly I've also had issues where CMD prompt was open in the log folder that needs to be renamed. So make sure your CMD prompt is either closed or doesn't open your log folders.
Been running Endeca on Windows Server 2012 R2 for the last 3 years and those are the only issues I've had. If all else fails you can always try the sysinternals tools, in particular 'procmon.exe', but it will output a lot of information during the time you are building an index so be prepared for information overload.
Changing the Dgraph property 'numIdleSecondsAfterStop' to 90 seconds from IAP workbench solved the problem.
It shows that the failure was due to the Dgraph was not properly stopped before rename and log folder was locked by Dgraph.
Setting 'numIdleSecondsAfterStop' causes the baseline to wait for 90 seconds to process next steps after Dgraph stops.
The problem is very clear in logs, such a folder doesn't exists and so baseline process is unable to rename the folder Dgraph2. This usually occurs when the process fails in-between when the baseline update is running. Say for example you ran the process and the script clears a folder after taking back up of that contents and it fails. Again you might run the process from the first so when it tries to clear the same again, you usually get the error of missing folder. Simple solution is that create the missing folder Dgraph2 or when the update fails due to workbench down or anything. Then comment the app config script till it had successfully ran and run again from that particular instance. Hope this helps!

Java Servlet - Null Pointer Exception & .jar not loaded

So my situation is a bit odd because I am looking at a server with no access to the source code. Everything regarding the servlets has worked fine up until now, but there is this sudden, spontaneous error that has come up regarding one of the Java servlets having a null pointer exception.
Here is the error log:
INFO: Added header: Cache-Control: no transform
8-Apr-2014 10:57:16 AM org.apache.catalina.core.ApplicationContext log
INFO: Added header: Cache-Control: no cache
8-Apr-2014 10:57:16 AM org.apache.catalina.core.ApplicationContext log
INFO: Attempted context: null
8-Apr-2014 10:57:16 AM org.apache.catalina.core.ApplicationContext log
INFO: Request URI: /public_stage//def.jsp
8-Apr-2014 10:57:16 AM org.apache.catalina.core.ApplicationContext log
INFO: Real path: /opt/apps/tomjet/webapps/public_stage/def.jsp
8-Apr-2014 10:57:16 AM org.apache.catalina.core.ApplicationContext log
INFO: servlet context: null
8-Apr-2014 1:35:02 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet PushServletMAG threw exception
java.lang.NullPointerException
at com.openwave.wappush.Pusher.netSendRequest(Pusher.java:312)
at com.openwave.wappush.Pusher.send(Pusher.java:230)
at ca.test.servlet.ExtendedPush.pushServiceIndication(ExtendedPush.java:105)
at ca.test.servlet.CDMAPushServlet.doPost(CDMAPushServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:419)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)
However going over to the catalina file I notice that it states that in a few locations, it is trying to validate .jar files, and that there are servlet.jar files not being loaded in the WEB-INF/lib directory.
Here is an example of a line with a certain location:
8-Apr-2014 2:02:00 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/opt/apps/tomjet/webapps/wapMIG/WEB-INF/lib/servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Overall I am quite baffled by this problem as in terms of user interaction with the source code there was absolutely none as no one has access to it. It was just so sudden and spontaneous.
Any ideas/sources that could possibly help me with this problem? Much appreciated.
The error is the jar servlet-api.jar in your WEB-INF/folder, the container provide the servlet-api.jar and it cause the problem in deployment, you need to remove this jar from your lib folder.
You could need this jar to compile your project, so you must configure the project to use this jar in your IDE, in eclipse you can add it in the Java Build Path as an external jar, but I recommend you to enable the Web Dynamic Project Facet and configuring tomcat as your runtime enviroment. (Project -> Properties -> Project Facets)

MSDeploy - Can not deploy using the batch file generated by msbuild

With visual studio 2012 set up projects has been discontinued. I was finding a way to automatically do a web deploy using team city and I stumbled across this fantastic article
http://www.troyhunt.com/2010/11/you-deploying-it-wrong-teamcity.html
I was able to create a package for my website(LogIn) using msbuild, which created following artifacts
PackageTmp
Login.deploy.cmd
Login.deploy-readme.txt
Login.SetParameters.xml
Login.SourceManifest.xml
Login.zip
What I wanted to do next is, after doing some xml transform using Nant inbuilt peek functionality, I simply want to invoke the Login.deploy.cmd through Nant. To test this batch file, I ran this file with following parameter
login.deploy.cmd /T
which generated following out put
=========================================================
SetParameters from:
"C:\Soft\Nant\nant-0.92\bin\LogIn\LogIn\obj\Debug\Package\Login.SetParameters.xm
l"
You can change IIS Application Name, Physical path, connectionString
or other deploy parameters in the above file.
-------------------------------------------------------
Start executing msdeploy.exe
-------------------------------------------------------
"C:\Program Files\IIS\Microsoft Web Deploy V3\\msdeploy.exe" -source:package='C
:\Soft\Nant\nant-0.92\bin\LogIn\LogIn\obj\Debug\Package\Login.zip' -dest:auto,in
cludeAcls='False' -verb:sync -disableLink:AppPoolExtension -disableLink:ContentE
xtension -disableLink:CertificateExtension -setParamFile:"C:\Soft\Nant\nant-0.92
\bin\LogIn\LogIn\obj\Debug\Package\Login.SetParameters.xml" -whatif
Info: Adding sitemanifest (sitemanifest).
Info: Creating application (Default Web Site/Login_deploy)
Info: Adding virtual path (Default Web Site/Login_deploy)
Info: Adding directory (Default Web Site/Login_deploy).
Info: Adding file (Default Web Site/Login_deploy\About.aspx).
Info: Adding directory (Default Web Site/Login_deploy\Account).
Info: Adding file (Default Web Site/Login_deploy\Account\ChangePassword.aspx).
Info: Adding file (Default Web Site/Login_deploy\Account\ChangePasswordSuccess.a
spx).
Info: Adding file (Default Web Site/Login_deploy\Account\Login.aspx).
Info: Adding file (Default Web Site/Login_deploy\Account\Register.aspx).
Info: Adding file (Default Web Site/Login_deploy\Account\Web.config).
Info: Adding directory (Default Web Site/Login_deploy\bin).
Info: Adding file (Default Web Site/Login_deploy\bin\LogIn.dll).
Info: Adding file (Default Web Site/Login_deploy\bin\LogIn.pdb).
Info: Adding file (Default Web Site/Login_deploy\Default.aspx).
Info: Adding file (Default Web Site/Login_deploy\Global.asax).
Info: Adding file (Default Web Site/Login_deploy\Login.aspx).
Info: Adding directory (Default Web Site/Login_deploy\Scripts).
Info: Adding file (Default Web Site/Login_deploy\Scripts\jquery-1.4.1-vsdoc.js).
Info: Adding file (Default Web Site/Login_deploy\Scripts\jquery-1.4.1.js).
Info: Adding file (Default Web Site/Login_deploy\Scripts\jquery-1.4.1.min.js).
Info: Adding file (Default Web Site/Login_deploy\Site.Master).
Info: Adding directory (Default Web Site/Login_deploy\Styles).
Info: Adding file (Default Web Site/Login_deploy\Styles\Site.css).
Info: Adding file (Default Web Site/Login_deploy\Web.config).
Info: Adding ACL's for path (Default Web Site/Login_deploy)
Info: Adding ACL's for path (Default Web Site/Login_deploy)
Total changes: 27 (26 added, 0 deleted, 1 updated, 0 parameters changed, 549895
bytes copied)
The logs says it has created a virtual directory by name Login_deploy, but when I check it from inet manager, I do not see any virtual directory with this name.
I am little bit confused here. Any suggestions welcome.
Edit
I also tried to invoked the msdelpoy exe manually using the following command line parameter
msdeploy.exe
-source:package=’Login.zip‘
-dest:auto
-verb:sync
-disableLink:AppPoolExtension
-disableLink:ContentExtension
-disableLink:CertificateExtension
-allowUntrusted
-retryAttempts=2
-setParam:’IIS Web Application Name’=’TargetWebApp‘
which gave following error
Error: Unrecognized argument 'Web'. All arguments must begin with "-".
Error count: 1.
Try running this:
login.deploy.cmd /Y
Tthe /T switch is for testing, and the /Y switch will actually install the package.