Indexing symbol files with P4Index zero files found - perl

I am trying to setup a symbol server, and hence I need the symbols indexed to map to the source version.
I am running p4Index on folder where the solution resides.
my disc files and folders:
.\CalculatorDemo\bin\ where the output is produced
.\CalculatorDemo\CalculatorApp\ contains source
.\CalculatorDemo\CalculatorDll\ contains source
.\CalculatorDemo\CalculatorTest\ contains source
In my version control the path in the depot is:
//sw/Main/Internal/CalculatorDemo/
and my workspace is:
c:\Projects\Dev\sw\Main\Internal\CalculatorDemo\
When I try to index it I get no files found..
C:\projects\dev\sw\main\Internal\CalculatorDemo>p4Index -debug
---
ssindex.cmd [STATUS] : Server ini file: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv\srcsrv.ini
ssindex.cmd [STATUS] : Source root : C:\projects\dev\sw\main\Internal\CalculatorDemo
ssindex.cmd [STATUS] : Symbols root : C:\projects\dev\sw\main\Internal\CalculatorDemo
ssindex.cmd [STATUS] : Control system : P4
ssindex.cmd [STATUS] : P4 program name: p4.exe
ssindex.cmd [STATUS] : P4 Label :
ssindex.cmd [STATUS] : Old path root :
ssindex.cmd [STATUS] : New path root :
ssindex.cmd [STATUS] : Partial match : Not enabled
---
ssindex.cmd [STATUS] : Running... this will take some time...
ssindex.cmd [INFO ] : ... indexing C:\projects\dev\sw\main\Internal\CalculatorDemo\bin\x64 \Debug\CalculatorApp.pdb
ssindex.cmd [INFO ] : ... zero source files found ...
ssindex.cmd [INFO ] : ... indexing C:\projects\dev\sw\main\Internal\CalculatorDemo\bin\x64\Debug\CalculatorDll.pdb
ssindex.cmd [INFO ] : ... zero source files found ...
ssindex.cmd [INFO ] : ... indexing C:\projects\dev\sw\main\Internal\CalculatorDemo\bin\x64 \Debug\CalculatorTest.pdb
I cannot seem to get the hole through and get the file version info into the pdb's. - (I am doing this on my developer maschine, because I want to get the script working before I involve our build server)
Does anyone know (yes offcause someone does) how I can get the problem debugged/fixed. I probably has to do som perl debuggin or something. - I suspect that it could be a problem with not pointing to the rigth place
on the perforce server...
Thanks in advance
Kenneth

I just had something similar this morning.
I'll share my solution if it can help some.
The p4 environment variable weren't properly set in my case.
You can either set them manually or go in P4V, Connection -> Environment Settings..., don't change anything and press OK.
To make sure they're properly set, open a command prompt and type "p4 set", you should see a set of variables reflecting information on your current connection to Perforce.
Hope this helps.

Related

VSTS-Agent cannot chmod

(target machines : RedHat 7)
I use the "Copy File" task, which works fine when using the "Overwrite" option
but when not using that option , I receive a EPERM permission denied when the vstsagent tries to chmod some files already there
there is an obvious security policy that forbids anything else but root (and sudo commands) to do chmod's on the file system
how can we adress this issue without compromising our system security ?
thanks
2018-06-19T13:03:59.9255736Z ##[section]Starting: Copy Files to: /data/apache/var/www/html/******
2018-06-19T13:03:59.9380638Z ==============================================================================
2018-06-19T13:03:59.9408913Z Task : Copy Files
2018-06-19T13:03:59.9437816Z Description : Copy files from source folder to target folder using match patterns (The match patterns will only match file paths, not folder paths)
2018-06-19T13:03:59.9466225Z Version : 2.117.0
2018-06-19T13:03:59.9494054Z Author : Microsoft Corporation
2018-06-19T13:03:59.9522338Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=708389)
2018-06-19T13:03:59.9550616Z ==============================================================================
2018-06-19T13:04:00.5528521Z found 7 files
2018-06-19T13:04:00.5585656Z Copying /home/saehqvsts/vstsagent2/_work/r3/a/artifact/drop/delete_files.sh to /data/apache/var/www/html/******/delete_files.sh
2018-06-19T13:04:00.5743041Z Copying /home/saehqvsts/vstsagent2/_work/r3/a/artifact/drop/images/home/blog-image01.png to /data/apache/var/www/html/******/images/home/blog-image01.png
2018-06-19T13:04:00.5773633Z Copying /home/saehqvsts/vstsagent2/_work/r3/a/artifact/drop/images/home/blog-image02.png to /data/apache/var/www/html/******/images/home/blog-image02.png
2018-06-19T13:04:00.5803794Z Copying /home/saehqvsts/vstsagent2/_work/r3/a/artifact/drop/images/home/blog-image03.png to /data/apache/var/www/html/******/images/home/blog-image03.png
2018-06-19T13:04:00.5833235Z Copying /home/saehqvsts/vstsagent2/_work/r3/a/artifact/drop/index.php to /data/apache/var/www/html/******/index.php
2018-06-19T13:04:00.5861627Z shell.js: internal error
2018-06-19T13:04:00.5890403Z Error: EPERM: operation not permitted, chmod '/data/apache/var/www/html/******/index.php'
2018-06-19T13:04:00.5918532Z at Error (native)
2018-06-19T13:04:00.5946236Z at Object.fs.chmodSync (fs.js:1168:18)
2018-06-19T13:04:00.5975560Z at copyFileSync (/home/saehqvsts/vstsagent2/_work/_tasks/CopyFiles_5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c/2.117.0/node_modules/shelljs/src/cp.js:41:6)
2018-06-19T13:04:00.6005484Z at /home/saehqvsts/vstsagent2/_work/_tasks/CopyFiles_5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c/2.117.0/node_modules/shelljs/src/cp.js:198:5
2018-06-19T13:04:00.6034026Z at Array.forEach (native)
2018-06-19T13:04:00.6063516Z at Object._cp (/home/saehqvsts/vstsagent2/_work/_tasks/CopyFiles_5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c/2.117.0/node_modules/shelljs/src/cp.js:157:11)
2018-06-19T13:04:00.6094451Z at Object.cp (/home/saehqvsts/vstsagent2/_work/_tasks/CopyFiles_5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c/2.117.0/node_modules/shelljs/src/common.js:186:23)
2018-06-19T13:04:00.6124783Z at Object.cp (/home/saehqvsts/vstsagent2/_work/_tasks/CopyFiles_5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c/2.117.0/node_modules/vsts-task-lib/task.js:827:15)
2018-06-19T13:04:00.6154870Z at matchedFiles.forEach.err (/home/saehqvsts/vstsagent2/_work/_tasks/CopyFiles_5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c/2.117.0/copyfiles.js:119:20)
2018-06-19T13:04:00.6183521Z at Array.forEach (native)
2018-06-19T13:04:00.6774571Z ##[error]Exit code 1 returned from process: file name '/home/saehqvsts/vstsagent2/externals/node/bin/node', arguments '"/home/saehqvsts/vstsagent2/_work/_tasks/CopyFiles_5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c/2.117.0/copyfiles.js"'.
2018-06-19T13:04:00.6890413Z ##[section]Finishing: Copy Files to: /data/apache/var/www/html/******
That's because the files are existing there, you just need to clean up the existing files in that path or using the "Overwrite" option to overwrite them.

How to find mongodb data and log files location through command?

How to find mongodb data and log files location through command?
like below SQL server command.
SELECT * FROM sys.database_files
The easiest way is probably with the getCmdLineOpts command:
db.getSiblingDB("admin").runCommand({getCmdLineOpts:1})
This Mongo Shell command will first switch to the admin database then execute the getCmdLineOpts command. An alternative is the shell wrapper:
db.serverCmdLineOpts()
These will return the parsed command line options, which should contain both the data directory being used and the log path.
{
"argv" : [
"C:\\****\\3.4.10\\bin\\mongod.exe",
"--dbpath",
"C:\\****\\data",
"--port",
"27017",
"--logpath",
"C:\\****\\data\\mongod.log",
"--bind_ip",
"0.0.0.0"
],
"parsed" : {
"net" : {
"bindIp" : "0.0.0.0",
"port" : 27017
},
"storage" : {
"dbPath" : "C:\\****\\data"
},
"systemLog" : {
"destination" : "file",
"path" : "C:\\****\\data\\mongod.log"
}
},
"ok" : 1
}
Note: I obfuscated my paths, they do not normally contain ****.
You can see it provides both the raw values as well as the parsed values. If both command line options and config file options are specified on the command line, this will show the effective values being used by the process. Keep in mind there are several extra options that can effect where data is stored but this should get you on your way pretty quickly.
If you would like to know this information without using the Mongo Shell you will have to either grep the config file or look at the command line options of the running process, or both.
You can view logs in mongoCLI also
to list all logs
> show logs
global
startupWarnings
show log content
> show log global
2018-01-30T09:14:10.305+0530 I CONTROL [initandlisten] MongoDB starting : pid=778 port=27017 dbpath=/var/lib/mongodb 64-bit host=ubuntu
2018-01-30T09:14:10.305+0530 I CONTROL [initandlisten] db version v3.6.1
2018-01-30T09:14:10.305+0530 I CONTROL [initandlisten] git version: 025d4f4fe61efd1fb6f0005be20cb45a004093d1
data path will be printed on global log line 1, in my machine its dbpath=/var/lib/mongodb

Adding a user to a WildFly server, results in error

I am trying to add a user to WildFly server but get an error:
./add-user.sh: 1: eval: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java/bin/java: not found
I suppose I need to change the JAVA_HOME location in a .conf file but have done so in the .conf files of the wildfly/bin directory. How can I solve this issue?
The add-user.sh script doesn't source any configuration file, so you have to provide the Java binary through your environment.
You can do this in multiple ways :
through a JAVA variable pointing to the java executable :
export JAVA=/path/to/jdk_install/bin/java
./add-user.sh [...]
through a JAVA_HOME variable pointing to the Java installation directory :
export JAVA_HOME=/path/to/jdk_install/
./add-user.sh [...]
by including the Java's installation bin directory to your PATH :
export PATH="/path/to/jdk_install/bin:$PATH"
./add-user.sh [...]
Note that these may vary depending on the WildFly or JBoss EAP version ; I gathered these from reading the script of a wildfly-8.1.0.Final installation.
If you're not sure this applies to your own version and if you have even the most basic understanding of shell scripts you should check your own : they're only a few dozens lines long and are well commented.
Your java path is wrong.
You can observe that in below line there is extra '/bin/java'. You should remove that.
./add-user.sh: 1: eval: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java/bin/java: not found
To do so, in your adduser.sh/.bat file replace
# Setup the JVM
if [ "x$JAVA" = "x" ]; then
if [ "x$JAVA_HOME" != "x" ]; then
JAVA="$JAVA_HOME/bin/java"
else
JAVA="java"
fi
fi
To
# Setup the JVM
if [ "x$JAVA" = "x" ]; then
if [ "x$JAVA_HOME" != "x" ]; then
JAVA="$JAVA_HOME"
else
JAVA="java"
fi
fi
This does the magic for me.

What mongodb command I should run to know server info?

For example, I want to know the database directory that is used by mongodb to run what it is?
The documentation said that the default data is in /data/db however, there is no such directory
I wonder if there is a mongodb command to get that simple info. I look through the web and could not find it.
You can see the Configuration Parameters used with:
> db.serverCmdLineOpts()
For example:
{
"argv" : [
"mongod",
"--dbpath",
"/usr/local/db"
],
"parsed" : {
"dbpath" : "/usr/local/db"
},
"ok" : 1
}
Any parameters not specifically listed will be using their default values.
Just create a folder called data anywhere in your system.
Then let Mongo know where the this folder is by updating the path.
in windows you would run this on the command line.
C:\mongodb\bin\mongod.exe --dbpath c:\test\mongodb\data
This is where your mongo stores your data.

MongoDB - eclipse

I need to create a server-side app that saving information to a mongoDB ,
I'm working with java-eclipse-IDE and i have some problems with that .
First ,
I download the mongo-2.7.2.jar and add it to the path ( project ->properties-> java build path -> add jar -> (adding the mongo-2.7.2.jar file ) .
When I press "Run" without writing any other line except the empty - class & main function
The console writing me that :
CLI (1) [java application] path date
Usage : [--bucket bucketname] action
where action is one of:
list : lists all files in the store
put filename : puts the file filename into the store
get filename1 filename2 : gets filename1 from store and sends to filename2
md5 filename : does an md5 hash on a file in the db (for testing)
I tried to put a system.out.print("indications") in the main function but the console showing me the same output ...
onother interesting fact is when i'm wrting a code using a mongo DB the compiler accepted the code and not throwing errors ( seems he accepted the mongo-2.7.2.jar ).
second ,
I thoght maby i need to install a mongoDB plugin to eclipse , should i?
third ,
I saw that maven is integrated a mongoDB service , is it right that i should download maven to eclipse for handle mongoDB?
I need help soon as possible ....
Thanks.
Sounds like its trying to do something with GridFS but is missing a bucket name... are you using GridFS?