ZeroNetX / ZeroNet

ZeroNetX - Decentralized websites using Bitcoin crypto and BitTorrent network
https://zeronet.dev
Other
224 stars 32 forks source link

ZeroNet 0.8.0 crashes, unable to publish content #185

Closed qomhmd closed 1 year ago

qomhmd commented 2 years ago

Step 1: Please describe your environment

Step 2: The Problem and Observed Results:

qomhmd commented 2 years ago

By deleting my two sites which

the problem seems to occur less frequently.

canewsin commented 2 years ago

There are two versions available for Windows(beta and stable) which one you are using ?

slrslr commented 2 years ago

@qomhmd it can be interesting if you can see any error kind of lines at the end of the zeronet .log file or at the time of the issue. On Linux, it is called debug.log. In ZeroNet.conf file i can add line: log_level = DEBUG to make the log more verbose.

Also make sure your computer has enough RAM at all times during zeronet runtime. Failure to publish content, i would make sure site has enough peers (it is visible at main page). I have seen publishing also fails when i am using ID provider/certificate that is forbidden in sites content.json.

qomhmd commented 2 years ago

There are two versions available for Windows(beta and stable) which one you are using ?

@canewsin Where can I find it? I think it is the stable one.

qomhmd commented 2 years ago

@qomhmd it can be interesting if you can see any error kind of lines at the end of the zeronet .log file or at the time of the issue. On Linux, it is called debug.log. In ZeroNet.conf file i can add line: log_level = DEBUG to make the log more verbose.

@slrslr, here it is: debug.log

slrslr commented 2 years ago

You can see version on: A) http://127.0.0.1:43110/Stats/ or B) http://127.0.0.1:43110/1HELLoE3sFD9569CLCbHEAVqvqV7U2Ri9d/?Home (click three dots next to logo in top-left corner)

Interesting lines from the log. A lot of lines for one site:

WARNING  Site:1XKCDh..xV12 Tracker udp://tracker.moeking.me:6969/announce announce failed: OSError: cannot watch more than 1024 sockets in <core>/src/Site/SiteAnnouncer.py line 201 > ... in mode start

DEBUG    BroadcastServer Broadcast using ips ['192.168.1.3'] on port 1544: discoverRequest
WARNING  BroadcastServer Error sending broadcast using ip 192.168.1.3: cannot watch more than 1024 sockets

This error for various IPs:

DEBUG    ConnServer Conn#51 87.10.240.52 [?] > Closing connection: 87.10.240.52 Connect error: OSError: cannot watch more than 1024 sockets in <core>/src/Connection/ConnectionServer.py line 222 > ..., waiting_requests: 0, sites: 0, buff: 0...

When you search this warning, you can find some zeronet suggestions on what to try. Try to apply it and see if these warnings will no longer appear.


Last page of your log contains some warnings and errors, like:

WARNING  - UiWSGIHandler error: TypeError: object of type 'generator' has no len() in <core>/src/Ui/UiServer.py line 39 > ...
ERROR    Ui.UiServer Error 500: UiWSGIHandler error: TypeError: object of type 'generator' has no len()
DEBUG    Ui.UiServer 127.0.0.1 - - [2022-09-28 20:49:13] "GET / HTTP/1.1" 500 503 0.021582
WARNING  Site:12h51u..WWtv Tracker udp://tracker.coppersurfer.tk:6969 announce failed: AnnounceError: Could not connect in <core>/src/Site/SiteAnnouncer.py line 201 > <core>/plugins/AnnounceBitTorrent/AnnounceBitTorrentPlugin.py line 61 in mode start
ERROR    - Unhandled exception: OSError: cannot watch more than 1024 sockets in <lib>/gevent/baseserver.py line 199 > ...

These i do not know @canewsin

canewsin commented 2 years ago

@slrslr Thanks for your help, you reduced most of my burden pointing main logs

@qomhmd This may also related to max_files_opened config, default is 2048, try adding max_files_opened = 1024 to your zeronet.conf

qomhmd commented 1 year ago

This may also related to max_files_opened config, default is 2048, try adding max_files_opened = 1024 to your zeronet.conf

Thanks. It seems to have been resolved. I also discarded some trackers that were old.