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

Ошибка при старте приложения в отсутствии интернета и плохое ее поведение. #45

Closed
CoderFF opened this issue Jul 11, 2018 · 8 comments
Labels
bug Something isn't working linux issue applies to linux/unix systems

Comments

@CoderFF
Copy link

CoderFF commented Jul 11, 2018

Ubuntu 16.04
Architecture: amd64
CurrentDesktop: Unity
При старте приложения в отсутствии интернета, появляется диалог с ошибкой и кнопкой "ОК"

A JavaScript error occurred in the main process
Uncaught Exception:
Error: getaddrinfo EAI_AGAIN
at Object._errnoException (util.js:1024:11)
at errnoException (dns.js:55:15)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)

Здесь есть две проблемы:

  1. Если НЕ нажать ОК, а переключиться на другое приложение и затем вернуться, то диалог пропадает и вернуться на него уже невозможно. При этом, само приложение зависает и не реагирует на попытки выйти из него.
  2. Если нажать ОК, то приложение вроде бы запускается, но перестаёт искать новые торренты, даже если интернет затем появился. Это выражается в том, что обычно там где выводится X TB data Y torrents Z files числа время от времени увеличиваются, это сопровождается выводом в консоль сообщений вроде

replicate remote torrent ..........
finded torrent .........

так вот, после старта в отсутствие интернета, даже если потом интернет появился, такие сообщения отсутствуют, числа не увеличиваются.

Вывод консоли при старте в отсутствие интернета:

Rats 0.23.0
Platform: linux
Arch: x64
OS Release: 4.13.0-45-generic
CPU: Intel(R) Pentium(R) CPU 2020M @ 2.40GHz
CPU Logic cores: 2
Total memory: 5798.11 MB
Free memory: 2517.07 MB
listening udp tracker respose on 0.0.0.0:4446
Sphinx Path: /tmp/.mount_rats-swcDtJF/app/x64/searchd
writed sphinx config to /home/coder/.config/Rats on The Boat
db path: /home/coder/.config/Rats on The Boat
sphinx: [Wed Jul 11 17:59:44.179 2018] [5211] using config file '/home/coder/.config/Rats on The Boat/sphinx.conf'...

sphinx: listening on all interfaces, port=9312

sphinx: listening on all interfaces, port=9306

sphinx: Manticore 2.6.1 a7fa71e@180126 release
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2018, Manticore Software LTD (http://manticoresearch.com)

precaching index 'torrents'

sphinx: precaching index 'files'

sphinx: precaching index 'version'

sphinx: precaching index 'store'

sphinx: precaching index 'feed'

sphinx: accepting connections

catched sphinx start
sphinx: prereading 5 indexes
prereaded 5 indexes in 0.000 sec

db version 4
db patch done
listen p2p on 4445 port
connect p2p store...
loaded 3 peers
p2p replication server enabled
replication client is enabled
Checking for update
close peer connection { address: '87.244.158.223', port: 4445 }
close peer connection { address: '109.187.6.61', port: 4445 }
close peer connection { address: '5.128.183.119', port: 4445 }
https://api.myjson.com/bins/1e5rmh error: getaddrinfo EAI_AGAIN api.myjson.com:443
https://jsonblob.com/api/jsonBlob/013a4415-3533-11e8-8290-a901f3cf34aa error: getaddrinfo EAI_AGAIN jsonblob.com:443
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
store db index 96
lodead feed
restore downloading sessions
restore download session: ������ ������. ��� ���o��.pdf
download magnet:?xt=urn:btih:7c5e32074d10fbf850bdb90a3421bc481d1aef39
restore options
Listen DHT protocol on 0.0.0.0:4445
Error: Error: net::ERR_INTERNET_DISCONNECTED
    at CancellationToken.createPromise (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/builder-util-runtime/src/CancellationToken.ts:51:5)
    at ElectronHttpExecutor.doApiRequest (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/builder-util-runtime/src/httpExecutor.ts:81:30)
    at ElectronHttpExecutor.request (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/builder-util-runtime/src/httpExecutor.ts:73:17)
    at GitHubProvider.httpRequest (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/electron-updater/src/Provider.ts:26:26)
    at /tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/electron-updater/src/GitHubProvider.ts:38:41
    at Generator.next (<anonymous>)
From previous event:
    at GitHubProvider.getLatestVersion (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/electron-updater/out/GitHubProvider.js:167:7)
    at /tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:304:25
    at Generator.next (<anonymous>)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
    at AppImageUpdater.getUpdateInfo (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/electron-updater/out/AppUpdater.js:460:7)
    at /tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:308:35
    at Generator.next (<anonymous>)
From previous event:
    at AppImageUpdater.doCheckForUpdates (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/electron-updater/out/AppUpdater.js:502:7)
    at /tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:279:25
    at Generator.next (<anonymous>)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
    at AppImageUpdater._checkForUpdates (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/electron-updater/out/AppUpdater.js:433:7)
    at AppImageUpdater.checkForUpdates (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/electron-updater/src/AppUpdater.ts:217:35)
    at v (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/app/webpack:/src/background/background.js:227:33)
    at h (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/app/webpack:/src/background/dbPatcher.js:208:9)
    at l.query (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/app/webpack:/src/background/dbPatcher.js:219:26)
    at Query.function.t [as _callback] (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/app/webpack:/src/background/mysql.js:35:3)
    at Query.Sequence.end (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/mysql/lib/protocol/sequences/Sequence.js:88:24)
    at Query._handleFinalResultPacket (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/mysql/lib/protocol/sequences/Query.js:139:8)
    at Query.EofPacket (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/mysql/lib/protocol/sequences/Query.js:123:8)
    at Protocol._parsePacket (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/mysql/lib/protocol/Protocol.js:279:23)
    at Parser.write (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/mysql/lib/protocol/Parser.js:76:12)
    at Protocol.write (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/mysql/lib/protocol/Protocol.js:39:16)
    at Socket.<anonymous> (/tmp/.mount_rats-swcDtJF/app/resources/app.asar/node_modules/mysql/lib/Connection.js:103:28)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at Socket.Readable.push (_stream_readable.js:208:10)
    at TCP.onread (net.js:594:20)
upnp server dont respond
upnp server dont respond
upnp server dont respond
spider closing...
save torrents downloads sessions
saving feed
closing p2p...
spider closed
sphinx closing...
sphinx: caught SIGTERM, shutting down

sphinx: rt: index torrents: ramchunk saved in 0.006 sec

sphinx: rt: index files: ramchunk saved in 0.148 sec

sphinx: shutdown complete

sphinx: precached 5 indexes in 0.069 sec

sphinx closed with code 0 and signal null
@DEgITx DEgITx added bug Something isn't working linux issue applies to linux/unix systems labels Jul 11, 2018
@DEgITx
Copy link
Owner

DEgITx commented Jul 12, 2018

Пробовал под debian и fedora, на первую часть после поправки не натыкался, но исправления касались нижнего сообщения, протестируешь 0.24.0 когда выйдет, может уже будет нормально

DEgITx pushed a commit that referenced this issue Jul 13, 2018
# [0.24.0](v0.23.0...v0.24.0) (2018-07-13)

### Bug Fixes

* **db:** fix startup on broken db after hardware shutdown [#43](#43) ([2c00d8c](2c00d8c))
* **ignore:** ignore more server files ([77035f1](77035f1))
* **menu:** new page struct update in menu list ([3fad6c2](3fad6c2))
* **patch:** fix memory issue ([a339d01](a339d01))
* **updater:** fix errors messages on updater if no internet connection [#45](#45) ([6ec6609](6ec6609))

### Features

* **bootstrap:** always load bootstrap peers when no peers situation (not only on startup) ([3a5c934](3a5c934))
* **p2p:** new optimized peer exchange algorithm ([65e61c5](65e61c5))
* **search:** part words search feature ([8836607](8836607))
@DEgITx
Copy link
Owner

DEgITx commented Jul 17, 2018

актуально? или закрывать тикет?

@CoderFF
Copy link
Author

CoderFF commented Jul 17, 2018

Да. Хотел вот что сказать.
Десктопная версия. Ошибка осталась, но после появления интернета начинает искать торренты.

Серверная версия. Выдает ошибку и вываливается.


Listening web server on 8095 port
Sphinx Path: /home/coder/workspace/rats-search/imports/linux/x64/searchd
writed sphinx config to /home/coder/workspace/rats-search
db path: /home/coder/workspace/rats-search
listening udp tracker respose on 0.0.0.0:4446
sphinx: [Tue Jul 17 10:17:55.401 2018] [3365] using config file '/home/coder/workspace/rats-search/sphinx.conf'...
listening on all interfaces, port=9312
listening on all interfaces, port=9306
Manticore 2.6.1 a7fa71e@180126 release
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2018, Manticore Software LTD (http://manticoresearch.com)

precaching index 'torrents'

sphinx: precaching index 'files'

sphinx: precaching index 'version'

sphinx: precaching index 'store'

sphinx: precaching index 'feed'

sphinx: binlog: replaying log /home/coder/workspace/rats-search/binlog.001

sphinx: binlog: index torrents: recovered from tid 427467 to tid 488878
binlog: index files: skipped at tid 7828127 and max binlog tid 6437868
binlog: replay stats: 818766 rows in 819391 commits; 34219 updates, 0 reconfigure; 2 indexes

sphinx: binlog: finished replaying /home/coder/workspace/rats-search/binlog.001; 240.9 MB in 2.476 sec
binlog: replaying log /home/coder/workspace/rats-search/binlog.002

sphinx: binlog: index torrents: recovered from tid 488878 to tid 500536
binlog: index files: skipped at tid 7828127 and max binlog tid 6557804
binlog: replay stats: 124213 rows in 124264 commits; 7330 updates, 0 reconfigure; 2 indexes
binlog: finished replaying /home/coder/workspace/rats-search/binlog.002; 35.2 MB in 0.385 sec
binlog: replaying log /home/coder/workspace/rats-search/binlog.003

sphinx: binlog: index torrents: recovered from tid 500536 to tid 577428
binlog: index files: skipped at tid 7828127 and max binlog tid 7267282
binlog: replay stats: 736762 rows in 736951 commits; 49419 updates, 0 reconfigure; 2 indexes
binlog: finished replaying /home/coder/workspace/rats-search/binlog.003; 209.2 MB in 2.345 sec
binlog: replaying log /home/coder/workspace/rats-search/binlog.004

sphinx: binlog: index torrents: recovered from tid 577428 to tid 636338
binlog: index files: skipped at tid 7828127 and max binlog tid 7819803
binlog: replay stats: 573697 rows in 573916 commits; 37515 updates, 0 reconfigure; 2 indexes
binlog: finished replaying /home/coder/workspace/rats-search/binlog.004; 165.6 MB in 1.835 sec
binlog: replaying log /home/coder/workspace/rats-search/binlog.007

sphinx: binlog: index torrents: recovered from tid 636338 to tid 636616
binlog: index files: skipped at tid 7828127 and max binlog tid 7822217
binlog: replay stats: 2536 rows in 2536 commits; 156 updates, 0 reconfigure; 2 indexes
binlog: finished replaying /home/coder/workspace/rats-search/binlog.007; 0.5 MB in 0.008 sec
binlog: replaying log /home/coder/workspace/rats-search/binlog.008

sphinx: binlog: index torrents: recovered from tid 636616 to tid 637488
binlog: index files: recovered from tid 7828127 to tid 7833927
binlog: replay stats: 12084 rows in 12084 commits; 498 updates, 0 reconfigure; 2 indexes
binlog: finished replaying /home/coder/workspace/rats-search/binlog.008; 3.2 MB in 0.107 sec
binlog: replaying log /home/coder/workspace/rats-search/binlog.009

sphinx: binlog: index torrents: recovered from tid 637488 to tid 638055
binlog: index files: recovered from tid 7833927 to tid 7847635
binlog: replay stats: 13950 rows in 13951 commits; 324 updates, 0 reconfigure; 2 indexes
binlog: finished replaying /home/coder/workspace/rats-search/binlog.009; 4.0 MB in 0.218 sec
binlog: replaying log /home/coder/workspace/rats-search/binlog.010

sphinx: binlog: index torrents: recovered from tid 638055 to tid 638800
binlog: index files: recovered from tid 7847635 to tid 7858137
binlog: replay stats: 10834 rows in 10836 commits; 411 updates, 0 reconfigure; 2 indexes
binlog: finished replaying /home/coder/workspace/rats-search/binlog.010; 2.9 MB in 0.173 sec
binlog: replaying log /home/coder/workspace/rats-search/binlog.011

sphinx: binlog: index torrents: recovered from tid 638800 to tid 640263
binlog: index files: recovered from tid 7858137 to tid 7870394
binlog: replay stats: 12900 rows in 12901 commits; 819 updates, 0 reconfigure; 2 indexes
binlog: finished replaying /home/coder/workspace/rats-search/binlog.011; 3.6 MB in 0.228 sec

sphinx: binlog: finished replaying total 9 in 7.785 sec
accepting connections
prereading 5 indexes
prereaded 5 indexes in 0.000 sec

catched sphinx start
db version 5
db patch done
listen p2p on 4445 port
connect p2p store...
loaded 1 peers
p2p replication server enabled
replication client is enabled
close peer connection { address: '95.28.27.133', port: 4445 }
https://api.myjson.com/bins/1e5rmh error: getaddrinfo EAI_AGAIN api.myjson.com:443
https://jsonblob.com/api/jsonBlob/013a4415-3533-11e8-8290-a901f3cf34aa error: getaddrinfo EAI_AGAIN jsonblob.com:443
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo EAI_AGAIN
    at Object._errnoException (util.js:992:11)
    at errnoException (dns.js:55:15)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rats-search@0.24.0 server: `node src/background/server.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the rats-search@0.24.0 server script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/coder/.npm/_logs/2018-07-17T07_18_03_685Z-debug.log

@CoderFF
Copy link
Author

CoderFF commented Jul 17, 2018

И еще добавлю, серверная версия после падения, описанного выше, уже не стартует без шаманства:

Listening web server on 8095 port
Sphinx Path: /home/coder/workspace/rats-search/imports/linux/x64/searchd
writed sphinx config to /home/coder/workspace/rats-search
db path: /home/coder/workspace/rats-search
listening udp tracker respose on 0.0.0.0:4446
sphinx: [Tue Jul 17 10:30:34.977 2018] [4286] using config file '/home/coder/workspace/rats-search/sphinx.conf'...
[Tue Jul 17 10:30:34.978 2018] [4286] FATAL: failed to lock pid file '/home/coder/workspace/rats-search/searchd.pid': Resource temporarily unavailable (searchd already running?)
[Tue Jul 17 10:30:34.979 2018] [4286] shutdown complete
Manticore 2.6.1 a7fa71e@180126 release
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2018, Manticore Software LTD (http://manticoresearch.com)


sphinx closed with code 1 and signal null

И так и висит, ждёт Ctrl+C

Далее, если еще раз запустить

Listening web server on 8095 port
Sphinx Path: /home/coder/workspace/rats-search/imports/linux/x64/searchd
writed sphinx config to /home/coder/workspace/rats-search
db path: /home/coder/workspace/rats-search
listening udp tracker respose on 0.0.0.0:4446
sphinx: [Tue Jul 17 10:31:51.191 2018] [4721] using config file '/home/coder/workspace/rats-search/sphinx.conf'...
listening on all interfaces, port=9312
listening on all interfaces, port=9306
Manticore 2.6.1 a7fa71e@180126 release
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2018, Manticore Software LTD (http://manticoresearch.com)

precaching index 'torrents'
WARNING: index 'torrents': prealloc: failed to lock /home/coder/workspace/rats-search/database/torrents.lock: Resource temporarily unavailable; NOT SERVING
precaching index 'files'
WARNING: index 'files': prealloc: failed to lock /home/coder/workspace/rats-search/database/files.lock: Resource temporarily unavailable; NOT SERVING
precaching index 'version'
WARNING: index 'version': prealloc: failed to lock /home/coder/workspace/rats-search/database/version.lock: Resource temporarily unavailable; NOT SERVING
precaching index 'store'
WARNING: index 'store': prealloc: failed to lock /home/coder/workspace/rats-search/database/store.lock: Resource temporarily unavailable; NOT SERVING
precaching index 'feed'
WARNING: index 'feed': prealloc: failed to lock /home/coder/workspace/rats-search/database/feed.lock: Resource temporarily unavailable; NOT SERVING
FATAL: no valid indexes to serve
shutdown complete

sphinx closed with code 1 and signal null

Помогает killall searchd

@DEgITx
Copy link
Owner

DEgITx commented Jul 17, 2018

а какая верси nodejs в самой системе?

@CoderFF
Copy link
Author

CoderFF commented Jul 17, 2018

системная 4.5.0, но сервер я запускаю так

nvm exec lts/carbon npm run server
То есть, выбирается 8.11.3

@DEgITx
Copy link
Owner

DEgITx commented Jul 17, 2018

можешь попробовать серверную текущую версию из master?

@CoderFF
Copy link
Author

CoderFF commented Jul 17, 2018

Попробовал.
Ошибка пропала, не вылетает. Когда появляется интернет, начинает искать.
Собрал еще десктоп, там так же всё исправилось.
Блаодарю!
Думаю, можно закрывать.

@CoderFF CoderFF closed this as completed Jul 17, 2018
DEgITx pushed a commit that referenced this issue Jul 19, 2018
# [0.25.0](v0.24.0...v0.25.0) (2018-07-19)

### Bug Fixes

* **bootstrap:** parallel bootstrap saving ([908163e](908163e))
* **feed:** feed error ordering resolved ([a442964](a442964))
* **feed:** fix feed synchronization ([d602003](d602003))
* **network:** fix network availability detection [#45](#45) ([5be36fa](5be36fa))
* **scroll:** fix jolting on menu clicks ([d429b8a](d429b8a))
* **web:** set default nodejs version 8 for web version ([743b27b](743b27b))

### Features

* **filters:** add size filter ([1e941f5](1e941f5))
* **filters:** content type filters [#49](#49) ([785dc7c](785dc7c))
* **p2p:** information about feed ([37ff661](37ff661))
* **portative:** display message about update in portative version [#41](#41) ([a89c390](a89c390))
* **scroll:** smaller scrollbar for more comport view ([25a2aae](25a2aae))

### Performance Improvements

* **torrents:** optimization files saving ([a84f8c7](a84f8c7))
DEgITx pushed a commit that referenced this issue Jun 1, 2023
# [0.24.0](v0.23.0...v0.24.0) (2018-07-13)

### Bug Fixes

* **db:** fix startup on broken db after hardware shutdown [#43](#43) ([2c00d8c](2c00d8c))
* **ignore:** ignore more server files ([77035f1](77035f1))
* **menu:** new page struct update in menu list ([3fad6c2](3fad6c2))
* **patch:** fix memory issue ([a339d01](a339d01))
* **updater:** fix errors messages on updater if no internet connection [#45](#45) ([6ec6609](6ec6609))

### Features

* **bootstrap:** always load bootstrap peers when no peers situation (not only on startup) ([3a5c934](3a5c934))
* **p2p:** new optimized peer exchange algorithm ([65e61c5](65e61c5))
* **search:** part words search feature ([8836607](8836607))
DEgITx pushed a commit that referenced this issue Jun 1, 2023
# [0.25.0](v0.24.0...v0.25.0) (2018-07-19)

### Bug Fixes

* **bootstrap:** parallel bootstrap saving ([908163e](908163e))
* **feed:** feed error ordering resolved ([a442964](a442964))
* **feed:** fix feed synchronization ([d602003](d602003))
* **network:** fix network availability detection [#45](#45) ([5be36fa](5be36fa))
* **scroll:** fix jolting on menu clicks ([d429b8a](d429b8a))
* **web:** set default nodejs version 8 for web version ([743b27b](743b27b))

### Features

* **filters:** add size filter ([1e941f5](1e941f5))
* **filters:** content type filters [#49](#49) ([785dc7c](785dc7c))
* **p2p:** information about feed ([37ff661](37ff661))
* **portative:** display message about update in portative version [#41](#41) ([a89c390](a89c390))
* **scroll:** smaller scrollbar for more comport view ([25a2aae](25a2aae))

### Performance Improvements

* **torrents:** optimization files saving ([a84f8c7](a84f8c7))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linux issue applies to linux/unix systems
Projects
None yet
Development

No branches or pull requests

2 participants