NidukaAkalanka / x-ui-english

English Version of X-UI, A Multi-protocol & Multi-user Xray Panel with a Web UI and a TG Bot
GNU General Public License v3.0
727 stars 239 forks source link

database is locked #92

Open royabaaff opened 1 year ago

royabaaff commented 1 year ago

Welcome

Description of the problem,screencshot would be good

hello sir , and thanks for your great work i faced an issue and searched anywhere but didn't get any solution and I'm newb and i think i done something wrong so, sorry evey time after adding my client i get this error database is locked as it says "invalid inbounds err " removed my inbounds, add new remark , new config and even i fressh start several times my ubunto 20.04 and again agter adding first client and testing connection error appears and in the end errors make service stops and not working

Version of x-ui

```console $ x-ui version x-ui-english 0.2.1.2 XRAY Configuration Template { "log": { "loglevel": "info", "access": "./access.log" }, "api": { "services": [ "HandlerService", "LoggerService", "StatsService" ], "tag": "api" }, "inbounds": [ { "listen": "127.0.0.1", "port": 62789, "protocol": "dokodemo-door", "settings": { "address": "127.0.0.1" }, "tag": "api" } ], "outbounds": [ { "protocol": "freedom", "settings": {} }, { "protocol": "blackhole", "settings": {}, "tag": "blocked" } ], "policy": { "levels": { "0": { "statsUserUplink": true, "statsUserDownlink": true } }, "system": { "statsInboundDownlink": true, "statsInboundUplink": true } }, "routing": { "rules": [ { "inboundTag": [ "api" ], "outboundTag": "api", "type": "field" }, { "ip": [ "geoip:private" ], "outboundTag": "blocked", "type": "field" }, { "outboundTag": "blocked", "protocol": [ "bittorrent" ], "type": "field" } ] }, "stats": {} } ### x-ui log or xray log
```console # paste log here ``` Jan 01 01:18:23 freedom x-ui[68204]: 2023/01/01 01:18:23 WARNING - disable invalid Client err: database is locked Jan 01 01:22:53 freedom x-ui[68204]: 2023/01/01 01:22:53 WARNING - disable invalid Client err: database is locked Jan 01 01:22:58 freedom x-ui[68204]: 2023/01/01 01:22:58 WARNING - disable invalid inbounds err: database is locked Jan 01 01:23:23 freedom x-ui[68204]: 2023/01/01 01:23:23 WARNING - disable invalid Client err: database is locked Jan 01 01:23:28 freedom x-ui[68204]: 2023/01/01 01:23:28 WARNING - disable invalid inbounds err: database is locked Jan 01 01:31:23 freedom x-ui[68204]: 2023/01/01 01:31:23 WARNING - disable invalid Client err: database is locked Jan 01 01:31:53 freedom x-ui[68204]: 2023/01/01 01:31:53 WARNING - disable invalid Client err: database is locked Jan 01 01:32:29 freedom x-ui[68204]: 2023/01/01 01:32:23 WARNING - disable invalid Client err: database is locked Jan 01 01:32:29 freedom x-ui[68204]: 2023/01/01 01:32:28 WARNING - disable invalid inbounds err: database is locked Jan 01 01:32:53 freedom x-ui[68204]: 2023/01/01 01:32:53 WARNING - disable invalid Client err: database is locked Jan 01 01:34:23 freedom x-ui[68204]: 2023/01/01 01:34:23 WARNING - disable invalid Client err: database is locked Jan 01 01:34:55 freedom x-ui[68204]: 2023/01/01 01:34:55 WARNING - disable invalid Client err: database is locked Jan 01 01:43:23 freedom x-ui[68204]: 2023/01/01 01:43:23 WARNING - disable invalid Client err: database is locked Jan 01 01:44:53 freedom x-ui[68204]: 2023/01/01 01:44:53 WARNING - disable invalid Client err: database is locked Jan 01 01:44:58 freedom x-ui[68204]: 2023/01/01 01:44:58 WARNING - disable invalid inbounds err: database is locked Jan 01 01:49:23 freedom x-ui[68204]: 2023/01/01 01:49:23 WARNING - disable invalid Client err: database is locked Jan 01 01:49:31 freedom x-ui[68204]: 2023/01/01 01:49:28 WARNING - disable invalid inbounds err: database is locked Jan 01 01:49:53 freedom x-ui[68204]: 2023/01/01 01:49:53 WARNING - disable invalid Client err: database is locked Jan 01 01:49:58 freedom x-ui[68204]: 2023/01/01 01:49:58 WARNING - disable invalid inbounds err: database is locked Jan 01 08:33:23 freedom x-ui[68204]: 2023/01/01 08:33:23 WARNING - disable invalid Client err: database is locked Jan 01 08:33:28 freedom x-ui[68204]: 2023/01/01 08:33:28 WARNING - disable invalid inbounds err: database is locked Jan 01 08:44:53 freedom x-ui[68204]: 2023/01/01 08:44:53 WARNING - disable invalid Client err: database is locked Jan 01 08:50:53 freedom x-ui[68204]: 2023/01/01 08:50:53 WARNING - disable invalid Client err: database is locked Jan 01 08:50:58 freedom x-ui[68204]: 2023/01/01 08:50:58 WARNING - disable invalid inbounds err: database is locked Jan 01 08:55:23 freedom x-ui[68204]: 2023/01/01 08:55:23 WARNING - disable invalid Client err: database is locked Jan 01 08:57:23 freedom x-ui[68204]: 2023/01/01 08:57:23 WARNING - disable invalid Client err: database is locked Jan 01 09:03:53 freedom x-ui[68204]: 2023/01/01 09:03:53 WARNING - disable invalid Client err: database is locked Jan 01 09:05:53 freedom x-ui[68204]: 2023/01/01 09:05:53 WARNING - disable invalid Client err: database is locked Jan 01 09:08:23 freedom x-ui[68204]: 2023/01/01 09:08:23 WARNING - disable invalid Client err: database is locked Jan 01 09:11:23 freedom x-ui[68204]: 2023/01/01 09:11:23 WARNING - disable invalid Client err: database is locked Jan 01 09:27:23 freedom x-ui[68204]: 2023/01/01 09:27:23 WARNING - disable invalid Client err: database is locked Jan 01 09:28:53 freedom x-ui[68204]: 2023/01/01 09:28:53 WARNING - disable invalid Client err: database is locked Jan 01 09:28:58 freedom x-ui[68204]: 2023/01/01 09:28:58 WARNING - disable invalid inbounds err: database is locked Jan 01 09:35:23 freedom x-ui[68204]: 2023/01/01 09:35:23 WARNING - disable invalid Client err: database is locked
NidukaAkalanka commented 1 year ago

Hi there @royabaaff !

Upon getting x ui menu by running sudo x-ui , you'll see an option to uninstall x ui. Proceed to that and after that, try installing again with the single command.

Don't know why you have titled this as database locked. If you have seen that somewhere, try running sudo chown root /etc/x-ui-english/x-ui-english.db from the root + root user.

Please comment down if the problem exists even after. Providing the x-ui logo would help a lot though. It can be extracted by running sudo systemctl status x-ui

royabaaff commented 1 year ago

thanks for quick response , i attached the logs but i will do it again done uninstalling with x-ui uninstall and install again , then x-ui restart and run sudo chown root /etc/x-ui-english/x-ui-english.db with root user and again x-ui restart and reboot the vps , but still same thing happens . as i said i test it several times with fresh ubunto 20.04 and add just one user for test but every time i get the same error

1 1

hatinati2 commented 1 year ago

plz update fork now xray 1.7.2.2 but is yours is 1.6.4

royabaaff commented 1 year ago

plz update fork now xray 1.7.2.2 but is yours is 1.6.4

thanks for response i will do that

aliafshany commented 1 year ago

@royabaaff did you get manage to solve this issue? i get this error too.

with fresh OS reinstallation i get again. still don't know the cause of that. (maybe having too many users on one port is the root of this issue.) hope the developer (@NidukaAkalanka ) would investigate this. it's become an emergency now for me and my users.

royabaaff commented 1 year ago

not even close to any answer , as i said even test it on a clean ubunto and just created 1 user but a second after start , those errors showed up

pouyasalimi commented 1 year ago

I have 2 VPSs, and both of them have the same and latest version of x-ui-english One of them has the same issue. I have just one user and connection on it.

`Aug 02 17:25:32 x-ui[436763]: 2023/08/02 17:25:32 WARNING - disable invalid Client err: database is locked

Aug 02 17:30:47 x-ui[436763]: 2023/08/02 17:30:47 WARNING - add traffic failed: database is locked; no valid transaction

Aug 02 17:45:47 x-ui[436763]: 2023/08/02 17:45:47 WARNING - add traffic failed: database is locked; no valid transaction

Aug 02 18:15:02 x-ui[436763]: 2023/08/02 18:15:02 WARNING - disable invalid Client err: database is locked

Aug 02 18:17:07 x-ui[436763]: 2023/08/02 18:17:07 WARNING - add traffic failed: database is locked; no valid transaction `