I have a rebar3 project. In this project, the supervisor should spawn a bunch of Erlang nodes across multiple machines. I found that the nodes were never getting brought up because of an error in the log:
sh: no such file or directory h/mberns01/..../prod
Where only the leading slash of the path is missing and the rest of the command is correct.
Where in this project is this command generated and why might it be missing the leading slash? I'm not even sure what other information I can provide here to be helpful -- let me know.
Cheers.
EDIT: So it looks like init:get_argument(progname) returns the wrong program (no leading /). Not sure why...
It appears as though the problem can be sidestepped by using slave:start/5, which allows the user to specify what Prog they want to run on the remote host:
spawn(slave, start, [Host, 'node', [], self(), "erl"])
But it does not answer the question of why there is a missing /.
init:get_argument(progname) is supposed to return {ok,[["name"]]} not a directory, so no leading /
Also, out of curiosity, how are you spawning new nodes? Are you using slave, pool or something else? If slave, what arguments are you passing it?
Related
Any process modification cwd is global:
iex(1)> File.cwd
{:ok, "/home/hentioe"}
iex(2)> spawn fn -> File.cd("/home") end
#PID<0.105.0>
iex(3)> File.cwd
{:ok, "/home"}
Is there a way to isolate the current working directory (cwd) between processes?
There is a concept of file server in ErlangVM and the original :file.set_cwd/1, File.cwd/1 delegates to, is explicitly made to set the working directory of the file server.
File server on different node always differs, also there are several functions one might call to bypass the file server (grep :file documentation for “file server”.)
It is unclear why would you need another current directory for the different process and it all smells like an XY problem, but the generic answer to your question would be:
→ no, all the processes on the same node are using the same file server and hence have the same working directory across processes.
I run neo4j Version: 3.3.2 in a docker container and tried to configure a default style as described above.
Grass file is accessible via HTTP (http://somedomain.com/resources/style.grass)
CORS rules are set
Command added to config: browser.post_connect_cmd=style http://somedomain.com/resources/style.grass
When i start my container with this config and run match (n) return n i see nothing.
Then i run :style http://somedomain.com/resources/style.grass and it works... Why?
That leads me to conclude that the grass file ifself (content) and the accessible of this file are not the problem.
It seems that there is an error with the default style configuration.
Do you have any tips to debug this? The logs are clean.
I found the problem. We added this property at the end of the neo4j.conf. After startup neo4j reorder the properties, put it at the 2nd place and accidentally add the 3rd property at the end of the 2nd, so that it’s not valid. We put it manually at the 2nd place and now it works.
I have a Groovy script that runs the closure compiler latest version.
def command = "java -jar $compiler --js $orderedDependencies --js_output_file $minFilename --create_source_map $mapFilename --compilation_level WHITESPACE_ONLY --source_map_format=V3 --language_in=ECMASCRIPT5 --debug --formatting=PRETTY_PRINT"
command.execute(null as List, outputDir).waitForProcessOutput(System.out, System.err)
When I use it without the --language_in option, I get error output. When I add the command option, I don't get any error output, but it breaks somewhere, because nothing gets created and the web interface is broken.
Does anyone have any idea why this might be?
I'm not sure what the problem is since the code you provided isn't enough the reproduce it.
But chances are that you are searching in the wrong place: the .execute() command can be quite annoying. Take a look at this question to get some ideas on what could go wrong and how to solve it: Trying to send an email trough a groovy shell script
I am trying to create a setup project for a Windows Service. I've followed the directions at http://support.microsoft.com/kb/816169 to create the setup project with no trouble.
I want to be able to get a value during the installation in order to update the app.config with the user's desired settings. I added a Textboxes (A) dialog to retrieve the values. I set the Edit1Property property to "TIMETORUN", and in my Primary Output action's CustomActionData property I put in the following: /TimeToRun="[TIMETORUN]\". So far so good. Running the setup I can retrieve the TimeToRun value from the Context.Parameters collection without issue.
In order to locate the app.config I need to also pass in the value of the TARGETDIR Windows Installer Property to my custom action. This is where things begin to fall apart. In order to achieve this, the above CustomActionData must be altered like so: /TimeToRun="[TIMETORUN]\" /TargetDir="[TARGETDIR]\". Now when I run the setup I get the following error message:
Error 1001. Exception occurred while initializing the installation.
System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Windows\SysWOW64\Files' or one of its dependencies. The system cannot
find the file specified.
If you google this problem you will inevitably find people having tremendous success by simply adding the trailing slash to the /TargetDir="[TARGETDIR]\" portion of the CustomActionData. This unfortunately does not solve my issue.
I tried so many different variations of the CustomActionData string and none of them worked. I tried logging to a file from my overridden Install method to determine where the breakage was, but no log file is created because it's not even getting that far. As the error indicates, the failure is during the Initialization step.
I have a hunch that it could be one of the dependencies that the setup project is trying to load. Perhaps somehow something is being appended to the CustomActionData string and isn't playing well with the TARGETDIR value (which contains spaces, i.e. "C:\Program Files\My Company\Project Name"). Again, this is another hunch that I cannot seem to confirm due to my inability to debug the setup process.
One further thing to mention, and yes it's another hunch, could this be an issue with Setup Projects on 64-bit version of Windows? I'm running Windows 7 Professional.
I'll provide names of the dependencies in case it helps:
Microsoft .NET Framework
Microsoft.SqlServer.DtsMsg.dll
Microsoft.SqlServer.DTSPipelineWrap.dll
Microsoft.SqlServer.DTSRuntimeWrap.dll
Microsoft.SQLServer.ManagedDTS.dll
Microsoft.SqlServer.msxml6_interop.dll
Microsoft.SqlServer.PipelineHost.dll
Microsoft.SqlServer.SqlTDiagM.dll
As you may glean from the dependencies, the Windows Service is scheduling a call to a DTSX package.
Sorry for the long rant. Thanks for any help you can provide.
The answer is so maddeningly simple. If the last argument in the CustomActionData is going to contain spaces and thus you have to surround it with quotes and a trailing slash, you must also have a space following the trailing slash, like this:
/TimeToRun="[TIMETORUN]\" /TargetDir="[TARGETDIR]\ "
The solution and explanation can be found here.
Had a similar issue. In my case, it was odd because my installer had ran successfully once, then I uninstalled my app via Add/Remove Programs successfully, did some coding (did NOT touch my CustomActionData string), and rebuilt my project and setup project. It was when I re-ran my MSI that I got this error.
The coding I had done was to bring in more values of more parameters I had been specifying in my CustomActionData string. That syntax for getting the parameter values (i.e. string filepath = Context.Paramenters["filepath"]), which was in my Installer class, was actually fine, but as I found out, the syntax of the later parameters I was now trying to get from my CustomActionData string had not been correct, from the very beginning. I had failed to add a second quote around one of those parameters, so nothing else could be obtained.
I was using the "Textboxes (A)" and "Textboxes (B)" windows in the User Interface section. A has 1 box, EDITA1, where I get the path to a file, and B has 2 boxes, EDITB1 and EDITB2, for some database parameters. My CustomActionData string looked like this:
/filepath="[EDITA1]" /host="[EDITB1] /port="[EDITB2]"
It should have been:
/filepath="[EDITA1]" /host="[EDITB1]" /port="[EDITB2]"
(closing quote on [EDITB1])
I'm trying to debug a cons script, and the problem I'm having is that an executable in my own $PATH doesn't seem to be located. In short: Can cons find executables in my path?
This might seem like a silly question, since the FAQ says
Cons does not pass the user's environment to the child processes that it forks to build the software. Anything you need or want to pass in from the user's environment must be done so explicitly.
It's not clear to me, however, that cons shouldn't be able to see my $PATH (the above is worded such that I wouldn't expect child processes to have access to any of the environment variables). In the execution of the Construct, $PATH evaluates to empty but $ENV{PATH} does contain my path.
It doesn't help that I don't know cons nor Perl, so I don't really know what I'm doing, nor where to start looking for what's causing the problem :) For what it's worth, the script that doesn't work for me, but does work for the original author of the script, is located here.
For what it's worth, the guideline in the FAQ is correct in that something like this will fix the problem:
# A standard construction environment.
$env = new cons(
ENV => { PATH => $ENV{PATH} }
);
which can then be followed by, e.g.,
Command $env 'foo', qq(echo =`which tex`=);
to run/install/build/whatever you're doing with the cons script.