UnamSanctam / UnamWebPanel

MIT License
164 stars 60 forks source link

database error #338

Open FrazeDev opened 4 months ago

FrazeDev commented 4 months ago

so its me again iam getting this error now image it has the write perms and everything

UnamSanctam commented 4 months ago

You would need to check the error log for that, you can also try the UnamWebPanel 1.8.0 BETA: UnamWebPanel 1.8.0 BETA2.zip which is technically finished, I'm just waiting to see if some testers find any bugs.

FrazeDev commented 4 months ago

just getting error cus it can't write in database even tho it has perms

ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66 ENDPOINT ERROR: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database, LINE: 66

UnamSanctam commented 4 months ago

Those might be old errors, but if they are new ones then the database isn't actually writable at the moment, recheck the permissions again.

FrazeDev commented 4 months ago

Those might be old errors, but if they are new ones then the database isn't actually writable at the moment, recheck the permissions again.

image its allowed

UnamSanctam commented 4 months ago

And what about the db folder and unamwebpanel.db file?

FrazeDev commented 4 months ago

And what about the db folder and unamwebpanel.db file?

yes

UnamSanctam commented 4 months ago

And if you remove the error log then the same error starts appearing?

FrazeDev commented 4 months ago

gotta wait sometime now

Demon4u commented 4 months ago

error 500. I don't like the web.config code

<httpProtocol>
      <customHeaders>
        <add name="X-Robots-Tag" value="noindex, nofollow" />
      </customHeaders>
    </httpProtocol>

if you delete this piece, the panel starts. and configuration changes are not saved.

UnamSanctam commented 4 months ago

Aha, you're using IIS, haven't tested it yet. That part is to tell search engines not to crawl and index the pages.

Demon4u commented 4 months ago

In IIS, the error sounds like: the "httpprotocol" configuration section cannot be read due to a missing section declaration

UnamSanctam commented 4 months ago

I think it should be in the system.webServer and not the system.web section, can you try with this?

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.web>
    <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
  </system.web>
  <system.webServer>
    <httpProtocol>
      <customHeaders>
        <add name="X-Robots-Tag" value="noindex, nofollow"/>
      </customHeaders>
    </httpProtocol>
  </system.webServer>
  <location path="db">
    <system.web>
      <authorization>
        <deny users="*"/>
      </authorization>
    </system.web>
  </location>
</configuration>
Demon4u commented 4 months ago

I think it should be in the system.webServer and not the system.web section, can you try with this?

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.web>
    <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
  </system.web>
  <system.webServer>
    <httpProtocol>
      <customHeaders>
        <add name="X-Robots-Tag" value="noindex, nofollow"/>
      </customHeaders>
    </httpProtocol>
  </system.webServer>
  <location path="db">
    <system.web>
      <authorization>
        <deny users="*"/>
      </authorization>
    </system.web>
  </location>
</configuration>

Yes, it worked.

UnamSanctam commented 4 months ago

Yes, it worked.

Great, thanks for reporting the problem.

UnamSanctam commented 4 months ago

when changing the configuration

Because that's incorrect JSON. Something like { "test": true } should work.

Demon4u commented 4 months ago

I wrote it wrong. she writes that it is saved, but when the page is refreshed, it is empty again

UnamSanctam commented 4 months ago

I wrote it wrong. she writes that it is saved, but when the page is refreshed, it is empty again

Hmm it's working for me, do you get any errors in your console? Could be some difference due to IIS.

Demon4u commented 4 months ago

Screenshot_1 Moreover, when adding a new configuration, it appears, but also without parameters

There are no errors in the console

UnamSanctam commented 4 months ago

Are there any error logs anywhere? Like inside UNAM_LIB\Logs? I will have to set up an IIS server later and test I guess.

Demon4u commented 4 months ago

Are there any error logs anywhere? Like inside UNAM_LIB\Logs? I will have to set up an IIS server later and test I guess.

No, there is no error in any log

UnamSanctam commented 4 months ago

No, there is no error in any log

Alright, then I guess I'll have to set up an IIS server later to test when I have the time.

Demon4u commented 4 months ago

No, there is no error in any log

Alright, then I guess I'll have to set up an IIS server later to test when I have the time.

I opened the database file and saw that all the configurations are there, and if the worker chooses a new configuration, then it works. Although the configuration options panel itself is empty

UnamSanctam commented 4 months ago

I opened the database file and saw that all the configurations are there, and if the worker chooses a new configuration, then it works. Although the configuration options panel itself is empty

Hmm, I just installed IIS and set up the web panel, the configuration page is working fine for me. Are you sure that you're using the UnamWebPanel 1.8.0 BETA2 that I sent previously in this issue?

Demon4u commented 4 months ago

Hmm, I just installed IIS and set up the web panel, the configuration page is working fine for me. Are you sure that you're using the UnamWebPanel 1.8.0 BETA2 that I sent previously in this issue?

Yes, that's what I installed

FrazeDev commented 4 months ago

I opened the database file and saw that all the configurations are there, and if the worker chooses a new configuration, then it works. Although the configuration options panel itself is empty

Hmm, I just installed IIS and set up the web panel, the configuration page is working fine for me. Are you sure that you're using the UnamWebPanel 1.8.0 BETA2 that I sent previously in this issue?

I use the one in release page

UnamSanctam commented 4 months ago

Yes, that's what I installed

Then that's strange, does the same happen with this one: UnamWebPanel 1.8.0 BETA3.zip?

I use the one in release page

Yes that's fine @Demon4u is testing the Beta of the next version.

FrazeDev commented 4 months ago

Yes, that's what I installed

Then that's strange, does the same happen with this one: UnamWebPanel 1.8.0 BETA3.zip?

I use the one in release page

Yes that's fine @Demon4u is testing the Beta of the next version.

Gonna try this one tomorrow

Demon4u commented 4 months ago

Yes, that's what I installed

Then that's strange, does the same happen with this one: UnamWebPanel 1.8.0 BETA3.zip?

I use the one in release page

Yes that's fine @Demon4u is testing the Beta of the next version.

Beta3 - everything is fine!

UnamSanctam commented 4 months ago

Beta3 - everything is fine!

Alright great! Thank you for the tests and reports! I'm probably planning on releasing it today.

Brovkines commented 4 months ago

Beta3 - everything is fine!

Alright great! Thank you for the tests and reports! I'm probably planning on releasing it today.

Hello. When will BETA3 be released and available?

Alcinzal commented 4 months ago

Hello. When will BETA3 be released and available?

v1.8.0 is already released. Check it out: https://github.com/UnamSanctam/UnamWebPanel/releases

Brovkines commented 4 months ago

Hello. When will BETA3 be released and available?

v1.8.0 is already released. Check it out: https://github.com/UnamSanctam/UnamWebPanel/releases

Is this the latest and most "secure" version?

Alcinzal commented 4 months ago

Is this the latest and most "secure" version?

Yes, v1.8.0 is the latest and most secure version. If you read through the changelog you can see some points about improving the security of the panel, like:

VK-VZ commented 4 months ago

Hello. How to transfer workers from the old panel? Just move the db folder? And if so, then in the new version you did not modify the .db file. Is it correct to replace the new .db with the old one?

Alcinzal commented 4 months ago

Hello. How to transfer workers from the old panel? Just move the db folder? And if so, then in the new version you did not modify the .db file. Is it correct to replace the new .db with the old one?

Unam did change the database file in the new update. He added the tables ipblocking and loginblock, maybe some more stuff aswell. Although you might not keep your statistics, the workers will automatically be added to the new database when they connect. However before you do anything, we should probably wait for an answer from Unam just to be safe.

VK-VZ commented 4 months ago

Beta3 - everything is fine!

Alright great! Thank you for the tests and reports! I'm probably planning on releasing it today.

unam please answer the question at the end. About transferring from the old panel

Demon4u commented 4 months ago

Beta3 - everything is fine!

Alright great! Thank you for the tests and reports! I'm probably planning on releasing it today.

unam please answer the question at the end. About transferring from the old panel

They will connect to the new panel themselves. You don't need to transfer anything

UnamSanctam commented 4 months ago

unam please answer the question at the end. About transferring from the old panel

Either replace the old db with the new db file, the miner will automatically get added the next time they connect. But if you need to keep your old configurations and statistics then it's possible for you to open the old db in any SQLite Database Browser and export all the data (only the data, not the structures), and then open the new db and import the data.