influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

Can't use CLI [Divide by zero]

Open cbarzu opened this issue 9 years ago • 6 comments

Bug report

System info: [Include InfluxDB version, operating system name, and other relevant details] $ docker version

Client:
 Version:         1.9.1
 API version:     1.21
 Package version: docker-common-1.9.1-40.el7.x86_64
 Go version:      go1.4.2
 Git commit:      ab77bde/1.9.1
 Built:           
 OS/Arch:         linux/amd64
Dockerfile
FROM buildpack-deps:jessie-curl


#RUN groupadd --gid $GID influx && useradd --uid $UID -m -g influx influx

ENV INFLUXDB_VERSION 1.2.0
RUN wget -q https://dl.influxdata.com/influxdb/releases/influxdb_${INFLUXDB_VERSION}_amd64.deb.asc && \
    wget -q https://dl.influxdata.com/influxdb/releases/influxdb_${INFLUXDB_VERSION}_amd64.deb && \
    dpkg -i influxdb_${INFLUXDB_VERSION}_amd64.deb && \
    rm -f influxdb_${INFLUXDB_VERSION}_amd64.deb*
COPY influxdb.default.conf /etc/influxdb/influxdb.conf

EXPOSE 8086

VOLUME /var/lib/influxdb
RUN chmod 770 /var/lib/influxdb
RUN chown 999 /etc/influxdb/influxdb.conf
USER 999

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["influxd"]

Steps to reproduce:

  1. [First Step] docker exec -it influx bash
  2. [Second Step] $influx
  3. type anything

Expected behavior: [What you expected to happen] I hope to write data to cli. Actual behavior: [What actually happened] $ influx


Connected to http://localhost:8086 version 1.2.0
InfluxDB shell version: 1.2.0
> panic: runtime error: integer divide by zero

goroutine 1 [running]:
panic(0x6de060, 0xc42000c070)
	/usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/peterh/liner.(*State).refreshMultiLine(0xc4200a48c0, 0xc4200614a8, 0x2, 0x20, 0xc420061428, 0x1, 0x20, 0x1, 0xc42006133c, 0xc42012a000)
	/root/go/src/github.com/peterh/liner/line.go:159 +0x5e4
github.com/peterh/liner.(*State).refresh(0xc4200a48c0, 0xc4200614a8, 0x2, 0x20, 0xc420061428, 0x1, 0x20, 0x1, 0xffffffffffffffff, 0xc420061418)
	/root/go/src/github.com/peterh/liner/line.go:94 +0x89
github.com/peterh/liner.(*State).PromptWithSuggestion(0xc4200a48c0, 0x734683, 0x2, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0)
	/root/go/src/github.com/peterh/liner/line.go:822 +0x1f64
github.com/peterh/liner.(*State).Prompt(0xc4200a48c0, 0x734683, 0x2, 0xc420000100, 0x200000003, 0xc420018000, 0xc4200001a0)
	/root/go/src/github.com/peterh/liner/line.go:567 +0x5e
github.com/influxdata/influxdb/cmd/influx/cli.(*CommandLine).mainLoop(0xc4200f4000, 0x0, 0x0)
	/root/go/src/github.com/influxdata/influxdb/cmd/influx/cli/cli.go:215 +0x139
github.com/influxdata/influxdb/cmd/influx/cli.(*CommandLine).Run(0xc4200f4000, 0x0, 0x0)
	/root/go/src/github.com/influxdata/influxdb/cmd/influx/cli/cli.go:201 +0x527
main.main()
	/root/go/src/github.com/influxdata/influxdb/cmd/influx/main.go:116 +0x87a

Regards, Claudiu

cbarzu avatar Feb 13 '17 10:02 cbarzu

Have this too

dustpuppyNGTI avatar Feb 15 '17 14:02 dustpuppyNGTI

I see this also on a brand new installation in Kubernetes, exec'd into the InfluxDB container to run influx. It started working ok, though, when I resized my terminal and then maximized the window again.

bzub avatar Mar 07 '17 13:03 bzub

Observed this with 1.2.2 under Docker using the official image too. Definitely related to the terminal size. I was in tmux, split the window into two panes and am able to use the CLI as expected.

ashmckenzie avatar Apr 10 '17 00:04 ashmckenzie

Have the same issue in docker container.

Docker version: 17.04.0-ce

ketchoop avatar May 30 '17 14:05 ketchoop

Resized the terminal before typing anything. Issue solved :)

nabinkhadka avatar Jun 11 '18 09:06 nabinkhadka

Resizing helped!!

vimmis avatar Jan 23 '20 22:01 vimmis