influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

CLI History Error on ARM

Open rossmcdonald opened this issue 10 years ago • 29 comments

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.

rossmcdonald avatar Mar 21 '16 15:03 rossmcdonald

Hi I have the same problem.

FrancoTampieri avatar Apr 03 '16 01:04 FrancoTampieri

FWIW: i can reproduce the same symptom on linux/amd64 if I compile the influx binary with CGO_ENABLED=0 set in the environment. In this case, the reason is that user.Current() then fails with the error: 'Current not implemented on linux/amd64.'

This causes the branch in this block to be skipped, which then results in the reported symptom after a command is run (since the history path is never initialised properly).

So, I suspect the reason this is occurring on ARM systems is either that the ARM build of the influx binary was done with CGO_ENABLED=0 for some reason or go has not implemented user.Current() for ARM systems for some different reason.

jonseymour avatar Apr 04 '16 05:04 jonseymour

Based on a quick review of the go source, it seems more likely that the ARM influx binary was compiled with CGO_ENABLED=0 or, alternatively, that the user.Current() call is failing for some other reason on ARM systems.

jonseymour avatar Apr 04 '16 05:04 jonseymour

same problem: uname -a Linux Nas-XMN 3.2.40 #7321 SMP Wed Mar 23 11:47:17 CST 2016 armv7l GNU/Linux synology_armada375_ds215j

influx -version InfluxDB shell 0.12.1

xmoulin avatar Apr 10 '16 13:04 xmoulin

Same issue on a beaglebone (arm based).

root@beaglebone:~# uname -a Linux beaglebone 4.1.15-ti-rt-r43 #1 SMP PREEMPT RT Thu Jan 21 20:13:58 UTC 2016 armv7l GNU/Linux root@beaglebone:~# influx --version InfluxDB shell 0.12.0 root@beaglebone:~# influx Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring. Connected to http://localhost:8086 version 0.12.0 InfluxDB shell 0.12.0

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

jorgebonilla avatar Apr 10 '16 18:04 jorgebonilla

Same here :(.

  • installed on Linux pi 4.1.13+ #826 PREEMPT Fri Nov 13 20:13:22 GMT 2015 armv6l GNU/Linux
  • downloaded from https://s3.amazonaws.com/influxdb/influxdb_0.12.1-1_armhf.deb
~# influx
Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.
Connected to http://localhost:8086 version 0.12.1
InfluxDB shell 0.12.1
> create database foo;
There was an error writing history file: open : no such file or directory

marthjod avatar Apr 16 '16 18:04 marthjod

Same issue on ubuntu 14.04.

 ~ uname -a
Linux ubuntu 3.19.0-31-generic #36~14.04.1-Ubuntu SMP Thu Oct 8 17:59:01 UTC 2015 i686 i686 i686 GNU/Linux
 ~ influx --version
InfluxDB shell 0.12.1
 ~ influx
> create database foo;
There was an error writing history file: open : no such file or directory

nobrick avatar Apr 19 '16 02:04 nobrick

same here on a fresh rPi3

joernroeder avatar Apr 22 '16 14:04 joernroeder

0.12.2, Banana Pi, same problem:

$ uname -a Linux bananapi 3.4.108-bananian #2 SMP PREEMPT Thu Aug 13 06:08:25 UTC 2015 armv7l GNU/Linux $ influx --version InfluxDB shell 0.12.2

Wolfgang1966 avatar Apr 27 '16 14:04 Wolfgang1966

I am seeing this on x86_64 running the 0.12.2 static linux binaries (inside an alpine docker container)

gena01 avatar May 01 '16 14:05 gena01

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."

BrannonKing avatar May 05 '16 17:05 BrannonKing

Same error on CubieTruck:

mirage@cubietruck:~$ uname -a
Linux cubietruck 3.16.0-00124-g6b6dcc2-dirty #2 SMP Wed Feb 3 14:27:34 GMT 2016 armv7l armv7l armv7l GNU/Linux
mirage@cubietruck:~$ influx --version
InfluxDB shell 0.12.2
> create database test
There was an error writing history file: open : no such file or directory

vitcozzolino avatar May 06 '16 16:05 vitcozzolino

I still see this issue in the latest (Windows) nightly on 8 July 2016. It seems to slow the influx.exe client a little too -- maybe it has some timeout where it tries to right to the file.

BrannonKing avatar Jul 08 '16 22:07 BrannonKing

Same error on Windows

mei-rune avatar Aug 01 '16 04:08 mei-rune

This is a high-priority issue for me. I'm glad to see progress. Thanks.

BrannonKing avatar Aug 01 '16 16:08 BrannonKing

The original issue this was opened for is actually fixed. The code no longer uses user.Current(). However it instead uses $HOME which now errors on windows, and on *nix when $HOME is unset.

phemmer avatar Aug 02 '16 12:08 phemmer

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

JackUkleja avatar Sep 19 '16 06:09 JackUkleja

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.

sinedsem avatar Nov 04 '16 20:11 sinedsem

Adding environment variable HOME with value solved for me in Win7

dnafication avatar Nov 25 '16 02:11 dnafication

How did anyone come up with the idea to use SET HOME= ? 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...

Kortenbach avatar Nov 26 '16 19:11 Kortenbach