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

Can't use CLI [Divide by zero] #7995

Closed
cbarzu opened this issue Feb 13, 2017 · 6 comments
Closed

Can't use CLI [Divide by zero] #7995

cbarzu opened this issue Feb 13, 2017 · 6 comments

Comments

@cbarzu
Copy link

cbarzu commented Feb 13, 2017

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

@jsternberg jsternberg changed the title Can't use CLI [Devide by zero] Can't use CLI [Divide by zero] Feb 13, 2017
@pauldix pauldix added this to the 1.3.0 milestone Feb 13, 2017
@dustpuppyNGTI
Copy link

Have this too

@bzub
Copy link

bzub commented Mar 7, 2017

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.

@ashmckenzie
Copy link

ashmckenzie commented Apr 10, 2017

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.

@ghost ghost added the review label Apr 10, 2017
@ketchoop
Copy link

Have the same issue in docker container.

Docker version: 17.04.0-ce

@nabinkhadka
Copy link

Resized the terminal before typing anything. Issue solved :)

@vimmis
Copy link

vimmis commented Jan 23, 2020

Resizing helped!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants