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.
Hi I have the same problem.
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.
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.
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
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
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
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
same here on a fresh rPi3
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
I am seeing this on x86_64 running the 0.12.2 static linux binaries (inside an alpine docker container)
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."
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
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.
Same error on Windows
This is a high-priority issue for me. I'm glad to see progress. Thanks.
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.
On Windows 10, doing SET HOME=<path to exe location> seems to fix this for me.
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.
Adding environment variable HOME with value
How did anyone come up with the idea to use SET HOME=