influxdb: CLI History Error on ARM

When running the InfluxDB CLI on ARM Linux (specifically Raspbian), the command history returns the error:

There was an error writing history file: open : no such file or directory

Even though the user is set appropriately. Based on this comment, it seems like the file history path isn’t being set correctly.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 29 (6 by maintainers)

Commits related to this issue

Most upvoted comments

On the latest Windows builds I get this after every command in the the influx.exe terminal: “There was an error writing history file: open : The system cannot find the file specified.”

On Windows 10, doing SET HOME=<path to exe location> seems to fix this for me.

This issue persists on Windows.

This batch file wraps influx.exe in the fix given by @JackUkleja. Save to influx.bat in the same directory as your influx executable and run the batch file instead:

@ECHO OFF
SETLOCAL
SET HOME=%~dp0
"%~dp0\influx.exe" %*
ENDLOCAL

Temporary shim but it works. Some details:

  • Sets environment variable HOME to the directory containing the batch file.
  • Localizes the environment variable setting so it won’t interfere with other things.
  • Passes all command line arguments on to influx.

The culpable feature seems to be command history logging. Once HOME is set up right influx will create .influx_history in the HOME directory. It contains a history of commands you’ve entered at the influx shell.

Adding environment variable HOME with value <path to exe location> solved problem for me either, OS Windows 7. But that’s doesn’t looks like a fix, just a workaround. Look forward to an appropriate fix.

How did anyone come up with the idea to use SET HOME=<path to exe location> ? I didn’t find “HOME” in the config file or in the Influx docs… For less experienced Windows users: Use the configuration screen tot set this environment variable. Using SET wil only change the environment variable once for that instance of the command prompt…

The windows build should use HOMEPATH (trust MS to use something slightly different from the 45 year old UNIX convention). In the meantime, I am “shimming” my environment with set HOME=%HOMEPATH% - much simpler than playing with %~ business.

I am facing the same issue with freshly installed influxdb on Windows 10 system. Is adding an environment variable HOME to the path a recommended solution for this problem?