Relative directory to read file - integration

I am using IBM Integration Bus v.9
I try to read configuration from file, like this tutorial.
Based on the documentation, I've already set up my environment variable in Windows like this :
MQSI_FILENODES_ROOT_DIRECTORY to C:\MQSIFileInput
In the File Read Node properties, i set input directory to "config" (without apos), because the file located in C:\MQSIFileInput\config directories.
When I run, i got error "The directory config is not a valid directory name". What am I missing here?
Do I need to set up another configuration to read the file properly?
Thank you.

The MQSI_FILENODES_ROOT_DIRECTORY variable needs to be visible to the ExecutionGroup process at startup, so first thing to check is how did you set the env var and did you restart the broker?
Due to the way that processes are forked on windows the process for setting env vars is usually something like:
Stop broker
Close Broker Command Prompt
Modify mqsiprofile.cmd to include variable
Open new Broker Command Prompt
Verify env var is set ie/ echo %MQSI_FILENODES_ROOT_DIRECTORY%
Start Broker
The directory also needs to be readable by the Broker's process ID (and writable if you will be deleting the file or moving it to a backout dir etc).

Related

Problem with the command-line JSON processor JQ in Windows 10, 64 bit

I have downloaded the program jq-win64.exe from 'https://stedolan.github.io/jq/' and installed the program in a folder C:\Program Files\jq\ on my computer.
I have also added the PATH to the program to the end of the systemvariable string in Windows 10 : . . . ;C:\Program Files\curl\;C:\Program Files\jq\
In one terminal window in Visual Studio Code I am running a server.
In another terminal window I am trying to execute the command curl -s localhost:3000 | jq
Terminal window 1:
C:\Users\SteinarV\PROFF_JAVASCRIPT\PROJECT\smartHouse
node server.js
API running on port 3000
Terminal window 2:
C:\Users\SteinarV\PROFF_JAVASCRIPT\PROJECT\smartHouse>curl -s localhost:3000 | jq
'jq' is not recognized as an internal or external command,
operable program or batch file
... and do not understand why jq is not recognized.
Can someone help ?
I have downloaded the program jq-win64.exe from 'https://stedolan.github.io/jq/' and installed the program in a folder C:\Program Files\jq\ on my computer.
As you have indicated, you have a file called jq-win64.exe but you are trying to execute the command jq. You either need to rename the file to jq.exe or you need to use the command jq-win64.
For a detailed explanation of how Windows finds and executes a program in your path when you enter a command, see The Windows NT Command Shell: Command Search Sequence. Specifically:
...The shell now searches each directory specified by the PATH environment variable, in the order listed, for an executable file matching the command name. If a match is found, the external command (the executable file) executes...
...If the command name does not include a file extension, the shell adds the extensions listed in the PATHEXT environment variable, one by one, and searches the directory for that file name. Note that the shell tries all possible file extensions in a specific directory before moving on to search the next directory (if there is one)...
You indicate in the comments the same error persists even when the filenames match. Note that each running program has its own set of environment variables, and these aren't updated by global changes. You need to close and reopen cmd.exe windows after making a global change. See also Adding directory to path environment variable in windows. You can use the path command to verify whether a particular terminal session has inherited the PATH variable you defined, thus narrowing your problem.
You indicate that the problem still persists. You need to use the tools available to you to narrow it down further:
Try running the program with its full path:
"C:\Program Files\jq\jq-win64.exe" --help
This will confirm that the program is present where you think it is and can be run from the terminal.
Try running the program with no path and its extension:
jq-win64.exe --help
If this works but running the program without an extension doesn't, you might have set PATHEXT to something that doesn't include ".EXE".
Try setting the path explicitly in the terminal to contain only the program directory and nothing else, then run it with its full extension:
set PATH=C:\Program Files\jq
jq-win64.exe --help
(Note that after this test you'll need to close the terminal window and start a new one to reset the path.)
If this works, perhaps you have a mismatch in your path.

Moving a install of bolt.cm

I am trying to move my location on disk of a Bolt.cm install. Config.yml doesnt have any details of location.
When I rename the directory I receive app config issues as well as this :
Fatal error: Uncaught exception 'Bolt\Exception\LowLevelDatabaseException
Thrown from within Bolt. Seems like I need to update a config file but I don't see one with the path do web root or path to database stored.
Does such a file exist?
You need to flush the cache.
This can be done from the command line by:
php app/nut cache:clear
Or inside app/cache/ you will find the file config_cache.php that can be safely deleted.

Unable to change filesystem label using selinux policy module

I am using fedora 21
I have written a selinux policy moudle for an application. I have defined new types is .te file and created a .fc file in which defines the labelling of files with the types I have created. i can successfully load the policy using "make load". But fiile contexts don't get changed when I check on files and directories using "ls -Z".
Am i missing something.
For clarification: "load the policy" does not set "file contexts" of existing files automatically. Existing files should relabeled according to your new policy. New files will get the new label automatically.
To restore missingmislabeled labels you can use the following command, e.g.:
restorecon -Rv /var/lib/docker/
From the restorecon manual: "It can also be run [...] to add support for newly-installed policy"
The normal way is having a policy activated and afterwards install the program or write files to the hard disk. The files are then automatically labeled with your new context type.

How do I extend the $PATH that Sublime Text 2 uses?

I just installed Sublime-jshint (and the requisite node.js + jshint) but get this error when I try to invoke JSHint from within ST2:
[Errno 2] No such file or directory
[cmd: [u'jshint', u'PATH-TO-THE-JS-FILE-I-AM-LINTING', u'--reporter', u'/home/cmg/.config/sublime-text-2/Packages/JSHint/reporter.js']]
[dir: DIR-MY-JS-FILE-IS-IN]
[path: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/cmg/bin]
[Finished]
The final item in the given path is in the home dir of my user (cmg), so it's been customized somehow... but I don't recall how, so I don't know how to add the dir I need (~/node_modules/.bin).
I've added it to $PATH in my shell (via both .bashrc and .bash_profile) but ST2 doesn't pick it up.
(I'm on Ubuntu 14.04. All the usable stuff I've found via Google on this subject has been either OS X specific or related to ST's build system).
Basically, the exec command, which the jshint package uses internally, allows you to set/extend the PATH of the spawned subprocess. (docs)
The package actually uses this path argument on OSX, but has it hardcoded (I am partly guilty of that as I rewrote the command because it was just horrible before). It should allow for a setting to specify the path to your jshint executable, so I suggest you create an issue for that.
I don't know why ST dosn't pick up your PATH from somewhere else since I have very little experience with that.
Open /etc/profile in Sublime (using sudo) and add the following line at the very bottom:
export PATH=/home/cmg/node_modules/.bin:$PATH
and save the file. Restart completely, and your PATH should be updated.

Hudson : Directory not found

Using Hudson, I try to run a job for tests. The job run a .bat file in which I have this command line
subset v: "C:\A_Directory\"
When this line is executed I get in the console of Hudson an error that the directory "C:\A_Directory\" was not found . However this directory exists and I can access it manually.
What might be the problem? Could it that I must specify a relative path to the workspace of Hudson?
The command in my question tries to create a virtual disk. The used syntax is wrong.
Here the correct one :
subset v: "C:\A_Directory"