roadrunner: [BUG, RR2] Error when starting RR2

Hello,

I’ve tried a simple default setup with RR2 beta24 but when starting up with

rr serve -d I am getting an error as per backtrace below. I’ve also attached the yml I used (basically the default one with the php entrypoint changed).

Version: v2.0.0-beta.24

rpc:
  listen: tcp://127.0.0.1:6001

server:
  command: "php public/index.php"
  user: ""
  group: ""
  env:
    "RR_HTTP": "true"
    "RR_RPC": "tcp://127.0.0.1:6001"
  relay: "pipes"
  relay_timeout: 20s

logs:
  mode: development
  level: error
  format: json

# Workflow and activity mesh service
temporal:
  address: localhost:7233
  activities:
    num_workers: 4
  codec: json
  debug_level: 2

http:
  # host and port separated by semicolon
  address: 127.0.0.1:44933
  max_request_size: 1024
  middleware: [ "gzip", "headers" ]
  uploads:
    forbid: [ ".php", ".exe", ".bat" ]
  trusted_subnets:
    [
        "10.0.0.0/8",
        "127.0.0.0/8",
        "172.16.0.0/12",
        "192.168.0.0/16",
        "::1/128",
        "fc00::/7",
        "fe80::/10",
    ]
  headers:
    cors:
      allowed_origin: "*"
      allowed_headers: "*"
      allowed_methods: "GET,POST,PUT,DELETE"
      allow_credentials: true
      exposed_headers: "Cache-Control,Content-Language,Content-Type,Expires,Last-Modified,Pragma"
      max_age: 600
    request:
      input: "custom-header"
    response:
      output: "output-header"
  static:
    dir: "tests"
    forbid: [ "" ]
    request:
      "input": "custom-header"
    response:
      "output": "output-header"

  pool:
    # default - num of logical CPUs
    num_workers: 2
    # default 0
    max_jobs: 0
    # default 1 minute
    allocate_timeout: 60s
    # default 1 minute
    destroy_timeout: 60s
    supervisor:
      # watch_tick defines how often to check the state of the workers (seconds)
      watch_tick: 1s
      # ttl defines maximum time worker is allowed to live (seconds)
      ttl: 0
      # idle_ttl defines maximum duration worker can spend in idle mode after first use. Disabled when 0 (seconds)
      idle_ttl: 10s
      # exec_ttl defines maximum lifetime per job (seconds)
      exec_ttl: 10s
      # max_worker_memory limits memory usage per worker (MB)
      max_worker_memory: 100

  ssl:
    # host and port separated by semicolon (default :443)
    address: :8892
    redirect: false
    cert: fixtures/server.crt
    key: fixtures/server.key
    root_ca: root.crt
  fcgi:
    address: tcp://0.0.0.0:7921
  http2:
    h2c: false
    max_concurrent_streams: 128

redis:
  # UniversalClient is an abstract client which - based on the provided options -
  # can connect to either clusters, or sentinel-backed failover instances
  # or simple single-instance servers. This can be useful for testing
  # cluster-specific applications locally.
  # if the number of addrs is 1 and master_name is empty, a single-node redis Client will be returned

  # if the number of addrs is two or more, a ClusterClient will be returned
  addrs:
    - "localhost:6379"
  # if a MasterName is passed a sentinel-backed FailoverClient will be returned
  master_name: ""
  username: ""
  password: ""
  db: 0
  sentinel_password: ""
  route_by_latency: false
  route_randomly: false
  dial_timeout: 0 # accepted values [1s, 5m, 3h]
  max_retries: 1
  min_retry_backoff: 0 # accepted values [1s, 5m, 3h]
  max_retry_backoff: 0 # accepted values [1s, 5m, 3h]
  pool_size: 0
  min_idle_conns: 0
  max_conn_age: 0 # accepted values [1s, 5m, 3h]
  read_timeout: 0 # accepted values [1s, 5m, 3h]
  write_timeout: 0 # accepted values [1s, 5m, 3h]
  pool_timeout: 0 # accepted values [1s, 5m, 3h]
  idle_timeout: 0 # accepted values [1s, 5m, 3h]
  idle_check_freq: 0 # accepted values [1s, 5m, 3h]
  read_only: false

# boltdb simple driver
boltdb:
  dir: "."
  file: "rr"
  bucket: "test"
  permissions: 0777
  # keys ttl check interval
  TTL: 60 # seconds

  # memcached driver
memcached:
  addr:
    - "localhost:11211"

# in memory KV driver
memory:
  # keys ttl check interval
  interval: 60

metrics:
  # prometheus client address (path /metrics added automatically)
  address: localhost:2112
  collect:
    app_metric:
      type: histogram
      help: "Custom application metric"
      labels: [ "type" ]
      buckets: [ 0.1, 0.2, 0.3, 1.0 ]
      # objectives defines the quantile rank estimates with their respective
      #	absolute error [ for summary only ]
      objectives:
        - 1.4: 2.3
        - 2.0: 1.4

reload:
  # sync interval
  interval: 1s
  # global patterns to sync
  patterns: [ ".go" ]
  # list of included for sync services
  services:
    http:
      # recursive search for file patterns to add
      recursive: true
      # ignored folders
      ignore: [ "vendor" ]
      # service specific file pattens to sync
      patterns: [ ".php", ".go", ".md" ]
      # directories to sync. If recursive is set to true,
      # recursive sync will be applied only to the directories in `dirs` section
      dirs: [ "." ]


I expected to see this happen: php file served

Instead, this happened: error

The version of RR used: v2.0.0-beta.24

Errortrace, Backtrace or Panictrace

2021-02-11T12:19:24.498+0200	ERROR	container/init.go:74	error calling internal_init	{"vertex id": "boltdb.Plugin", "error": "boltdb_plugin_init: invalid database"}
github.com/spiral/endure/pkg/container.(*Endure).callInitFn
	github.com/spiral/endure@v1.0.0-beta.22/pkg/container/init.go:74
github.com/spiral/endure/pkg/container.(*Endure).internalInit
	github.com/spiral/endure@v1.0.0-beta.22/pkg/container/init.go:26
github.com/spiral/endure/pkg/container.(*Endure).Initialize
	github.com/spiral/endure@v1.0.0-beta.22/pkg/container/endure.go:360
reflect.Value.call
	reflect/value.go:476
reflect.Value.Call
	reflect/value.go:337
github.com/spiral/endure/pkg/fsm.(*FSMImpl).Transition
	github.com/spiral/endure@v1.0.0-beta.22/pkg/fsm/fsm.go:180
github.com/spiral/endure/pkg/container.(*Endure).Init
	github.com/spiral/endure@v1.0.0-beta.22/pkg/container/endure.go:290
github.com/spiral/roadrunner/v2/cmd/cli.handler
	github.com/spiral/roadrunner/v2/cmd/cli/serve.go:29
github.com/spf13/cobra.(*Command).execute
	github.com/spf13/cobra@v1.1.1/command.go:850
github.com/spf13/cobra.(*Command).ExecuteC
	github.com/spf13/cobra@v1.1.1/command.go:958
github.com/spf13/cobra.(*Command).Execute
	github.com/spf13/cobra@v1.1.1/command.go:895
github.com/spiral/roadrunner/v2/cmd/cli.Execute
	github.com/spiral/roadrunner/v2/cmd/cli/root.go:41
main.main
	command-line-arguments/main.go:68
runtime.main
	runtime/proc.go:204
2021-02-11T12:19:24.499+0200	ERROR	container/init.go:31	error occurred during the call INIT function	{"vertex id": "boltdb.Plugin", "error": "endure_call_init_fn: Function call error:\n\tboltdb_plugin_init: invalid database"}
github.com/spiral/endure/pkg/container.(*Endure).internalInit
	github.com/spiral/endure@v1.0.0-beta.22/pkg/container/init.go:31
github.com/spiral/endure/pkg/container.(*Endure).Initialize
	github.com/spiral/endure@v1.0.0-beta.22/pkg/container/endure.go:360
reflect.Value.call
	reflect/value.go:476
reflect.Value.Call
	reflect/value.go:337
github.com/spiral/endure/pkg/fsm.(*FSMImpl).Transition
	github.com/spiral/endure@v1.0.0-beta.22/pkg/fsm/fsm.go:180
github.com/spiral/endure/pkg/container.(*Endure).Init
	github.com/spiral/endure@v1.0.0-beta.22/pkg/container/endure.go:290
github.com/spiral/roadrunner/v2/cmd/cli.handler
	github.com/spiral/roadrunner/v2/cmd/cli/serve.go:29
github.com/spf13/cobra.(*Command).execute
	github.com/spf13/cobra@v1.1.1/command.go:850
github.com/spf13/cobra.(*Command).ExecuteC
	github.com/spf13/cobra@v1.1.1/command.go:958
github.com/spf13/cobra.(*Command).Execute
	github.com/spf13/cobra@v1.1.1/command.go:895
github.com/spiral/roadrunner/v2/cmd/cli.Execute
	github.com/spiral/roadrunner/v2/cmd/cli/root.go:41
main.main
	command-line-arguments/main.go:68
runtime.main
	runtime/proc.go:204
2021-02-11T12:19:24.500+0200	ERROR	container/endure.go:384	error during the internal_init	{"error": "endure_internal_init: Function call error:\n\tendure_call_init_fn:\n\tboltdb_plugin_init: invalid database"}
github.com/spiral/endure/pkg/container.(*Endure).Initialize
	github.com/spiral/endure@v1.0.0-beta.22/pkg/container/endure.go:384
reflect.Value.call
	reflect/value.go:476
reflect.Value.Call
	reflect/value.go:337
github.com/spiral/endure/pkg/fsm.(*FSMImpl).Transition
	github.com/spiral/endure@v1.0.0-beta.22/pkg/fsm/fsm.go:180
github.com/spiral/endure/pkg/container.(*Endure).Init
	github.com/spiral/endure@v1.0.0-beta.22/pkg/container/endure.go:290
github.com/spiral/roadrunner/v2/cmd/cli.handler
	github.com/spiral/roadrunner/v2/cmd/cli/serve.go:29
github.com/spf13/cobra.(*Command).execute
	github.com/spf13/cobra@v1.1.1/command.go:850
github.com/spf13/cobra.(*Command).ExecuteC
	github.com/spf13/cobra@v1.1.1/command.go:958
github.com/spf13/cobra.(*Command).Execute
	github.com/spf13/cobra@v1.1.1/command.go:895
github.com/spiral/roadrunner/v2/cmd/cli.Execute
	github.com/spiral/roadrunner/v2/cmd/cli/root.go:41
main.main
	command-line-arguments/main.go:68
runtime.main
	runtime/proc.go:204
2021/02/11 12:19:24 handle_serve_command: Init error:
	endure_initialize:
	endure_internal_init: Function call error:
	endure_call_init_fn:
	boltdb_plugin_init: invalid database

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (10 by maintainers)

Most upvoted comments

edit: removed previous post saying I still had the issue. I had an issue with my IDE, left some whitespace in my PHP file that apparently messed it up. It’s good now, thanks!