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

ERR: database not found: #2258

Closed
NikolaBorisov opened this issue Apr 13, 2015 · 11 comments
Closed

ERR: database not found: #2258

NikolaBorisov opened this issue Apr 13, 2015 · 11 comments
Assignees
Milestone

Comments

@NikolaBorisov
Copy link

Trying to test the latest influx and I just got strange error:

version: influx 0.9-rc23

> show databases;
name: databases
---------------
name
imo

> use imo;
Using database imo;
> show series;
ERR: database not found: imo; (/home/philip/build/src/github.com/influxdb/influxdb/server.go:2526)

The web admin UI shows the database exists. I'm tying to use a cluster.

@dgnorton dgnorton self-assigned this Apr 13, 2015
@dgnorton
Copy link
Contributor

@NikolaBorisov Any errors in the log? Also, can you post your config?

@NikolaBorisov
Copy link
Author

This is a cluster with 12 nodes. 5 brokers.

I didn't see any errors in the log.

# Welcome to the InfluxDB configuration file.

# If hostname (on the OS) doesn't return a name that can be resolved by the other
# systems in the cluster, you'll have to set the hostname to an IP or something
# that can be resolved here.
hostname = "somehostname"
bind-address = "0.0.0.0"

# The default cluster and API port
port = 8086

# Once every 24 hours InfluxDB will report anonymous data to m.influxdb.com
# The data includes raft id (random 8 bytes), os, arch and version
# We don't track ip addresses of servers reporting. This is only used
# to track the number of instances running and the versions, which
# is very helpful for us.
# Change this option to true to disable reporting.
reporting-disabled = true

# Controls settings for initial start-up. Once a node is successfully started,
# these settings are ignored.  If a node is started with the -join flag,
# these settings are ignored.
[initialization]


# Control authentication
# If not set authetication is DISABLED. Be sure to explicitly set this flag to
# true if you want authentication.
[authentication]
enabled = false

# Configure the admin server
[admin]
enabled = true
port = 8083

# Configure the HTTP API endpoint. All time-series data and queries uses this endpoint.
[api]
# ssl-port = 8087    # SSL support is enabled if you set a port and cert
# ssl-cert = "/path/to/cert.pem"

# Configure the Graphite plugins.
[[graphite]] # 1 or more of these sections may be present.
enabled = false
# protocol = "" # Set to "tcp" or "udp"
# address = "0.0.0.0" # If not set, is actually set to bind-address.
# port = 2003
# name-position = "last"
# name-separator = "-"
# database = ""  # store graphite data in this database

# Configure the collectd input.
[collectd]
enabled = false
#address = "0.0.0.0" # If not set, is actually set to bind-address.
#port = 25827
#database = "collectd_database"
#typesdb = "types.db"

# Configure the OpenTSDB input.
[opentsdb]
enabled = false
address = "0.0.0.0" # If not set, is actually set to bind-address.
port = 4242
database = "opentsdb_database"

# Configure UDP listener for series data.
[udp]
enabled = false
#bind-address = "0.0.0.0"
#port = 4444

# Broker configuration. Brokers are nodes which participate in distributed
# consensus.
[broker]
enabled = true
# Where the Raft logs are stored. The user running InfluxDB will need read/write access.
dir  = "/home/amy/data/influxdb/raft"

# Data node configuration. Data nodes are where the time-series data, in the form of
# shards, is stored.
[data]
enabled = true
dir = "/home/amy/data/influxdb/db"

# Auto-create a retention policy when a database is created. Defaults to true.
retention-auto-create = true

# Control whether retention policies are enforced and how long the system waits between
# enforcing those policies.
retention-check-enabled = true
retention-check-period = "10m"

# Configuration for snapshot endpoint.
[snapshot]
enabled = true # Enabled by default if not set.
bind-address = "127.0.0.1"
port = 8087

[logging]
write-tracing = false # If true, enables detailed logging of the write system.
raft-tracing = false # If true, enables detailed logging of Raft consensus.

# InfluxDB can store statistical and diagnostic information about itself. This is useful for
# monitoring purposes. This feature is disabled by default, but if enabled, these data can be
# queried like any other data.
[monitoring]
enabled = false
write-interval = "1m"          # Period between writing the data.

@beckettsean beckettsean added this to the 0.9.0 milestone Apr 14, 2015
@toddboom toddboom modified the milestones: 0.9.0, 0.9.1 May 8, 2015
@liyichao
Copy link

I also encounter this error, the log shows:


[srvr] 2015/05/13 07:28:20 pre-creating shard group for 1, retention policy default, database _influxdb
[srvr] 2015/05/13 07:28:20 pre-creating shard group for 2, retention policy default, database collectd
[srvr] 2015/05/13 07:28:48 retention policy enforcement check commencing
[broker] 2015/05/13 07:38:08 executing truncation check for 5 topic(s)
[srvr] 2015/05/13 07:38:48 retention policy enforcement check commencing
[broker] 2015/05/13 07:48:08 executing truncation check for 5 topic(s)
[srvr] 2015/05/13 07:48:50 retention policy enforcement check commencing
[broker] 2015/05/13 07:58:08 executing truncation check for 5 topic(s)
[srvr] 2015/05/13 07:58:50 retention policy enforcement check commencing
[broker] 2015/05/13 08:08:08 executing truncation check for 5 topic(s)
[srvr] 2015/05/13 08:08:50 retention policy enforcement check commencing
[srvr] 2015/05/13 08:13:20 shard group pre-create check commencing
[srvr] 2015/05/13 08:13:20 pre-creating shard group for 1, retention policy default, database _influxdb
[srvr] 2015/05/13 08:13:20 pre-creating shard group for 2, retention policy default, database collectd
[broker] 2015/05/13 08:18:08 executing truncation check for 5 topic(s)
[srvr] 2015/05/13 08:18:50 retention policy enforcement check commencing
[broker] 2015/05/13 08:28:08 executing truncation check for 5 topic(s)
[srvr] 2015/05/13 08:28:50 retention policy enforcement check commencing
[http] 2015/05/13 08:30:57 127.0.0.1 - - [13/May/2015:08:30:57 +0800] GET /ping HTTP/1.1 204 0 - InfluxDBShell/0.9.0-rc29 527369ac-f907-11e4-8004-000000000000 81.113µs
[http] 2015/05/13 08:31:02 127.0.0.1 - - [13/May/2015:08:31:02 +0800] GET /query?db=&q=show+databases%3B HTTP/1.1 200 105 - InfluxDBShell/0.9.0-rc29 55abec88-f907-11e4-8005-000000000000 1.020619ms
[http] 2015/05/13 08:31:14 127.0.0.1 - - [13/May/2015:08:31:14 +0800] GET /query?db=collectd%3B&q=show+measurements HTTP/1.1 500 139 - InfluxDBShell/0.9.0-rc29 5cd908cf-f907-11e4-8006-000000000000 16.388262ms
[http] 2015/05/13 08:32:59 127.0.0.1 - - [13/May/2015:08:32:59 +0800] GET /query?db=collectd%3B&q=show+measurements HTTP/1.1 500 139 - InfluxDBShell/0.9.0-rc29 9b195616-f907-11e4-8007-000000000000 634.172µs
[http] 2015/05/13 08:33:08 127.0.0.1 - - [13/May/2015:08:33:08 +0800] GET /query?db=collectd%3B&q=show+series%3B HTTP/1.1 500 139 - InfluxDBShell/0.9.0-rc29 a0961cfd-f907-11e4-8008-000000000000 620.866µs
[http] 2015/05/13 08:37:09 127.0.0.1 - - [13/May/2015:08:37:09 +0800] GET /query?db=collectd%3B&q=show+series%3B HTTP/1.1 500 139 - InfluxDBShell/0.9.0-rc29 30508f18-f908-11e4-8009-000000000000 633.949µs
[http] 2015/05/13 08:37:10 127.0.0.1 - - [13/May/2015:08:37:10 +0800] GET /query?db=collectd%3B&q=show+measurements HTTP/1.1 500 139 - InfluxDBShell/0.9.0-rc29 3130622f-f908-11e4-800a-000000000000 13.541375ms
[broker] 2015/05/13 08:38:08 executing truncation check for 5 topic(s)
[http] 2015/05/13 08:38:50 127.0.0.1 - - [13/May/2015:08:38:50 +0800] GET /query?db=collectd%3B&q=show+retention+policies+collectd%3B HTTP/1.1 200 168 - InfluxDBShell/0.9.0-rc29 6caef472-f908-11e4-800b-000000000000 718.408µs
[srvr] 2015/05/13 08:38:50 retention policy enforcement check commencing

I am sure there is data in influxdb: because when I tcpdump the traffic on port 2013 where influxdb listens on with graphite input, there is a a lot traffic like this:

host.my_hostname.type.vmpage_number.type_instance.slab_unreclaimable.vmem_value 4862.000000 1431463996
host.my_hostnam.type.vmpage_number.type_instance.page_table_pages.vmem_value 2670.000000 1431463996

I have sent data like above for more than a day.

my retention policies:

> show retention policies collectd;
name    duration    replicaN    default
1_day   24h0m0s     1       false
1_month 720h0m0s    1       false
1_week  168h0m0s    1       false
1_year  8760h0m0s   1       false
3_year  26280h0m0s  1       false
default 720h0m0s    1       true

my conf:

# Welcome to the InfluxDB configuration file.

# If hostname (on the OS) doesn't return a name that can be resolved by the other
# systems in the cluster, you'll have to set the hostname to an IP or something
# that can be resolved here.
# hostname = ""
bind-address = "0.0.0.0"

# The default cluster and API port
port = 8086

# Once every 24 hours InfluxDB will report anonymous data to m.influxdb.com
# The data includes raft id (random 8 bytes), os, arch and version
# We don't track ip addresses of servers reporting. This is only used
# to track the number of instances running and the versions, which
# is very helpful for us.
# Change this option to true to disable reporting.
reporting-disabled = false

# Controls settings for initial start-up. Once a node is successfully started,
# these settings are ignored.  If a node is started with the -join flag,
# these settings are ignored.
[initialization]
join-urls = "" # Comma-delimited URLs, in the form http://host:port, for joining another cluster.

# Control authentication
# If not set authetication is DISABLED. Be sure to explicitly set this flag to
# true if you want authentication.
[authentication]
enabled = false

# Configure the admin server
[admin]
enabled = true
port = 8083

# Configure the HTTP API endpoint. All time-series data and queries uses this endpoint.
[api]
# ssl-port = 8087    # SSL support is enabled if you set a port and cert
# ssl-cert = "/path/to/cert.pem"

# Configure the Graphite plugins.
[[graphite]] # 1 or more of these sections may be present.
enabled = true
protocol = "tcp" # Set to "tcp" or "udp"
address = "0.0.0.0" # If not set, is actually set to bind-address.
port = 2013
name-position = "last"
name-separator = "."
database = "collectd"  # store graphite data in this database

# Configure the collectd input.
[collectd]
enabled = false
address = "0.0.0.0" # If not set, is actually set to bind-address.
port = 25827
database = "collectd"
typesdb = "/usr/share/collectd/types.db"

# Configure the OpenTSDB input.
[opentsdb]
enabled = false
#address = "0.0.0.0" # If not set, is actually set to bind-address.
#port = 4242
#database = "opentsdb_database"

# Configure UDP listener for series data.
[udp]
enabled = false
bind-address = "0.0.0.0"
port = 4444

# Broker configuration. Brokers are nodes which participate in distributed
# consensus.
[broker]
enabled = true
# Where the Raft logs are stored. The user running InfluxDB will need read/write access.
dir  = "/data/data/influxdb/raft"
truncation-interval = "10m"
max-topic-size = 52428800
max-segment-size = 10485760

# Raft configuration. Controls the distributed consensus system.
[raft]
apply-interval = "10ms"
election-timeout = "1s"
heartbeat-interval = "100ms"
reconnect-timeout = "10ms"

# Data node configuration. Data nodes are where the time-series data, in the form of
# shards, is stored.
[data]
enabled = true
dir = "/data/data/influxdb/db"

# Auto-create a retention policy when a database is created. Defaults to true.
retention-auto-create = true

# Control whether retention policies are enforced and how long the system waits between
# enforcing those policies.
retention-check-enabled = true
retention-check-period = "10m"

# Configuration for snapshot endpoint.
[snapshot]
enabled = true # Enabled by default if not set.

[logging]
write-tracing = false # If true, enables detailed logging of the write system.
raft-tracing = false # If true, enables detailed logging of Raft consensus.
http-access = true # If true, logs each HTTP access to the system.

# InfluxDB can store statistical and diagnostic information about itself. This is useful for
# monitoring purposes. This feature is disabled by default, but if enabled, these data can be
# queried like any other data.
[monitoring]
enabled = true
write-interval = "1m"          # Period between writing the data.

By the way, I have once dropped measurements. Will not influxdb create measurements automatically after new data comes in ?

@otoolep
Copy link
Contributor

otoolep commented May 13, 2015

Does the database collectd exist @liyichao ? Run SHOW DATABASES.

@liyichao
Copy link

yes.

> show databases;
name: databases
---------------
name
_influxdb
collectd

@indrekj
Copy link

indrekj commented Jun 4, 2015

did any of you find a solution?

EDIT: my problem was that I added a semicolon in the end of the command use mydb;. Using just use mydb worked correctly

@toddboom toddboom modified the milestones: 0.9.1, 0.9.2 Jun 5, 2015
@contentfree
Copy link

Just ran into this with 0.9-rc32.

@mnuessler
Copy link
Contributor

In 0.9.0-rc32 I found show series is returning ERR: database not found if the database is still empty, but is working if it contains some data.

@contentfree
Copy link

I found the same thing @mnuessler. Very strange since the database is obviously in the meta data (as shown by show databases)

@otoolep
Copy link
Contributor

otoolep commented Jun 23, 2015

Old cluster design, no longer valid.

@otoolep otoolep closed this as completed Jun 23, 2015
timraymond added a commit to timraymond/influxdb that referenced this issue Jul 17, 2015
Prior to this commit, the "use" command treated trailing semicolons as
significant parts of the database name. This lead to a confusing user
experience since other parts of influxql treat the trailing semicolon as
a statement separator, or appear to ignore it. A typical use case looks
something like:

> show databases;
-- snip --
> use foo;

This commit trims off trailing semicolons from database names in "use"
commands if present to match user expectations.

Fixes influxdata#2258
otoolep pushed a commit that referenced this issue Jul 17, 2015
Prior to this commit, the "use" command treated trailing semicolons as
significant parts of the database name. This lead to a confusing user
experience since other parts of influxql treat the trailing semicolon as
a statement separator, or appear to ignore it. A typical use case looks
something like:

> show databases;
-- snip --
> use foo;

This commit trims off trailing semicolons from database names in "use"
commands if present to match user expectations.

Fixes #2258
@bq-priya-78
Copy link

bq-priya-78 commented Feb 8, 2023

WARN [02-08|09:10:27.411] Unable to send to InfluxDB err="database not found: "l2geth"\n"
WARN [02-08|09:10:37.409] Unable to send to InfluxDB err="database not found: "l2geth"\n"
WARN [02-08|09:10:47.407] Unable to send to InfluxDB err="database not found: "l2geth"\n"
WARN [02-08|09:10:57.408] Unable to send to InfluxDB err="database not found: "l2geth"\n"
WARN [02-08|09:11:07.408] Unable to send to InfluxDB err="database not found: "l2geth"\n"
WARN [02-08|09:11:17.407] Unable to send to InfluxDB err="database not found: "l2geth"\n"
WARN [02-08|09:11:27.407] Unable to send to InfluxDB err="database not found: "l2geth"\n"
WARN [02-08|09:11:37.407] Unable to send to InfluxDB err="database not found: "l2geth"\n"
WARN [02-08|09:11:47.407] Unable to send to InfluxDB err="database not found: "l2geth"\n"
WARN [02-08|09:11:57.407] Unable to send to InfluxDB err="database not found: "l2geth"\n"

I am facing this kind of error when I try to set up the optimism blockchain, anyone helps?

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

No branches or pull requests

10 participants