I use embedded influx https://github.com/APISENSE/embed-influxDB version 1.1.1. I use the following code snippet to start embedded influx on mac os 10.12.6
val builder = new InfluxServer.Builder
freeServerPort = Network.getFreeServerPort
val influxConfig = new InfluxConfigurationWriter.Builder().setHttp(freeServerPort).build
builder.setInfluxConfiguration(influxConfig)
server = builder.build
server.start()
Thread.sleep(10 * 1000)
InfluxDBFactory.connect("http://" + EMBEDDED_INFLUX_HOST + ":" + freeServerPort)
Every time I try to run it I get the following message:
[influxd error]/var/folders/z6/zxktn8v10nx_ssb1zctm_5w80000gn/T/extract-c9d95ee0-f9fb-4387-bb94-e85806f45c21influxd: /var/folders/z6/zxktn8v10nx_ssb1zctm_5w80000gn/T/extract-c9d95ee0-f9fb-4387-bb94-e85806f45c21influxd: cannot execute binary file
[influxd error]
Related
I'm using Astro vim distro with neovide. every time I launch neovide / neovim-qt it launches in the directory it's installed on!
OS: windows 10
[Astrovim starting location][1]
[using windows shortcut properties to set start in location][2]
[1]: https://i.stack.imgur.com/ZvXfp.png
[2]: https://i.stack.imgur.com/IEl4N.png
is there a way to set startup location in options.lua ?
Try following code in your configuration file, it make use of vim\neovim autocommands feature:
local os = require("os")
local path_to_desktop = os.getenv("USERPROFILE") .. "\\Desktop"
local vim_enter_group = vim.api.nvim_create_augroup("vim_enter_group", { clear = true })
vim.api.nvim_create_autocmd(
{"VimEnter"},
{ pattern = "*", command = "cd " .. path_to_desktop, group = vim_enter_group }
)
nvim_create_autocmd and nvim_create_group are described in neovim docs. Use :h nvim_create_autocmdto find out more.
I have experienced the following problem during the process of building my package. I tried to search for a solution but was unsuccessful. In order to make the error reproducible, I present a minimal package that could generate the same error.
I started a package with the name mypkg, then I use usethis::use_rcpp and usethis::use_rcpp_armadillo. After that I add the following script in \src folder (which is copied from internet)
#include <RcppArmadillo.h>
// [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::export]]
arma::vec getEigenValues(arma::mat M) {
return arma::eig_sym(M);
}
After that, I add an R shell to export the function using Roxygen. So far the package can be successfully documented and built.
Then I continue to add features of Rstan by using rstantools::use_rstan, and follow the steps on Step by step guide for creating a package that depends on RStan, and create lm.stan and lm_stan.R as instructed. Then I built the package again but it throws out an error. Here are the results of executing
.Last.error.trace
1. devtools:::document()
2. withr::with_envvar(r_env_vars(), roxygen2::roxygenise(pkg$path, ...
3. base:::force(code)
4. roxygen2::roxygenise(pkg$path, roclets, load_code = load_code)
5. roxygen2:::load_code(base_path)
6. pkgload::load_all(path, helpers = FALSE, attach_testthat = FALSE)
7. pkgbuild::compile_dll(path, quiet = quiet)
8. pkgbuild:::install_min(path, dest = install_dir, components = "libs", ...
9. pkgbuild:::rcmd_build_tools("INSTALL", c(path, paste("--library=", ...
10. pkgbuild:::with_build_tools(callr::rcmd_safe(..., env = env, ...
11. withr::with_path(rtools_path(), code)
12. base:::force(code)
13. callr::rcmd_safe(..., env = env, spinner = FALSE, show = FALSE, ...
14. callr:::run_r(options)
15. base:::with(options, with_envvar(env, do.call(processx::run, ...
16. base:::with.default(options, with_envvar(env, do.call(processx::run, ...
17. base:::eval(substitute(expr), data, enclos = parent.frame())
18. base:::eval(substitute(expr), data, enclos = parent.frame())
19. callr:::with_envvar(env, do.call(processx::run, c(list(bin, args = real_cmdargs, ...
20. base:::force(code)
21. base:::do.call(processx::run, c(list(bin, args = real_cmdargs, ...
22. (function (command = NULL, args = character(), error_on_status = TRUE, ...
23. throw(new_process_error(res, call = sys.call(), echo = echo, ...
x System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr (last 10 lines):
E> In file included from C:/Users/Jasper/Documents/R/win-library/3.6/rstan/include/rstan/rstaninc.hpp:3:0,
E> from stanExports_lm.h:20,
E> from stanExports_lm.cc:5:
E> C:/Users/Jasper/Documents/R/win-library/3.6/rstan/include/rstan/stan_fit.hpp:11:28: fatal error: stan/version.hpp: No such file or directory
E> #include <stan/version.hpp>
E> ^
E> compilation terminated.
E> make: *** [C:/PROGRA~1/R/R-36~1.2/etc/x64/Makeconf:213: stanExports_lm.o] Error 1
E> ERROR: compilation failed for package 'mypkg'
E> * removing 'C:/Users/Jasper/AppData/Local/Temp/RtmpwXHySZ/devtools_install_1d18454066b0/mypkg'
Could anyone suggest what the problem is? Here is my makevars file
CXX_STD = CXX11
PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)
PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
However, when I follow the steps of the guide to create a package just with Rstan, it could be successfully built, but not when I also want to use RcppArmadillo.
Thank you very much for your kind help!!
I have a script that updates an Install Shield .ism file (via InstallShield Automation Interface (2015)) with a version and ProductCode.
Dim projFile, projVersion
'check for arguments
If Wscript.Arguments.Count < 2 Then
WScript.Echo "InstallShield Version Utility" & _
vbNewLine & "1st argument is the full path to the .ism file" & _
vbNewLine & "2nd argument is the new version number Major.Minor.Build"
WScript.Quit 1
End If
'get the args
projFile = WScript.Arguments(0)
projVersion = WScript.Arguments(1)
'Create the end-user automation object
Dim ISWIProject
Set ISWIProject = CreateObject("ISWiAuto22.ISWiProject"): CheckError
'Open the project specified at the command line
ISWIProject.OpenProject projFile: CheckError
'change the product code to force major upgrades
Dim guidProductCode
guidProductCode = ISWIProject.GenerateGUID
ISWIProject.ProductCode = guidProductCode
'update the version
ISWIProject.ProductVersion = projVersion
'Save and close the project
ISWIProject.SaveProject: CheckError
ISWIProject.CloseProject: CheckError
WScript.Echo "Updated guid to: " & guidProductCode & ", version to: " & projVersion
Sub CheckError()
Dim message, errRec
If Err = 0 Then Exit Sub
message = Err.Source & " " & Hex(Err) & ": " & Err.Description
WScript.Echo message
WScript.Quit 2
End Sub
I call this script with
cscript //Nologo setInstallShieldVersion.vbs <ISMPath> <VersionNumber>
When I run this via a command line on the machine (with the same user as my Jenkins service), it works fine and runs the script. However when Jenkins runs it via a Windows batch command, it gives the error
setInstallShieldVersion.vbs(17, 1) Microsoft VBScript runtime error: File not found: 'CreateObject'
the script used to work, then I had to update Jenkins (and subsequently rolled it back when the script started failing). Maybe that's part of the issue?
I've tried dumping the environmental variables with SET in both instances, and all the environmental variables are the same (except some Jenkins-specific ones). I've registered the DLL with regsvr32 multiple times. In both instances they are running in 32 bit processes. I've even opened up the permissions on the .dll (ISWiAutomation22.dll). Any other ideas on why it would work when running it one way and not the other?
I am trying to use below code to get the git version no , on my local machine it is working fine , but on teamcity it is giving an error .
here is the code :
open GitVersionHelper
// version
let version = GitVersion id
printfn "##teamcity[buildNumber '%s']" version.FullSemVer
let major = version.Major.ToString()
let minor = version.Minor.ToString()
let patch = version.Patch.ToString()
and when I see my build log on teamcity , it shows :
System.Exception: GitVersion.exe failed with exit code 1
Fake.GitVersionHelper.GitVersion#62.Invoke(String message)
Fake.GitVersionHelper.GitVersion(FSharpFunc`2 setParams)
is this related to the missing libraries or what ?
Is it possible to get a server heap dump on a running process on linux (CentOS) using JMX from command line ?
can't open VisualVM,
can't install jmap
It can be done with this simple code:
import com.sun.management.HotSpotDiagnosticMXBean;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.management.JMX;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
#SuppressWarnings("restriction")
public class CreateHeapDump
{
public static void main(String[] args) throws Exception
{
String host = args[0];
String port = args[1];
JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" + host + ":" + port + "/jmxrmi");
JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
ObjectName mbeanName = new ObjectName("com.sun.management:type=HotSpotDiagnostic");
HotSpotDiagnosticMXBean bean = JMX.newMBeanProxy(mbsc, mbeanName, HotSpotDiagnosticMXBean.class, true);
String fileName = "heap_dump_" + new SimpleDateFormat("dd.MM.yyyy HH.mm").format(new Date()) + ".hprof";
boolean onlyLiveObjects = true;
bean.dumpHeap(fileName, onlyLiveObjects);
}
}
Compile it:
javac CreateHeapDump.java
Call it from command line:
java CreateHeapDump localhost 9010
This won't be pretty, but it works. Having said that, you might want to consider scripting this in Groovy or Jython, or even JavaScript....
I added a quickie add-on to jmxlocal, a project which implements standard JMX remoting for local JVMs. It now supports a command line invocation of one command against the connected MBeanServer, and the command must be specified in Java code.
Clone the repo and build with mvn clean install.
Copy the jar (jmxlocal-1.0-SNAPSHOT.jar) to your target server.
Execute the dump JMX command using the PID of the target java process as follows:
java -jar target/jmxlocal-1.0-SNAPSHOT.jar -j service:jmx:attach:///<PID> -c "conn.invoke(on(\"com.sun.management:type=HotSpotDiagnostic\"), \"dumpHeap\", new Object[]{\"/tmp/heap.dump\", true}, new String[]{String.class.getName(), boolean.class.getName()})"
The output will be
Command Executed. Result [null]
and you should find your dump file at /tmp/heap.dump.
If you need to, you can supply credentials using the -u [username] and -p [password] arguments.