This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Problem with socket.http
#1
I have a script running to enter data in an influx database. This script suddenly stopped working. I copied part of the script for testing and I have the impression there is something wrong with the socket.http library.
I reduced the script to the following:
Code:
require 'ltn12'
require('socket.http')

socket.http.TIMEOUT = 15

This generates an error: attempt to index field 'http' (a nil value). This code is in the original script which has been running for years.

At the same time a third party software has started giving the error:

attempt to call field 'tcp' ( a nil value).

i have already rebooted the system.

What could be wrong here?

Thanks.
Reply
#2
Maybe the SD card is corrupted and some files are damaged.
Reply
#3
(24.04.2023, 09:40)admin Wrote: Maybe the SD card is corrupted and some files are damaged.

What is the correct procedure to restore? I suppose that cloning the SD card (which I have already done in the past to recover from a read only card) will not work.
Firmware is 20160714.
Additional problem is the third part software for which I do not have the software to reinstall...
Reply
#4
In case you have cloned image you can use it to prepare a new card. Then you can try copying all files from the third partition of the old card to the new. Or restore a backup if you have it.
Reply
#5
(24.04.2023, 15:25)admin Wrote: In case you have cloned image you can use it to prepare a new card. Then you can try copying all files from the third partition of the old card to the new. Or restore a backup if you have it.

Back in business.

One question however:
I first flashed a new SD card with the cloned image that I still had from the previous issue with the read-only card in 2021. After boot the system worked OK but of course with 2021 data.
I then restored a backup that I took this morning before replacing the SD card. Upon reboot I had the same error as previously. I then restored a backup from the day before the issue came up. This time the system worked correctly.

What is exactly restored when restoring a backup? If there was anything wrong with the libraries, I would have expected that that would have been fixed with the cloned card and that restoring the backup would have no effect on that?

As always, thanks for your excellent support.
Reply
#6
System libraries are not added to the backup. Maybe there is something in common functions or a user library that is set to load automatically that causes the issue.
Reply


Forum Jump: