Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI History Error on ARM #6070

Closed
rossmcdonald opened this issue Mar 21, 2016 · 29 comments
Closed

CLI History Error on ARM #6070

rossmcdonald opened this issue Mar 21, 2016 · 29 comments

Comments

@rossmcdonald
Copy link
Contributor

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.

@FrancoTampieri
Copy link

Hi I have the same problem.

@jonseymour
Copy link
Contributor

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
Copy link
Contributor

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.

@xmoulin
Copy link

xmoulin commented Apr 10, 2016

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

@jorgebonilla
Copy link

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

@marthjod
Copy link

Same here :(.

~# 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

@nobrick
Copy link

nobrick commented Apr 19, 2016

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

@joernroeder
Copy link

same here on a fresh rPi3

@Wolfgang1966
Copy link

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

@gena01
Copy link

gena01 commented May 1, 2016

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

@BrannonKing
Copy link

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

@vitcozzolino
Copy link

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

@BrannonKing
Copy link

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.

@mei-rune
Copy link
Contributor

mei-rune commented Aug 1, 2016

Same error on Windows

mei-rune added a commit to mei-rune/influxdb that referenced this issue Aug 1, 2016
@mei-rune mei-rune mentioned this issue Aug 1, 2016
4 tasks
@BrannonKing
Copy link

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

@phemmer
Copy link
Contributor

phemmer commented Aug 2, 2016

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.

@JackUkleja
Copy link

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

@sinedsem
Copy link

sinedsem commented Nov 4, 2016

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.

@dnafication
Copy link

Adding environment variable HOME with value solved for me in Win7

@Kortenbach
Copy link

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

@e-dard
Copy link
Contributor

e-dard commented Nov 30, 2016

@rossmcdonald is this still a problem?

@rossmcdonald
Copy link
Contributor Author

@e-dard It looks like the error still occurs if the HOME environment variable is not set correctly. It looks like the client code should handle this correctly, though, so this may be Windows-specific.

@seanvree
Copy link

was there ever a resolution to this?

@amoghskulkarni
Copy link

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?

@LycanStack
Copy link

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.

@Renato-Correa
Copy link

Very good LycanStack!!

@AndrewClarke
Copy link

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.

@stale
Copy link

stale bot commented Jul 23, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 23, 2019
@stale
Copy link

stale bot commented Jul 30, 2019

This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions.

@stale stale bot closed this as completed Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.