Hi guys
I’m trying to run indexer from sources using this tutorial because I have MacBook with m1 and have a problem
- I started the PostgreSQL database using this docker image
- Clone repository
git clone git@github.com:FuelLabs/fuel-indexer.git && cd fuel-indexer/
- I don’t have
sqlx
on my computer and installed it from here: sqlx-cli — Homebrew Formulae - Run postgres using docker
docker run -d -p 5432:5432 --name my-postgres -e POSTGRES_PASSWORD=mysecretpassword postgres
- Test connection
postgres://postgres:mysecretpassword@localhost:5432
- Going to folder
cd packages/fuel-indexer-database/postgres
- run migration
DATABASE_URL=postgres://postgres@localhost sqlx migrate run
and have output like that
Applied 2022090908251/migrate create asset registry (15.695541ms)
Applied 20220713212919/migrate initial migration (13.051083ms)
Applied 20230131101109/migrate alter-graph-registry-type-ids-add-identifier (4.350125ms)
- Start the service
cargo run --bin fuel-indexer run
fails with that errorerror: no bin target named fuel-indexer.
I come back to the root folder and rerun the command and have this error
cargo run --bin fuel-indexer run (master+241) 17:55:56
Downloaded hyper-rustls v0.23.1
Downloaded ipnet v2.5.1
Downloaded matchers v0.0.1
Downloaded mach v0.3.2
Downloaded leb128 v0.2.5
Downloaded rayon v1.6.0
Downloaded tracing-subscriber v0.2.25
Downloaded actix-server v2.1.1
Downloaded actix-rt v2.7.0
Downloaded rayon-core v1.10.1
Downloaded fallible-iterator v0.2.0
Downloaded flume v0.10.14
Downloaded target-lexicon v0.12.5
Downloaded tower-http v0.3.4
Downloaded enum-iterator v0.7.0
Downloaded loupe-derive v0.1.3
Downloaded loupe v0.1.3
Downloaded cranelift-frontend v0.82.3
Downloaded enumset v1.0.12
Downloaded regalloc v0.0.34
Downloaded wasmer-engine v2.3.0
Downloaded wasmer-object v2.3.0
Downloaded wasmer-compiler v2.3.0
Downloaded wasmparser v0.83.0
Downloaded corosensei v0.1.3
Downloaded wasmer-vm v2.3.0
Downloaded wasmer-engine-dylib v2.3.0
Downloaded more-asserts v0.2.2
Downloaded wast v50.0.0
Downloaded cranelift-codegen-shared v0.82.3
Downloaded wasm-encoder v0.20.0
Downloaded wat v1.0.52
Downloaded wasmer-derive v2.3.0
Downloaded object v0.28.4
Downloaded cranelift-codegen v0.82.3
Downloaded region v3.0.0
Downloaded pest v2.5.0
Downloaded cranelift-codegen-meta v0.82.3
Downloaded crossbeam-epoch v0.9.13
Downloaded vcpkg v0.2.15
Downloaded crossbeam-deque v0.8.2
Downloaded libsqlite3-sys v0.24.2
Downloaded wasmer-engine-universal v2.3.0
Downloaded wasmer-compiler-cranelift v2.3.0
Downloaded wasmer-artifact v2.3.0
Downloaded forc-tracing v0.31.2
Downloaded memoffset v0.7.1
Downloaded serde_bytes v0.11.7
Downloaded backtrace v0.3.66
Downloaded wasmer-types v2.3.0
Downloaded forc-util v0.31.1
Downloaded cranelift-entity v0.82.3
Downloaded cranelift-bforest v0.82.3
Downloaded enumset_derive v0.6.1
Downloaded wasmer-engine-universal-artifact v2.3.0
Downloaded enum-iterator-derive v0.7.0
Downloaded wasmer v2.3.0
Downloaded portable-atomic v0.3.18
Downloaded polling v2.5.0
Downloaded rustls-native-certs v0.6.2
Downloaded actix-web v4.2.1
Downloaded actix-http v3.2.2
Downloaded sway-types v0.31.2
Downloaded sway-error v0.31.2
Downloaded sway-utils v0.31.2
Downloaded sway-ir-macros v0.31.2
Downloaded sway-ast v0.31.2
Downloaded sway-parse v0.31.2
Downloaded fuel-vm v0.22.4
Downloaded sway-ir v0.31.2
Downloaded sway-core v0.31.2
Downloaded 71 crates (9.1 MB) in 2.01s (largest was `libsqlite3-sys` at 4.8 MB)
Compiling proc-macro2 v1.0.47
Compiling unicode-ident v1.0.5
Compiling quote v1.0.21
Compiling syn v1.0.104
Compiling cfg-if v1.0.0
Compiling libc v0.2.137
Compiling version_check v0.9.4
Compiling autocfg v1.1.0
Compiling serde_derive v1.0.148
Compiling serde v1.0.148
Compiling memchr v2.5.0
Compiling once_cell v1.16.0
Compiling cc v1.0.77
Compiling smallvec v1.10.0
Compiling ahash v0.7.6
Compiling pin-project-lite v0.2.9
Compiling value-bag v1.0.0-alpha.9
Compiling log v0.4.17
Compiling lock_api v0.4.9
Compiling typenum v1.15.0
Compiling getrandom v0.2.8
Compiling scopeguard v1.1.0
Compiling generic-array v0.14.6
Compiling futures-core v0.3.25
Compiling hashbrown v0.12.3
Compiling fnv v1.0.7
Compiling subtle v2.4.1
Compiling parking_lot_core v0.9.4
Compiling thiserror v1.0.37
Compiling num_cpus v1.14.0
Compiling indexmap v1.9.2
Compiling socket2 v0.4.7
Compiling tokio v1.22.0
Compiling signal-hook-registry v1.4.0
Compiling ring v0.16.20
Compiling slab v0.4.7
Compiling block-buffer v0.10.3
Compiling crypto-common v0.1.6
Compiling bitflags v1.3.2
Compiling futures-sink v0.3.25
Compiling itoa v1.0.4
Compiling digest v0.10.6
Compiling parking_lot v0.12.1
Compiling rand_core v0.6.4
Compiling untrusted v0.7.1
Compiling futures-io v0.3.25
Compiling tracing-core v0.1.30
Compiling futures-channel v0.3.25
Compiling cpufeatures v0.2.5
Compiling strsim v0.10.0
Compiling futures-util v0.3.25
Compiling pin-utils v0.1.0
Compiling unicode-xid v0.2.4
Compiling futures-task v0.3.25
Compiling synstructure v0.12.6
Compiling lazy_static v1.4.0
Compiling ppv-lite86 v0.2.17
Compiling hmac v0.12.1
Compiling sha2 v0.10.6
Compiling ryu v1.0.11
Compiling rustversion v1.0.9
Compiling byteorder v1.4.3
Compiling ident_case v1.0.1
Compiling base64ct v1.5.3
Compiling crossbeam-utils v0.8.14
Compiling serde_json v1.0.89
Compiling const-oid v0.9.1
Compiling core-foundation-sys v0.8.3
Compiling ctor v0.1.26
Compiling thiserror-impl v1.0.37
Compiling tokio-macros v1.8.0
Compiling futures-macro v0.3.25
Compiling tracing-attributes v0.1.23
Compiling zeroize_derive v1.3.2
Compiling zeroize v1.5.7
Compiling mio v0.8.5
Compiling der v0.6.0
Compiling webpki v0.22.0
Compiling rand_chacha v0.3.1
Compiling tracing v0.1.37
Compiling generic-array v0.12.4
Compiling spki v0.6.0
Compiling base64 v0.13.1
Compiling unicode-segmentation v1.10.0
Compiling byte-tools v0.3.1
Compiling rustls v0.20.7
Compiling block-padding v0.1.5
Compiling pkcs8 v0.9.0
Compiling rand v0.8.5
Compiling crypto-bigint v0.4.9
Compiling sct v0.7.0
Compiling ff v0.12.1
Compiling num-traits v0.2.15
Compiling base16ct v0.1.1
Compiling group v0.12.1
Compiling sec1 v0.3.0
Compiling block-buffer v0.7.3
Compiling digest v0.8.1
Compiling fake-simd v0.1.2
Compiling opaque-debug v0.2.3
Compiling tinyvec_macros v0.1.0
Compiling percent-encoding v2.2.0
Compiling sha2 v0.8.2
Compiling tinyvec v1.6.0
Compiling elliptic-curve v0.12.3
Compiling rfc6979 v0.3.1
Compiling pin-project-internal v1.0.12
Compiling keccak v0.1.3
Compiling signature v1.6.4
Compiling base58 v0.1.0
Compiling stable_deref_trait v1.2.0
Compiling fallible-iterator v0.2.0
Compiling base58check v0.1.0
Compiling unicode-normalization v0.1.22
Compiling sha3 v0.10.6
Compiling ecdsa v0.14.8
Compiling form_urlencoded v1.1.0
Compiling ptr_meta_derive v0.1.4
Compiling blake2 v0.10.5
Compiling ripemd v0.1.3
Compiling secp256k1-sys v0.6.1
Compiling bytecheck v0.6.9
Compiling unicode-bidi v0.3.8
Compiling bech32 v0.7.3
Compiling base64 v0.12.3
Compiling pin-project v1.0.12
Compiling event-listener v2.5.3
Compiling ptr_meta v0.1.4
Compiling k256 v0.11.6
Compiling bytecheck_derive v0.6.9
Compiling bytes v1.3.0
Compiling either v1.8.0
Compiling hex v0.4.3
Compiling http v0.2.8
Compiling itertools v0.10.5
Compiling gimli v0.26.2
Compiling coins-core v0.7.0
Compiling bincode v1.3.3
Compiling password-hash v0.4.2
Compiling darling_core v0.14.2
Compiling num-integer v0.1.45
Compiling target-lexicon v0.12.5
Compiling rend v0.3.6
Compiling parking_lot_core v0.8.5
Compiling radium v0.3.0
Compiling bs58 v0.4.0
Compiling bitvec v0.17.4
Compiling coins-bip32 v0.7.0
Compiling pbkdf2 v0.11.0
Compiling fuel-types v0.5.3
Compiling idna v0.3.0
Compiling heck v0.4.0
Compiling rustls-pemfile v1.0.1
Compiling backtrace v0.3.66
Compiling proc-macro-error-attr v1.0.4
Compiling instant v0.1.12
Compiling httparse v1.8.0
Compiling darling_macro v0.14.2
Compiling regex-syntax v0.6.28
Compiling tower-service v0.3.2
Compiling tokio-util v0.7.4
Compiling rkyv v0.7.39
Compiling adler v1.0.2
Compiling miniz_oxide v0.5.4
Compiling darling v0.14.2
Compiling coins-bip39 v0.7.0
Compiling addr2line v0.17.0
Compiling secp256k1 v0.24.1
Compiling http-body v0.4.5
Compiling rkyv_derive v0.7.39
Compiling enum-iterator-derive v0.7.0
Compiling loupe-derive v0.1.3
Compiling object v0.29.0
Compiling proc-macro-error v1.0.4
Compiling rustc-demangle v0.1.21
Compiling seahash v4.1.0
Compiling fuel-storage v0.3.0
Compiling borrown v0.1.0
Compiling fuel-merkle v0.4.1
Compiling fuel-crypto v0.6.2
Compiling enum-iterator v0.7.0
Compiling loupe v0.1.3
Compiling tokio-rustls v0.23.4
Compiling enumset_derive v0.6.1
Compiling fuel-asm v0.10.0
Compiling webpki-roots v0.22.5
Compiling derivative v2.2.0
Compiling aho-corasick v0.7.20
Compiling unicase v2.6.0
Compiling httpdate v1.0.2
Compiling void v1.0.2
Compiling pkg-config v0.3.26
Compiling fastrand v1.8.0
Compiling try-lock v0.2.3
Compiling anyhow v1.0.58
Compiling more-asserts v0.2.2
Compiling vcpkg v0.2.15
Compiling crossbeam-queue v0.3.8
Compiling wasmer-types v2.3.0
Compiling want v0.3.0
Compiling unreachable v1.0.0
Compiling regex v1.7.0
Compiling enumset v1.0.12
Compiling libsqlite3-sys v0.24.2
Compiling fuel-tx v0.23.1
Compiling h2 v0.3.15
Compiling serde_bytes v0.11.7
Compiling security-framework-sys v2.6.1
Compiling core-foundation v0.9.3
Compiling wasmparser v0.83.0
Compiling minimal-lexical v0.2.1
Compiling ascii v0.9.3
Compiling wasmer-compiler v2.3.0
Compiling nom v7.1.1
Compiling security-framework v2.7.0
Compiling hyper v0.14.23
Compiling url v2.3.1
Compiling futures-executor v0.3.25
Compiling heck v0.3.3
Compiling spin v0.9.4
Compiling dirs-sys v0.3.7
Compiling crc-catalog v2.1.0
Compiling mime v0.3.16
Compiling unicode_categories v0.1.1
Compiling block-padding v0.2.1
Compiling block-buffer v0.9.0
Compiling sqlformat v0.2.0
Compiling crc v3.0.0
Compiling strum_macros v0.21.1
Compiling dirs v4.0.0
Compiling mime_guess v2.0.4
Compiling parking_lot v0.11.2
Compiling stringprep v0.1.2
Compiling hkdf v0.12.3
Compiling md-5 v0.10.5
Compiling digest v0.9.0
Compiling memoffset v0.7.1
Compiling os_str_bytes v6.4.1
Compiling waker-fn v1.1.0
Compiling paste v1.0.9
Compiling encoding_rs v0.8.31
Compiling whoami v1.2.3
Compiling opaque-debug v0.3.0
Compiling strum v0.21.0
Compiling protobuf v2.28.0
Compiling parking v2.0.0
Compiling dotenvy v0.15.6
Compiling bech32 v0.9.1
Compiling futures-lite v1.12.0
Compiling fuels-types v0.30.0
Compiling clap_lex v0.2.4
Compiling sha2 v0.9.9
Compiling flume v0.10.14
Compiling futures-intrusive v0.4.2
Compiling sqlx-rt v0.6.2
Compiling hashlink v0.8.1
Compiling tokio-stream v0.1.11
Compiling clap_derive v3.2.18
Compiling Inflector v0.11.4
Compiling regex-automata v0.1.10
Compiling strum_macros v0.24.3
Compiling atoi v1.0.0
Compiling iana-time-zone v0.1.53
Compiling sct v0.6.1
Compiling webpki v0.21.4
Compiling sha1 v0.10.5
Compiling atty v0.2.14
Compiling time v0.1.45
Compiling corosensei v0.1.3
Compiling crossbeam-epoch v0.9.13
Compiling memoffset v0.6.5
Compiling prometheus v0.13.3
Compiling textwrap v0.16.0
Compiling linked-hash-map v0.5.6
Compiling termcolor v1.1.3
Compiling overload v0.1.1
Compiling cranelift-codegen-shared v0.82.3
Compiling yaml-rust v0.4.5
Compiling nu-ansi-term v0.46.0
Compiling cranelift-codegen-meta v0.82.3
Compiling clap v3.2.23
Compiling strum v0.24.1
Compiling fuels-core v0.30.0
Compiling chrono v0.4.23
Compiling sqlx-core v0.6.2
Compiling matchers v0.1.0
Compiling async-lock v2.6.0
Compiling wasmer-artifact v2.3.0
Compiling tracing-serde v0.1.3
Compiling tracing-log v0.1.3
Compiling darling_core v0.13.4
Compiling sharded-slab v0.1.4
Compiling mach v0.3.2
Compiling thread_local v1.1.4
Compiling polling v2.5.0
Compiling cache-padded v1.2.0
Compiling crc32fast v1.3.2
Compiling leb128 v0.2.5
Compiling concurrent-queue v1.2.4
Compiling region v3.0.0
Compiling tracing-subscriber v0.3.16
Compiling cranelift-codegen v0.82.3
Compiling darling_macro v0.13.4
Compiling fuel-indexer-types v0.2.3 (/Users/alexey/projects/fuel/fuel-indexer/packages/fuel-indexer-types)
Compiling serde_yaml v0.8.26
Compiling rustls v0.19.1
Compiling rustls-native-certs v0.6.2
Compiling combine v3.8.1
Compiling serde_urlencoded v0.7.1
Compiling concurrent-queue v2.0.0
Compiling async-io v1.12.0
Compiling cranelift-entity v0.82.3
Compiling fuel-indexer-postgres v0.2.3 (/Users/alexey/projects/fuel/fuel-indexer/packages/fuel-indexer-database/postgres)
Compiling tower-layer v0.3.2
Compiling rayon-core v1.10.1
Compiling rustc-hash v1.1.0
Compiling async-trait v0.1.58
Compiling async-task v4.3.0
Compiling regalloc v0.0.34
Compiling cranelift-bforest v0.82.3
Compiling fuel-indexer-lib v0.2.3 (/Users/alexey/projects/fuel/fuel-indexer/packages/fuel-indexer-lib)
Compiling hyper-rustls v0.23.1
Compiling wasmer-vm v2.3.0
Compiling darling v0.13.4
Compiling crossbeam-deque v0.8.2
Compiling graphql-parser v0.4.0
Compiling fuel-indexer-metrics v0.2.3 (/Users/alexey/projects/fuel/fuel-indexer/packages/fuel-indexer-metrics)
Compiling async-channel v1.7.1
Compiling fuel-indexer-database-types v0.2.3 (/Users/alexey/projects/fuel/fuel-indexer/packages/fuel-indexer-database/database-types)
Compiling counter v0.5.7
Compiling crossbeam-channel v0.5.6
Compiling hashbrown v0.11.2
Compiling memmap2 v0.5.8
Compiling multer v2.0.4
Compiling atomic-waker v1.0.0
Compiling object v0.28.4
Compiling blocking v1.3.0
Compiling wasmer-engine v2.3.0
Compiling cynic-codegen v2.2.1
Compiling async-executor v1.5.0
Compiling tower v0.4.13
Compiling rustls-native-certs v0.5.0
Compiling tokio-rustls v0.22.0
Compiling wasm-encoder v0.20.0
Compiling webpki-roots v0.21.1
Compiling sqlx-macros v0.6.2
Compiling ct-logs v0.8.0
Compiling tokio-io-timeout v1.2.0
Compiling unicode-width v0.1.10
Compiling remove_dir_all v0.5.3
Compiling wasmer-compiler-cranelift v2.3.0
Compiling http-range-header v0.3.0
Compiling ipnet v2.5.1
Compiling reqwest v0.11.13
Compiling tower-http v0.3.4
Compiling axum-core v0.2.9
Compiling tempfile v3.3.0
Compiling wast v50.0.0
Compiling graphql-parser v0.3.0
Compiling hyper-timeout v0.4.1
Compiling hyper-rustls v0.22.1
Compiling async-global-executor v2.3.1
Compiling sqlx v0.6.2
Compiling wasmer-object v2.3.0
Compiling rayon v1.6.0
Compiling cynic-proc-macros v2.2.1
error: error returned from database: password authentication failed for user "postgres"
--> packages/fuel-indexer-database/postgres/src/lib.rs:93:5
|
93 | / sqlx::query_as!(
94 | | RootColumns,
95 | | r#"SELECT
96 | | id AS "id: i64", root_id AS "root_id: i64", column_name, graphql_type
... |
99 | | root_id
100 | | )
| |_____^
|
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)
error: error returned from database: password authentication failed for user "postgres"
--> packages/fuel-indexer-database/postgres/src/lib.rs:231:18
|
231 | let latest = sqlx::query_as!(
| __________________^
232 | | IdLatest,
233 | | "SELECT schema_version FROM graph_registry_type_ids WHERE schema_name = $1 ORDER BY id",
234 | | schema_name
235 | | )
| |_____^
|
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)
Compiling cranelift-frontend v0.82.3
error: error returned from database: password authentication failed for user "postgres"
--> packages/fuel-indexer-database/postgres/src/lib.rs:318:5
|
318 | sqlx::query_as!(Columns, r#"SELECT id AS "id: i64", type_id, column_position, column_name, column_type AS "column_type: String", nullable, graphql_type FROM graph_registry_columns WHERE type_id = $1"#, col_id).fe...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)
Compiling wasmer-engine-universal-artifact v2.3.0
error: error returned from database: password authentication failed for user "postgres"
--> packages/fuel-indexer-database/postgres/src/lib.rs:329:5
|
329 | / sqlx::query_as!(
330 | | ColumnInfo,
331 | | r#"SELECT
332 | | c.type_id as type_id,
... |
344 | | version
345 | | )
| |_____^
|
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)
Compiling futures v0.3.25
Compiling which v4.3.0
error: error returned from database: password authentication failed for user "postgres"
--> packages/fuel-indexer-database/postgres/src/lib.rs:358:11
|
358 | match sqlx::query_as!(
| ___________^
359 | | RegisteredIndex,
360 | | "SELECT * FROM index_registry WHERE namespace = $1 AND identifier = $2",
361 | | namespace,
362 | | identifier
363 | | )
| |_____^
|
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)
error: error returned from database: password authentication failed for user "postgres"
--> packages/fuel-indexer-database/postgres/src/lib.rs:409:5
|
409 | sqlx::query_as!(RegisteredIndex, "SELECT * FROM index_registry",)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)
Compiling tai64 v4.0.0
Compiling kv-log-macro v1.0.7
error: could not compile `fuel-indexer-postgres` due to 6 previous errors
warning: build failed, waiting for other jobs to finish...