baking-bad / tzkt

😼 Awesome Tezos blockchain indexer and API
https://tzkt.io
MIT License
183 stars 35 forks source link

I can't access tzkt explorer through api endpoint #161

Closed nasbasarin closed 10 months ago

nasbasarin commented 10 months ago

I have run tzkt successfully the logs from tzkt-api is given below info: Program[0] Version 1.12.4.0 info: Program[0] Initialize database... warn: Program[0] 12 pending migrations. Let's wait for the indexer to migrate the database, and try again. info: Program[0] Initialize database... warn: Program[0] 9 pending migrations. Let's wait for the indexer to migrate the database, and try again. info: Program[0] Initialize database... warn: Program[0] No data in the database. Let's wait for the indexer to index at least two blocks, and try again. info: Program[0] Initialize database... warn: Program[0] No data in the database. Let's wait for the indexer to index at least two blocks, and try again. info: Program[0] Initialize database... info: Program[0] Database initialized info: Tzkt.Api.Services.Cache.StateCache[0] Loaded state [2:BKnnrpuWjPMHczEadcztegzHbLRR4f8j7oarPaDvuw4sxVtLZJp] info: Tzkt.Api.Services.Cache.AccountsCache[0] Loaded 7 of 10 accounts info: Tzkt.Api.Services.Cache.AliasesCache[0] Loaded 0 aliases info: Tzkt.Api.Services.Cache.ProtocolsCache[0] Loaded 3 of 3 protocols info: Tzkt.Api.Services.Cache.TimeCache[0] Loaded 3 timestamps info: Tzkt.Api.Services.Cache.QuotesCache[0] Loaded 3 quotes info: Tzkt.Api.Services.Sync.StateListener[0] DB listener started info: Tzkt.Api.Services.Sync.StateListener[0] Db listener connected warn: Microsoft.AspNetCore.Server.Kestrel[0] Overriding address(es) 'http://+:5000'. Binding to endpoints defined via IConfiguration and/or UseKestrel() instead. info: Microsoft.Hosting.Lifetime[14] Now listening on: http://0.0.0.0:5000 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime[0] Hosting environment: Production info: Microsoft.Hosting.Lifetime[0] Content root path: /app

  But the default api is not available at http://127.0.0.1:5000/
Groxan commented 10 months ago

There is nothing at the root path http://127.0.0.1:5000/. Check out the docs to see available endpoints.

nasbasarin commented 10 months ago

There is nothing at the root path http://127.0.0.1:5000/. Check out the docs to see available endpoints.

from the documentation i found that make init # Restores DB from the latest snapshot. Skip it, if you want to index from scratch. make start # Starts DB, indexer, and API. By default, the API will be available at http://127.0.0.1:5000. make stop # Stops DB, indexer, and API.

i have setup tzkt locally . how can i access the indexer through browser?

Groxan commented 10 months ago

That is just a base path. If you want to access a particular endpoint, you need to append its path to the base path. For example, http://127.0.0.1:5000/v1/head.

Check out the docs to see available endpoints.

nasbasarin commented 10 months ago

I got this error in tzkt-sync container what is the issue? Failed to check updates System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 60 seconds elapsing. ---> System.TimeoutException: The operation was canceled. ---> System.Threading.Tasks.TaskCanceledException: The operation was canceled. ---> System.IO.IOException: Unable to read data from the transport connection: Operation canceled. ---> System.Net.Sockets.SocketException (125): Operation canceled --- End of inner exception stack trace --- at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpClient.GetStreamAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) --- End of inner exception stack trace --- --- End of inner exception stack trace --- at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts) at System.Net.Http.HttpClient.GetStreamAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) at Tzkt.Sync.TzktClient.GetObjectAsync[T](String path) in /app/Tzkt.Sync/Utils/TzktClient.cs:line 64 at Tzkt.Sync.Services.TezosNode.GetHeaderAsync() in /app/Tzkt.Sync/Services/TezosNode/TezosNode.cs:line 46 at Tzkt.Sync.Services.TezosNode.HasUpdatesAsync(Int32 level) in /app/Tzkt.Sync/Services/TezosNode/TezosNode.cs:line 96 at Tzkt.Sync.Services.Observer.WaitForUpdatesAsync(CancellationToken cancelToken) in /app/Tzkt.Sync/Services/Observer/Observer.cs:line 138 at Tzkt.Sync.Services.Observer.ExecuteAsync(CancellationToken cancelToken) in /app/Tzkt.Sync/Services/Observer/Observer.cs:line 46

Groxan commented 10 months ago

The request was canceled due to the configured HttpClient.Timeout of 60 seconds at Tzkt.Sync.Services.TezosNode.GetHeaderAsync()

Logs say that the indexer cannot fetch data from your tezos node, because it doesn't respond and fails with timeout after 60 sec

nasbasarin commented 10 months ago

Does tzkt have a frontend? we need a frontend to show the user latest blocks and transactions. How can i use tzkt explorer website?

Groxan commented 10 months ago

There is no open-source frontend on top of tzkt indexer at the moment

Groxan commented 10 months ago

I'm closing it as your questions have been answered