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

Image upload error + no keogram / timelapse / star trails produced today only #570

Closed
Jonk2 opened this issue Oct 5, 2021 · 68 comments
Closed
Assignees
Labels
bug needs software change Need user response

Comments

@Jonk2
Copy link

Jonk2 commented Oct 5, 2021

I've tried to keep up with the many new releases / files and this could be a case of delete it all and start again!

To avoid confusion, I have 2 x RPI4bs and 2 x ASi178MCs (outdoors is standard, indoors test one is the cooled version).

Outside known as Allsky PI, inside test one Allsky PI 2.

My log file on the inside test Allsky PI 2 says it's v0.8.1 and for the past couple of days, the image upload (i.e. 'live-view' image) to my NAS fails.

Here's the log from the latest attempt (personal details obscured with ******):

Oct 5 20:54:56 allsky allsky.sh[3453]: STARTING EXPOSURE at: 2021-10-05 20:54:56
Oct 5 20:54:56 allsky allsky.sh[3453]: > Extra Text File Age Disabled So Displaying Anyway
Oct 5 20:54:56 allsky allsky.sh[3453]: > Saving image 'image.jpg' that started at 2021-10-05 20:54:56 (0 us)
Oct 5 20:54:56 allsky allsky.sh[3453]: > Sleeping: 29988 ms
Oct 5 20:54:58 allsky allsky.sh[3453]: *** upload.sh: ERROR:
Oct 5 20:54:58 allsky allsky.sh[3453]: FILE_TO_UPLOAD='image.jpg'
Oct 5 20:54:58 allsky allsky.sh[3453]: REMOTE_DIR='/Allsky/Allsky PI 2/images'
Oct 5 20:54:58 allsky allsky.sh[3453]: TEMP_NAME='SI-26766'
Oct 5 20:54:58 allsky allsky.sh[3453]: DESTINATION_FILE='image.jpg'
Oct 5 20:54:58 allsky allsky.sh[3453]: put: image.jpg: Access failed: 550 SI-26766: Forbidden filename
Oct 5 20:54:58 allsky allsky.sh[3453]: mv: Access failed: 550 SI-26766: No such file or directory
Oct 5 20:54:58 allsky allsky.sh[3453]: Commands used (run via: lftp -f /home/pi/allsky/tmp/lftp_cmds.txt):
Oct 5 20:54:58 allsky allsky.sh[3453]: open --user "" --password "" ftp://***********
Oct 5 20:54:58 allsky allsky.sh[3453]: set net:max-retries 2
Oct 5 20:54:58 allsky allsky.sh[3453]: set net:timeout 20
Oct 5 20:54:58 allsky allsky.sh[3453]: rm -f SI-26766
Oct 5 20:54:58 allsky allsky.sh[3453]: put "image.jpg" -o SI-26766
Oct 5 20:54:58 allsky allsky.sh[3453]: rm -f "image.jpg"
Oct 5 20:54:58 allsky allsky.sh[3453]: mv SI-26766 "/Allsky/Allsky PI 2/images/image.jpg"
Oct 5 20:54:58 allsky allsky.sh[3453]: bye

This is on my test PI indoors. There doesn't appear to be any 'saveImageNight.sh' entries. The FTP settings are correct and match the PI outdoors which is also running v0.8.1 (from the log), albeit a different folder (Allsky, not Allsky 2).

The PI outdoors seems to be working fine, and I've had no issue with timelapse, startrails and keogram generation on the PI outdoors, albeit cloudy and wet ones!

Oct 5 21:02:53 allsky allsky.sh[828]: STARTING EXPOSURE at: 2021-10-05 21:02:53
Oct 5 21:02:54 allsky allsky.sh[828]: saveImageNight.sh: Uploading 'image.jpg' with timestamp: 21:02:53
Oct 5 21:03:23 allsky allsky.sh[828]: > Saving image 'image.jpg' that started at 2021-10-05 21:02:53 (0 us)
Oct 5 21:03:23 allsky allsky.sh[828]: > Sleeping from auto exposure: 0 ms (0 sec)
Oct 5 21:03:23 allsky allsky.sh[828]: STARTING EXPOSURE at: 2021-10-05 21:03:23
Oct 5 21:03:24 allsky allsky.sh[828]: saveImageNight.sh: Uploading 'image.jpg' with timestamp: 21:03:24
Oct 5 21:03:54 allsky allsky.sh[828]: > Saving image 'image.jpg' that started at 2021-10-05 21:03:23 (0 us)
Oct 5 21:03:54 allsky allsky.sh[828]: > Sleeping from auto exposure: 0 ms (0 sec)
Oct 5 21:03:54 allsky allsky.sh[828]: STARTING EXPOSURE at: 2021-10-05 21:03:54
Oct 5 21:03:55 allsky allsky.sh[828]: saveImageNight.sh: Uploading 'image.jpg' with timestamp: 21:03:54
Oct 5 21:04:24 allsky allsky.sh[828]: > Saving image 'image.jpg' that started at 2021-10-05 21:03:54 (0 us)
Oct 5 21:04:24 allsky allsky.sh[828]: > Sleeping from auto exposure: 0 ms (0 sec)
Oct 5 21:04:24 allsky allsky.sh[828]: STARTING EXPOSURE at: 2021-10-05 21:04:24
Oct 5 21:04:25 allsky allsky.sh[828]: saveImageNight.sh: Uploading 'image.jpg' with timestamp: 21:04:24

All of the files are saving fin on the PI in home/pi//allsky/inages, and thre are keograms etc since the last update (3rd of October) but this morning's (5th of October) failed with the following in the log:

Keogram

Oct 5 07:15:37 allsky allsky.sh[3564]: endOfNight.sh: ===== Generating Keogram
Oct 5 07:15:42 allsky allsky.sh[3564]: > Extra Text File Age Disabled So Displaying Anyway
Oct 5 07:15:42 allsky allsky.sh[3564]: > Saving image 'image.jpg' that started at 2021-10-05 07:15:36 (0 us)
Oct 5 07:15:42 allsky allsky.sh[3564]: > Sleeping from histogram exposure: 30000 ms
Oct 5 07:15:43 allsky allsky.sh[3564]: *** upload.sh: ERROR:
Oct 5 07:15:43 allsky allsky.sh[3564]: FILE_TO_UPLOAD='image.jpg'
Oct 5 07:15:43 allsky allsky.sh[3564]: REMOTE_DIR='/Allsky/Allsky PI 2/images'
Oct 5 07:15:43 allsky allsky.sh[3564]: TEMP_NAME='SI-16085'
Oct 5 07:15:43 allsky allsky.sh[3564]: DESTINATION_FILE='image.jpg'
Oct 5 07:15:43 allsky allsky.sh[3564]: put: image.jpg: Access failed: 550 SI-16085: Forbidden filename
Oct 5 07:15:43 allsky allsky.sh[3564]: mv: Access failed: 550 SI-16085: No such file or directory
Oct 5 07:15:43 allsky allsky.sh[3564]: Commands used (run via: lftp -f /home/pi/allsky/tmp/lftp_cmds.txt):
Oct 5 07:15:43 allsky allsky.sh[3564]: open --user "" --password "" ftp://******
Oct 5 07:15:43 allsky allsky.sh[3564]: set net:max-retries 2
Oct 5 07:15:43 allsky allsky.sh[3564]: set net:timeout 20
Oct 5 07:15:43 allsky allsky.sh[3564]: rm -f SI-16085
Oct 5 07:15:43 allsky allsky.sh[3564]: put "image.jpg" -o SI-16085
Oct 5 07:15:43 allsky allsky.sh[3564]: rm -f "image.jpg"
Oct 5 07:15:43 allsky allsky.sh[3564]: mv SI-16085 "/Allsky/Allsky PI 2/images/image.jpg"
Oct 5 07:15:43 allsky allsky.sh[3564]: bye
Oct 5 07:16:04 allsky allsky.sh[3564]: terminate called after throwing an instance of 'std::out_of_range'
Oct 5 07:16:04 allsky allsky.sh[3564]: what(): basic_string::substr: __pos (which is 140) > this->size() (which is 0)
Oct 5 07:16:04 allsky allsky.sh[3564]: scripts/endOfNight.sh: line 72: 9272 Aborted "${ALLSKY_HOME}/keogram" -d "${DATE_DIR}/" -e ${EXTENSION} -o "${UPLOAD_FILE}" ${KEOGRAM_PARAMETERS}`

Startrails

Oct 5 07:16:04 allsky allsky.sh[3564]: endOfNight.sh: ===== Generating Startrails
Oct 5 07:16:05 allsky allsky.sh[3564]: Usage: startrails [-v] -d

-e [-b -o | -s]
Oct 5 07:16:05 allsky allsky.sh[3564]: #33[31mSource directory and file extension are always required.
Oct 5 07:16:05 allsky allsky.sh[3564]: brightness threshold and output file are required to render startrails#033[0m
Oct 5 07:16:05 allsky allsky.sh[3564]: Arguments:
Oct 5 07:16:05 allsky allsky.sh[3564]: -h : display this help, then exit
Oct 5 07:16:05 allsky allsky.sh[3564]: -v : increase log verbosity
Oct 5 07:16:05 allsky allsky.sh[3564]: -s : print image directory statistics without producing image.
Oct 5 07:16:05 allsky allsky.sh[3564]: -d : directory from which to read images
Oct 5 07:16:05 allsky allsky.sh[3564]: -e : filter images to just this extension
Oct 5 07:16:05 allsky allsky.sh[3564]: -o : output image filename
Oct 5 07:16:05 allsky allsky.sh[3564]: -S x : restrict processed images to this size
Oct 5 07:16:05 allsky allsky.sh[3564]: -b : ranges from 0 (black) to 1 (white). Default 0.35
Oct 5 07:16:05 allsky allsky.sh[3564]: #011A moonless sky may be as low as 0.05 while full moon can be as high as 0.4
Oct 5 07:16:05 allsky allsky.sh[3564]: ex: startrails -b 0.07 -d ../images/20180208/ -e jpg -o startrails.jpg

Timelapse

  • Oct 5 07:16:05 allsky allsky.sh[3564]: endOfNight.sh: ===== Generating Timelapse
  • Oct 5 07:16:10 allsky allsky.sh[3564]: timelapse.sh: Processing 1387 images...
  • Oct 5 07:16:11 allsky allsky.sh[3564]: [swscaler @ 0x791c50] deprecated pixel format used, make sure you did set range correctly
  • |
  • |
  • |
  • Oct 5 07:30:13 allsky allsky.sh[3564]: timelapse.sh: Timelapse was created
  • Oct 5 07:30:14 allsky allsky.sh[3564]: *** upload.sh: ERROR:
  • Oct 5 07:30:14 allsky allsky.sh[3564]: FILE_TO_UPLOAD='/home/pi/allsky/images/20211004/allsky-20211004.mp4'
  • Oct 5 07:30:14 allsky allsky.sh[3564]: REMOTE_DIR=''
  • Oct 5 07:30:14 allsky allsky.sh[3564]: TEMP_NAME='TL-26567'
  • Oct 5 07:30:14 allsky allsky.sh[3564]: DESTINATION_FILE='allsky-20211004.mp4'
  • Oct 5 07:30:14 allsky allsky.sh[3564]: put: /home/pi/allsky/images/20211004/allsky-20211004.mp4: Access failed: 550 TL-26567: Forbidden filename
  • Oct 5 07:30:14 allsky allsky.sh[3564]: mv: Access failed: 550 TL-26567: No such file or directory
  • Oct 5 07:30:14 allsky allsky.sh[3564]: Commands used (run via: lftp -f /home/pi/allsky/tmp/lftp_cmds.txt):
  • Oct 5 07:30:14 allsky allsky.sh[3564]: open --user "" --password "" ftp://******
  • Oct 5 07:30:14 allsky allsky.sh[3564]: set net:max-retries 2
  • Oct 5 07:30:14 allsky allsky.sh[3564]: set net:timeout 20
  • Oct 5 07:30:14 allsky allsky.sh[3564]: rm -f TL-26567
  • Oct 5 07:30:14 allsky allsky.sh[3564]: put "/home/pi/allsky/images/20211004/allsky-20211004.mp4" -o TL-26567
  • Oct 5 07:30:14 allsky allsky.sh[3564]: rm -f "allsky-20211004.mp4"
  • Oct 5 07:30:14 allsky allsky.sh[3564]: mv TL-26567 "allsky-20211004.mp4"
  • Oct 5 07:30:14 allsky allsky.sh[3564]: bye

With my limited understanding of this, the common denominator appears to be the NAS. I don't think it's a NAS access issue, but I suppose I should check that too. Nothing else has an issue accessing the location. It'd the 'Access failed: 550 TL-26567: Forbidden filename' that says it's not an access issue, but then also says 'mv: Access failed: 550 TL-26567: No such file or directory' which would suggest it can't see the location or has been refused.

If this is totally weird and I need to delete allsky and start again with a fresh clone, that's fine, but it might be more sinister. As I said, it could be a case of a botched installation i.e. mix / match of versions, but as both versions are shown as 0.8.1 in the logs, I have to assume they're the same and I haven't done something silly.

@ckuethe
Copy link
Collaborator

ckuethe commented Oct 5, 2021

I'm thinking that you have a mismatched of versions scripts given that the startrails tool isn't being called properly. I don't think you'll need to delete everything; you should be able to pull the latest changes with git.

Also, there may be a path name escaping/quoting issue since you're trying to upload to /Allsky/Allsky PI 2/images. Did it work before? Not sure what's up with your NAS. Maybe ftp into it and see if the paths and stuff are there?

Some totally gratuitous advice: FTP is a stupid protocol and should be wiped off the face of the earth. You should switch to SMB/CIFS or NFS. My skycam just mounts a CIFS share from my NAS and it works very well. But that's just my opinion. Perhaps @EricClaeys has some better advice for troubleshooting the FTP issues.

@Jonk2
Copy link
Author

Jonk2 commented Oct 5, 2021

Ok, is it a simple thing to do, as the instructions say to delete the allsky folder and clone a new one? What I do is rename the allsky folder, clone a new one and installed as fresh, manually putting my settings back in. Maybe that's not a good thing to do.

The NAS is accessible for both Allsky PI and Allsky PI 2 from my PCs, phones etc no issue. I do have mfa set up on all my NASes but that doesn't affect file access, only web admin stuff. There's nothing in the NAS access logs showing a connection refusal.

It was since I did this on the 3rd of October (rename and clone / install the new version), the latest image hasn't updated on the NAS since, none of the timelapses etc have been uploaded either but they have been created and are stored on the PI. Only this morning did they fail.

I'm thinking that I should clean up everything allsky related and start again, this is why I have a test PI! Unless there's an easy way to overwrite the files from the latest on Github, which I'm not sure how to do?

@Jonk2
Copy link
Author

Jonk2 commented Oct 5, 2021

You may be right...?

image

@Jonk2
Copy link
Author

Jonk2 commented Oct 5, 2021

Ok I'm learning...

I did a 'git pull' and it's showing me this:

image

Obviously something's changed but I'm not sure how to interpret these results.

I'll do some more reading / testing, but please feel free to close this 'issue' if noone else needs to contribute.

I'll probably end up deleting and starting afresh, to avoid wasting anyone's time. Unless I break something!

@ckuethe
Copy link
Collaborator

ckuethe commented Oct 5, 2021

You may be right...?

image

Clearly you've changed something, as we all have.

  • sunwait-src changes because sunwait was compiled there
  • image.jpg changes because that's the captured image (we should probably gitignore that)
  • and you're probably testing things in allsky.sh

@ckuethe
Copy link
Collaborator

ckuethe commented Oct 5, 2021

Ok I'm learning...

I did a 'git pull' and it's showing me this:

image

Obviously something's changed but I'm not sure how to interpret these results.

I'll do some more reading / testing, but please feel free to close this 'issue' if noone else needs to contribute.

I'll probably end up deleting and starting afresh, to avoid wasting anyone's time. Unless I break something!

Yep lots of changes there. You can do git log to see what commits you just pulled, if you're curious.

You'll want to rebuild the the binaries - cd src && make - but I don't think you'll need to completely rip everything out

@linuxkidd
Copy link
Collaborator

linuxkidd commented Oct 6, 2021

Actually, now that you're fully up to date with the latest code... you can run the following from the allsky folder:

make clean all
sudo make install

You'll need to transfer your settings from config.sh and ftp-settings.sh info the same named files inside allsky/config once that is done. After those are populated, you can backup / remove the same named files from the allsky directory.

@linuxkidd
Copy link
Collaborator

Oh, and then restart allsky:

sudo systemctl restart allsky

@EricClaeys
Copy link
Collaborator

@Jonk2 Please make sure your scripts/upload.sh is the latest - it was updated late yesterday. It has quotes around the temporary name like "TL-26567". If that doesn't fix the "Forbidden filename" error, I suspect your FTP server doesn't allow minus signs in filenames. Try to manually FTP a file with a minus sign in the name. If that also fails, try with and underscore ("_"). If that works, I'll change upload.sh to use an underscore.

The "Access denied" error is because lftp can't upload the file due to "Forbidden filename", but then tries to rename the non-existent file, which of course fails. I haven't yet figured out how to get lftp to exit after the first error.

@EricClaeys
Copy link
Collaborator

@Jonk2 Can you do me a favor? I don't have access to my Pi but want to test something.

In scripts/upload.sh, after the echo set net:timeout 20 line, add this:
echo "echo ls xxxx || echo xxxx does not exist" on one line and
echo "echo test 3 && echo test 4" on another.
Then once the next image is uploaded, look in ~/allsky/tmp/upload_log.txt. If it has "xxxx" in it, copy the file to your reply.

You can then remove those two lines.

I appreciate it. This will help me determine how to exit after the first error.

@Jonk2
Copy link
Author

Jonk2 commented Oct 6, 2021

@linuxkidd Thanks for the advice, but I've really broken something as nothing appeared to change the default image / overlay settings no matter what I changed / saved / checked, so I've given up and deleted / reinstalled from fresh!

This has not worked - I notice in the installation of the GUI, it cannot find certain things:

pi@allsky:~/allsky $ sudo gui/install.sh
sudo: unable to resolve host allsky: Name or service not known
gui/install.sh: line 3: ../config/variables.sh: No such file or directory


*** Welcome to the Allsky Administration Portal installation ***


  • Installation of the webserver

Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://giteduberger.fr rpimonitor/ InRelease
Hit:3 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
avahi-daemon is already the newest version (0.7-4+deb10u1).
hostapd is already the newest version (2:2.7+git20190128+0c1e29f-6+deb10u3).
lighttpd is already the newest version (1.4.53-4+deb10u1).
php-cgi is already the newest version (2:7.3+69).
php-gd is already the newest version (2:7.3+69).
dnsmasq is already the newest version (2.80-1+rpt1+deb10u1).
The following packages were automatically installed and are no longer required:
gir1.2-gmenu-3.0 gnome-menus libgdata-common libgdata22 libgnome-menu-3-0 libgoa-1.0-0b libgoa-1.0-common libimobiledevice6 libjansson4
libldb1 liboauth0 libplist3 librtimulib-dev librtimulib-utils librtimulib7 libtevent0 libusbmuxd4 python3-rtimulib python3-sense-hat
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
already enabled
Run "service lighttpd force-reload" to enable changes

  • Configuring lighttpd

  • Changing hostname to allsky

  • Setting avahi-daemon configuration

  • Adding the right permissions to the web server

  • Retrieving github files to build admin portal
    Cloning into '/var/www/html'...
    remote: Enumerating objects: 2052, done.
    remote: Counting objects: 100% (260/260), done.
    remote: Compressing objects: 100% (176/176), done.
    remote: Total 2052 (delta 145), reused 164 (delta 83), pack-reused 1792
    Receiving objects: 100% (2052/2052), 3.30 MiB | 2.92 MiB/s, done.
    Resolving deltas: 100% (773/773), done.
    install: cannot stat '/settings_ZWO.json': No such file or directory
    install: cannot stat '/settings_RPiHQ.json': No such file or directory

  • Modify config.sh
    sed: can't read /config.sh: No such file or directory

The Allsky Portal is now installed
You can now reboot the Raspberry Pi and connect to it from your laptop, computer, phone, tablet at this address: http://allsky.local or http://******

Do you want to reboot now? [y/n]

Here's a screenshot of what's been put in the freshly cloned allsky folder:

image

After rebooting and logging into the gui, all of the camera settings and scripts have gone back to default, but I have no image from the camera (as per attached screenshot) - it's showing a broken image link type icon and notice the "Daytime images updated every 0 seconds, nighttime every 0 seconds", even though the settings say otherwise.

Is simply deleting the allsky folder and recloning / install.sh / gui install.sh not working as expected?

image

@EricClaeys moving files between the PIs, PCs, and NASes using Filezilla via sftp works fine, with minus signs in both directions.

Sorry I can't try your suggestion at the moment due to the issue above.

@Jonk2
Copy link
Author

Jonk2 commented Oct 6, 2021

Hmmm...update - opening the camera settings in the gui and simply pressing 'save changes' now shows an image - perhaps that's a bug that needs looking at?

@Jonk2
Copy link
Author

Jonk2 commented Oct 6, 2021

Also, sorry but installing the latest (as of 30 minutes ago) my log shows this:

Oct 6 20:27:54 allsky allsky.sh[5860]: #33[32m ******************************************
Oct 6 20:27:54 allsky allsky.sh[5860]: #33[32m *** Allsky Camera Software v0.8.1 | 2021 ***
Oct 6 20:27:54 allsky allsky.sh[5860]: #33[32m ******************************************

Is this correct? How can there be so many changes over the past few days but the version has remained the same? Can you add a build number or something because to idiots like me, I don't know whether I'm up to date or what version I have, and this makes it very difficult to sort out issues before asking for help.

@Jonk2
Copy link
Author

Jonk2 commented Oct 6, 2021

I've just manually put all of my settings back in, saved the changes and although the image is displayed correctly now, the overlay is still at default settings.

image

I don't know what else I can do with this, as this should have been a fresh installation?

Something tells me deleting the allsky folder alone and cloning a fresh copy to install doesn't work?

@EricClaeys
Copy link
Collaborator

@Jonk2 thanks for reporting the bug.
I submitted a fix but it may be a while before it's merged. In the meantime, to get the installation working, change this line at the top of gui/install.sh:
source ../config/variables.sh
to

if [ -z "${ALLSKY_HOME}" ] ; then
	export ALLSKY_HOME=$(realpath $(dirname "${BASH_ARGV0}")/..)
fi
source ${ALLSKY_HOME}/variables.sh

Sorry for the hassle.

@Jonk2
Copy link
Author

Jonk2 commented Oct 6, 2021

No need to apologise, it must be frustrating trying to solve everyone's issues, we'll all have different problems and I suspect not many of us are programmers!

I'll do as you suggest and report back. Thanks.

@Jonk2
Copy link
Author

Jonk2 commented Oct 6, 2021

Ok here's the terminal result... does it look correct?

pi@allsky:~ $ cd allsky/gui
pi@allsky:~/allsky/gui $ sudo ./install.sh
sudo: unable to resolve host allsky: Name or service not known


*** Welcome to the Allsky Administration Portal installation ***


  • Installation of the webserver

Hit:1 http://giteduberger.fr rpimonitor/ InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:3 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
avahi-daemon is already the newest version (0.7-4+deb10u1).
hostapd is already the newest version (2:2.7+git20190128+0c1e29f-6+deb10u3).
lighttpd is already the newest version (1.4.53-4+deb10u1).
php-cgi is already the newest version (2:7.3+69).
php-gd is already the newest version (2:7.3+69).
dnsmasq is already the newest version (2.80-1+rpt1+deb10u1).
The following packages were automatically installed and are no longer required:
gir1.2-gmenu-3.0 gnome-menus libgdata-common libgdata22 libgnome-menu-3-0
libgoa-1.0-0b libgoa-1.0-common libimobiledevice6 libjansson4 libldb1
liboauth0 libplist3 librtimulib-dev librtimulib-utils librtimulib7 libtevent0
libusbmuxd4 python3-rtimulib python3-sense-hat
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
already enabled
Run "service lighttpd force-reload" to enable changes

  • Configuring lighttpd

  • Changing hostname to allsky

  • Setting avahi-daemon configuration

  • Adding the right permissions to the web server

  • Retrieving github files to build admin portal
    Cloning into '/var/www/html'...
    remote: Enumerating objects: 2052, done.
    remote: Counting objects: 100% (260/260), done.
    remote: Compressing objects: 100% (176/176), done.
    remote: Total 2052 (delta 145), reused 164 (delta 83), pack-reused 1792
    Receiving objects: 100% (2052/2052), 3.30 MiB | 9.92 MiB/s, done.
    Resolving deltas: 100% (773/773), done.

  • Modify config.sh

The Allsky Portal is now installed
You can now reboot the Raspberry Pi and connect to it from your laptop, computer, phone, tablet at this address: http://allsky.local or http://******

Do you want to reboot now? [y/n]

@Jonk2
Copy link
Author

Jonk2 commented Oct 6, 2021

Ok, done and now the settings appear to be having an effect. Thanks for that.

However, have you changed or stopped the 'Allsky software is starting' message(s)? It no longer appears before the first image.

@EricClaeys
Copy link
Collaborator

@Jonk2, have you rebooted the Pi? After the installation you need to in order for the new host name ("allsky") to take effect. That might be what's giving the error below.
Is the "Allsky software is starting" message no appearing in the GUI, or on the website on a remote server? Either way, is there anything in /var/log/allsky.log right after your start AllSky?

@linuxkidd Michael, any ideas on this error at the beginning of gui/install.sh?

pi@allsky:~/allsky/gui $ sudo ./install.sh
sudo: unable to resolve host allsky: Name or service not known

*** Welcome to the Allsky Administration Portal installation ***

@EricClaeys
Copy link
Collaborator

@Jonk2 the messages look good. Could you do me a favor and try the attached installation script? It solves the problem you had AND saves the allsky-website files if they were there.

If you do NOT have the website installed in /var/www/html/allsky, please create /var/www/html/allsky (may need sudo) then put a couple files in that directory - they can be junk files.

Move allsky/gui/install.sh to allsky/gui/install-ORIGINAL.sh
Then copy the attached file to allsky/gui and re-run the installation of the GUI.

If it works you should see the message above PLUS a message about "Saving the prior website" and then "Restoring the prior website".
Thanks

install.zip

@Jonk2
Copy link
Author

Jonk2 commented Oct 7, 2021

@EricClaeys yes I reboot when anything major has been changed.

I don't have a /var/www/html/allsky folder, but created that with a couple of files.

I've tried your attached install.sh and here's the response in the terminal.

image

You can see filezilla in the background showing the original and new install.sh. I wonder if the /var/www/html/allsky doesn't have the right access permissions actually (created in Filezilla)? Let me check that.

@Jonk2
Copy link
Author

Jonk2 commented Oct 7, 2021

Nope, changing the /var/www/html/allsky folder structure to 777 didn't make a difference.

@Jonk2
Copy link
Author

Jonk2 commented Oct 7, 2021

@linuxkidd Michael, any ideas on this error at the beginning of gui/install.sh?

I do have 2 PIs don't forget so if I remember correctly, the install script changes the PI's name to allsky doesn't it? Does having 2 PIs with the same name cause an issue? I would imagine yes. Maybe a prompt to the user to give it a custom name when installed is needed.

@linuxkidd
Copy link
Collaborator

Sorry, I"m late to this party...

sudo: unable to resolve host allsky: Name or service not known

^ this error is likely caused by changing the Pi's hostname ( in /etc/hostname ), but not adding an entry in /etc/hosts -- typically, you'd replace the 'raspberrypi' name in the hosts file with the new hostname. Or, you can just add a new line like:

127.0.1.1  newhostname

Having two PI's with the same hostname on the same network can result in unpredictable things from your other computers perspective. I'd suggest re-running the gui/install.sh ... specifying a different hostname for one of the PI's.

Example:

gui/install.sh allsky2

There's a mechanism built into that gui/install.sh script to handle this.

@EricClaeys
Copy link
Collaborator

@Jonk2 Sorry about the error when running gui/install.sh. I edited the file on my PC and it saves in PC format rather than UNIX format.
We posted the file at https://github.com/thomasjacquin/allsky/tree/master/gui so you can grab it from there.
Please run it with your fake files in /var/www/html/allsky. Thanks much!

@Jonk2
Copy link
Author

Jonk2 commented Oct 8, 2021

@linuxkidd I thought so, but didn't realise you could set a custom name like that - could you add it to the install script as a prompt to the user? That would be easy for us - right at the end before reboot say "now rename your PI to or continue with the default (allsky)"....is that easy to do? I don't use my PIs just for allsky, so this makes sense to me.

@EricClaeys The install.sh you provided on that link did not work either directly, so I copied the text into a new notepad++ file (on windows and my notepad++ is set to unix for new files) and saved - it overwrote and has a slightly different filesize.
Anyway, I've run it and here's the result....rebooting now.

image

@ckuethe
Copy link
Collaborator

ckuethe commented Oct 16, 2021

In general, when reporting issues can you please tell us which git revision you're working with (git log --oneline | head -1)? We're in different timezones so it's not helpful to say "whichever version was latest as of 15-10-21 (last night for me)". Git log tells us unambiguously exactly which commits you've got.

Try run it by hand... something like this:

# fetch the latest source
git pull

 # look at the git history; make sure you have a recent fix "db38226 add mutex header"
git log --oneline | head

# recompile the binaries
make

# test
src/keogram -vv -d images/20211015 -e jpg -o /tmp/k.jpg --num-threads 1 --nice-level 0 2>&1 | tee /tmp/kl.txt

That will run the freshly compiled keogram with a single thread and verbose output, copying the output to /tmp/kl.txt That should at least tell you what was going on when keogram crashes. If it doesn't crash, them maybe we already fixed the bug.

If it does crash... congratulations, you get to learn how to use gdb (eg. https://www.cs.cmu.edu/~gilpin/tutorial/)

$ sudo apt install gdb
$ gdb src/keogram
(gdb) r -vv -d images/20211015 -e jpg -o /tmp/k.jpg --num-threads 1 --nice-level 0
(gdb) bt full

Then post the contents of the backtrace.

@ckuethe
Copy link
Collaborator

ckuethe commented Oct 16, 2021

You'll definitely want to grab the latest commits from git. I added some additional tracing to endofnight so that the exact failed command is logged rather than Aborted "${ALLSKY_HOME}/keogram" ${SIZE_FILTER} -d "${DATE_DIR}/" -e ${EXTENSION} -o "${UPLOAD_FILE}" ${KEOGRAM_EXTRA_PARAMETERS} which doesn't tell me if any parameters might be causing problems

@maphilli14
Copy link

My errors are as follows was there any expectation that the latest git contains more debug to the root of the errors?


pi@allsky:~ $ cat /var/log/allsky.log | grep endOfNight
Oct 17 06:53:08 allsky allsky.sh[1299]: endOfNight.sh: ===== Generating Keogram
Oct 17 06:53:47 allsky allsky.sh[1299]: scripts/endOfNight.sh: line 79: 12686 Aborted                 "${ALLSKY_HOME}/keogram" ${SIZE_FILTER} -d "${DATE_DIR}/" -e ${EXTENSION} -o "${UPLOAD_FILE}" ${KEOGRAM_EXTRA_PARAMETERS}
Oct 17 06:53:47 allsky allsky.sh[1299]: endOfNight.sh: ===== Generating Startrails
Oct 17 06:54:12 allsky allsky.sh[1299]: scripts/endOfNight.sh: line 105: 12774 Aborted                 "${ALLSKY_HOME}/startrails" ${SIZE_FILTER} -d "${DATE_DIR}" -e ${EXTENSION} -b ${BRIGHTNESS_THRESHOLD} -o "${UPLOAD_FILE}"
Oct 17 06:54:12 allsky allsky.sh[1299]: endOfNight.sh: ===== Generating Timelapse
Oct 18 06:53:58 allsky allsky.sh[1567]: endOfNight.sh: ===== Generating Keogram
Oct 18 06:55:06 allsky allsky.sh[1567]: scripts/endOfNight.sh: line 79: 11628 Aborted                 "${ALLSKY_HOME}/keogram" ${SIZE_FILTER} -d "${DATE_DIR}/" -e ${EXTENSION} -o "${UPLOAD_FILE}" ${KEOGRAM_EXTRA_PARAMETERS}
Oct 18 06:55:06 allsky allsky.sh[1567]: endOfNight.sh: ===== Generating Startrails
Oct 18 06:55:38 allsky allsky.sh[1567]: scripts/endOfNight.sh: line 105: 11787 Aborted                 "${ALLSKY_HOME}/startrails" ${SIZE_FILTER} -d "${DATE_DIR}" -e ${EXTENSION} -b ${BRIGHTNESS_THRESHOLD} -o "${UPLOAD_FILE}"
Oct 18 06:55:38 allsky allsky.sh[1567]: endOfNight.sh: ===== Generating Timelapse
Oct 19 06:55:04 allsky allsky.sh[1567]: endOfNight.sh: ===== Generating Keogram
Oct 19 07:00:01 allsky allsky.sh[1567]: scripts/endOfNight.sh: line 79: 12725 Aborted                 "${ALLSKY_HOME}/keogram" ${SIZE_FILTER} -d "${DATE_DIR}/" -e ${EXTENSION} -o "${UPLOAD_FILE}" ${KEOGRAM_EXTRA_PARAMETERS}
Oct 19 07:00:01 allsky allsky.sh[1567]: endOfNight.sh: ===== Generating Startrails
Oct 19 07:00:57 allsky allsky.sh[1567]: scripts/endOfNight.sh: line 105: 13104 Aborted                 "${ALLSKY_HOME}/startrails" ${SIZE_FILTER} -d "${DATE_DIR}" -e ${EXTENSION} -b ${BRIGHTNESS_THRESHOLD} -o "${UPLOAD_FILE}"
Oct 19 07:00:57 allsky allsky.sh[1567]: endOfNight.sh: ===== Generating Timelapse
Oct 19 08:21:56 allsky allsky.sh[1567]: scripts/endOfNight.sh: line 136: /home/pi/allsky/scripts/endOfNight_additionalSteps.sh: No such file or directory
pi@allsky:~ $

@EricClaeys
Copy link
Collaborator

@Jonk2, Jon, grab the latest scripts/endOfNight.sh. It will expand the variables so you can see EXACTLY what arguments were passed to the keogram and startrails programs. We should then be able to reproduce the problem and fix it.

Also, do you have the latest src/startrails.cpp and src/keogram.cpp? If not, please grab them and put them in the allsky/src directory. Then run:

cd src
make all
sudo make install

My guess is that your endOfNight.sh and .cpp files are out of sync.

@Jonk2
Copy link
Author

Jonk2 commented Oct 20, 2021

Ok, can I check something? Please bear with me, I'm not Linux inclined and am trying to keep up!

A fresh git clone copies all of the latest into the allsky folder - I get that.

Git diff shows the latest files vs what I have, correct? This way I can see what's changed before I download. To do this correctly I use git pull, correct? Does this only 'pull' or download files that are different, i,e, updated?

I assume once I do a git pull I need to 'make' allsky and capture again?

Anyway, I've followed the instructions above by @ckuethe and here's a screenshot of the process / result.

image

I've also follwed @EricClaeys instructions (assuming the git pull has dowloaded any changed files?) and run ./install.sh again, and rebooted.

The program is running and everything's set to run in the morning and save to a NAS location, as before.

I'm not sure I can do much more until I check the result tomorrow after work (which will be about 19:00 BST) so just over 24 hours from now.

@ckuethe
Copy link
Collaborator

ckuethe commented Oct 20, 2021

OK, so the git pull failed because image.jpg was in conflict. git checkout -f image.jpg ; git pull will resolve that.

Then you can run make again which will build the latest code. As you can see from the unrecognized option message, the keogram program is kind of old and doesn't know about those very recently added options.

Another thing for you to try is to add a size filter. If

src/keogram -vv -d images/20211015 -e jpg -o /tmp/k.jpg --num-threads 1 --nice-level 0 2>&1 | tee /tmp/kl.txt

crashes, add -s WxH where WxH is the expected image size. On my system which produces 1280x960 images, that looks like

src/keogram -vv -s 1280x960 -d images/20211015 -e jpg -o /tmp/k.jpg --num-threads 1 --nice-level 0 2>&1 | tee /tmp/kl.txt

@Jonk2
Copy link
Author

Jonk2 commented Oct 20, 2021

Ok I did the first bit, here's the result - I'm not entirely sure when I'm looking at, green good red bad normally?

image

As I've run make again, is that it or do I need to run the ./install.sh again?

@ckuethe
Copy link
Collaborator

ckuethe commented Oct 20, 2021

That's perfectly normal git output which summarizes lines/bytes added and removed.

Note that I said src/keogram ... - that'll run the program out of the source directory without installing. We're pretty confident that the state of the tools is currently better than whatever you've currently got installed, so you may as well make install.

Also, when grepping for endofnight or timelapse in the logs, please use grep -C5 ... which will add 5 additional lines of context around each matching line. There are often additional clues nearby.

@EricClaeys
Copy link
Collaborator

@Jonk2, I believe the latest keogram file works and will resolve the problem you were having.
If this Issue is resolved, would you please close it? Thanks.

@Jonk2
Copy link
Author

Jonk2 commented Nov 21, 2021

Ok, I'm closing this as the keogram is produced and ftp is working ok at the moment.
I'm still unsure why every time a new piece of code is added you can't up the build number? Maybe a dicussion for another thread.

@Jonk2 Jonk2 closed this as completed Nov 21, 2021
@maphilli14
Copy link

I have a fresh pull from a few days ago and mine is doing this now too...


variables.sh: ===== Generating Keogram
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::substr: __pos (which is 140) > this->size() (which is 0)
bash: line 1: 14347 Aborted                 '/home/pi/allsky/keogram' -d '/home/pi/allsky/images/20211208' -e jpg -o '/home/pi/allsky/images/20211208/keogram/keogram-20211208.jpg' --rotate 0 --font-size 1.0 --font-line 1 --font-color '255 255 255'
Command Failed: '/home/pi/allsky/keogram'  -d '/home/pi/allsky/images/20211208' -e jpg -o '/home/pi/allsky/images/20211208/keogram/keogram-20211208.jpg' --rotate 0 --font-size 1.0 --font-line 1 --font-color '255 255 255'
variables.sh: ===== Generating Startrails
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::substr: __pos (which is 140) > this->size() (which is 0)
bash: line 1: 14375 Aborted                 '/home/pi/allsky/startrails' -d '/home/pi/allsky/images/20211208' -e jpg -b 0.1 -o '/home/pi/allsky/images/20211208/startrails/startrails-20211208.jpg'
Command Failed: '/home/pi/allsky/startrails'  -d '/home/pi/allsky/images/20211208' -e jpg -b 0.1 -o '/home/pi/allsky/images/20211208/startrails/startrails-20211208.jpg'
variables.sh: ===== Generating Timelapse
^C

@EricClaeys
Copy link
Collaborator

@maphilli14 there's likely a corrupted file in /home/pi/allsky/images/20211208, or the image size or number of colors changed. The keogram program should have caught it, but obviously not.
I would like to see the corrupt file(s) so if you could post them I would appreciate it.
Create a directory called images/test and copy all the images from 20211208 there. Then run scripts/removeBadImages.sh 20211208.
It will delete the corrupt images and output a line for each one. Then run scripts/runForDay.sh -k -s
To create the keogram and startrails.
If that works, post the corrupt files ftom the images/temp directory, then remove that directory.

@EricClaeys EricClaeys reopened this Dec 9, 2021
@maphilli14
Copy link

I lost that dataset when I freshened my install again due to some boot issues. I had a keogram and startrail but a short/corrupt, but I don't seem to have the runForDay.sh script in the folder, it's all brand new clone from yestereday....


pi@allsky:~ $ ls -la allsky/scripts/
total 88
drwxr-xr-x  2 pi pi 4096 Dec  9 15:25 .
drwxr-xr-x 13 pi pi 4096 Dec 10 10:59 ..
-rwxr-xr-x  1 pi pi 2603 Dec  9 15:25 allsky_mfs.sh
-rwxr-xr-x  1 pi pi 3309 Dec  9 15:25 copy_notification_image.sh
-rwxr-xr-x  1 pi pi 2155 Dec  9 15:25 darkCapture.sh
-rwxr-xr-x  1 pi pi 3665 Dec  9 15:25 darkSubtract.sh
-rwxr-xr-x  1 pi pi  555 Dec  9 15:25 endOfNight_additionalSteps.repo
-rwxr-xr-x  1 pi pi 3056 Dec  9 15:25 endOfNight.sh
-rwxr-xr-x  1 pi pi  173 Dec  9 15:25 filename.sh
-rwxr-xr-x  1 pi pi 7240 Dec  9 15:25 generateForDay.sh
-rw-r--r--  1 pi pi  925 Dec  9 15:25 Makefile
-rwxr-xr-x  1 pi pi  960 Dec  9 15:25 postData.sh
-rwxr-xr-x  1 pi pi 6011 Dec  9 15:25 removeBadImages.sh
-rwxr-xr-x  1 pi pi 3123 Dec  9 15:25 saveImageDay.sh
-rwxr-xr-x  1 pi pi 3923 Dec  9 15:25 saveImageNight.sh
-rwxr-xr-x  1 pi pi 4975 Dec  9 15:25 timelapse.sh
-rwxr-xr-x  1 pi pi  507 Dec  9 15:25 uploadForDay.sh
-rwxr-xr-x  1 pi pi 5765 Dec  9 15:25 upload.sh
pi@allsky:~ $

@EricClaeys
Copy link
Collaborator

@maphilli14 sorry, it's called generateForDay.sh.
Eric

@maphilli14
Copy link

Hah! NP, why did this happen to remove bad images?

pi@allsky:~/allsky $ /home/pi/allsky/scripts/removeBadImages.sh /home/pi/allsky/images/20211209 /home/pi/allsky/scripts/removeBadImages.sh: line 93: /usr/bin/which: Argument list too long /home/pi/allsky/scripts/removeBadImages.sh: line 131: /usr/bin/egrep: Argument list too long /home/pi/allsky/scripts/removeBadImages.sh: line 139: /usr/bin/bc: Argument list too long /home/pi/allsky/scripts/removeBadImages.sh: line 143: /usr/bin/bc: Argument list too long /home/pi/allsky/scripts/removeBadImages.sh: line 144: [: -eq: unary operator expected /home/pi/allsky/scripts/removeBadImages.sh: line 153: /usr/bin/bc: Argument list too long /home/pi/allsky/scripts/removeBadImages.sh: line 154: [: -eq: unary operator expected /home/pi/allsky/scripts/removeBadImages.sh: line 131: /usr/bin/egrep: Argument list too long /home/pi/allsky/scripts/removeBadImages.sh: line 139: /usr/bin/bc: Argument list too long /home/pi/allsky/scripts/removeBadImages.sh: line 143: /usr/bin/bc: Argument list too long /home/pi/allsky/scripts/removeBadImages.sh: line 144: [: -eq: unary operator expected /home/pi/allsky/scripts/removeBadImages.sh: line 153: /usr/bin/bc: Argument list too long /home/pi/allsky/scripts/removeBadImages.sh: line 154: [: -eq: unary operator expected /home/pi/allsky/scripts/removeBadImages.sh: line 131: /usr/bin/egrep: Argument list too long /home/pi/allsky/scripts/removeBadImages.sh: line 139: /usr/bin/bc: Argument list too long

That was CTRL+C'ed as it seemed just not doing what I wanted. It re ran fine with that proper command and is very handy! Just didn't seem to fix the length issue. I'll try to rerun removebadimages and try again...

image

@EricClaeys
Copy link
Collaborator

@maphilli14 how many images do you have in the 20211209 directory? I would guess many thousand and the code is hitting a limit of the number of files allowed on a command line.

Until I'm able to fix it you can move, for example, half the files to a new directory in allsky/images, e.g., 20211209b, and run removeBadImages.sh on each directory. Then when done, move all the files from 20211209b back into 20211209.

I only need a couple corrupt files to debug the startrails and keogram issue you had.

Eric

@maphilli14
Copy link

Do I have too sensitive a camera? I'm using the 290 not the 174 we've been testing in BugID = 650


pi@allsky:~/allsky/images $ ls
20211209  20211210  CURRENTANI.gif  liveview-image.jpg
pi@allsky:~/allsky/images $ du -h
44M     ./20211210/thumbnails
5.1M    ./20211210/keogram
432K    ./20211210/startrails
8.6G    ./20211210
51M     ./20211209/thumbnails
5.7M    ./20211209/keogram
568K    ./20211209/startrails
11G     ./20211209
19G     .
pi@allsky:~/allsky/images $  ls -1 20211209/*.jpg | wc -l
13110
pi@allsky:~/allsky/images $  ls -1 20211210/*.jpg | wc -l
11407
pi@allsky:~/allsky/images $

@EricClaeys
Copy link
Collaborator

@maphilli14 I don't think there is a camera that's too sensitive. Sensitivity is good.
You just have a whole lot of pictures in one directory and it's hitting a limit in bash. I won't be able to fix anything for a couple weeks. Can you try what I suggested in my last post?

Going forward you could try increasing your delay between pictures, especially during the day. That will decrease the number of pictures and hopefully get you below the limit.

@maphilli14
Copy link

What's the actual limit? I split in 2 and it still doesn't run :(


pi@allsky:~/allsky/images/20211212 $ mv image-20211212* 1
pi@allsky:~/allsky/images/20211212 $ mv image-20211213* 2
pi@allsky:~/allsky/images/20211212 $ ls -1 1 | wc -l
5224
pi@allsky:~/allsky/images/20211212 $ ls -1 2 | wc -l
5767
pi@allsky:~/allsky/images/20211212 $ /home/pi/allsky/scripts/removeBadImages.sh  /home/pi/allsky/images/20211212/1
/home/pi/allsky/scripts/removeBadImages.sh: line 93: /usr/bin/which: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 131: /usr/bin/egrep: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 139: /usr/bin/bc: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 143: /usr/bin/bc: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 144: [: -eq: unary operator expected
/home/pi/allsky/scripts/removeBadImages.sh: line 153: /usr/bin/bc: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 154: [: -eq: unary operator expected
/home/pi/allsky/scripts/removeBadImages.sh: line 131: /usr/bin/egrep: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 139: /usr/bin/bc: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 143: /usr/bin/bc: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 144: [: -eq: unary operator expected
/home/pi/allsky/scripts/removeBadImages.sh: line 153: /usr/bin/bc: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 154: [: -eq: unary operator expected
/home/pi/allsky/scripts/removeBadImages.sh: line 131: /usr/bin/egrep: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 139: /usr/bin/bc: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 143: /usr/bin/bc: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 144: [: -eq: unary operator expected
/home/pi/allsky/scripts/removeBadImages.sh: line 153: /usr/bin/bc: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 154: [: -eq: unary operator expected
/home/pi/allsky/scripts/removeBadImages.sh: line 131: /usr/bin/egrep: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 139: /usr/bin/bc: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 143: /usr/bin/bc: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 144: [: -eq: unary operator expected
/home/pi/allsky/scripts/removeBadImages.sh: line 153: /usr/bin/bc: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 154: [: -eq: unary operator expected
/home/pi/allsky/scripts/removeBadImages.sh: line 131: /usr/bin/egrep: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 139: /usr/bin/bc: Argument list too long
/home/pi/allsky/scripts/removeBadImages.sh: line 143: /usr/bin/bc: Argument list too long

@maphilli14
Copy link

I only record at night and it's using the default delay between photos and a 4s sub exp :(

@maphilli14
Copy link

I'm pruning them by hand to test....
image

@linuxkidd
Copy link
Collaborator

Hi @maphilli14 ... You can run the following command to get the argument list limit:

getconf ARG_MAX

Note that the value returned is the character length of the command and is enforced by the operating system ( not the shell ). Since it is a character count limit, the path for each file is included in the limit. With that in mind, you may be able to get the script to run with the following:

cd /home/pi/allsky/scripts
./removeBadImages.sh ../images/20211212/1

This alone will reduce your character count by 14 for -each- image.

@maphilli14
Copy link

I split it into quarters, or closely... but .... Damn, it's really punchy!
image

GOOD

BAD
image

@maphilli14
Copy link

actually those total file counts are reversed, the 2528 was too long and gave errs but the 2505 processed fine and removed 23 additional bad files above and beyond the small file size i pruned by hand. Why am I the only one with so many files? I backed off the default inter 'frame' capture from 10ms to 100ms to abate the bad file issues.... honestly I was hoping that at 4s subs it would be less churn on the disk i/o and better results... keep tweaking I guess...

@maphilli14
Copy link

Changing the delay from 10 to 100 didn't result in a successful timelapse for the recent end of night...

this still confuses me...

image

@linuxkidd
Copy link
Collaborator

Hi @maphilli14
I think others don't experience this because they have a much longer exposure time and daytime delay. My 'night' collections ( with 0 degree horizon offset ) only have 1494 exposures.

My settings:

  • Night max exposure: 34000
  • Night delay: 10

My other system only generates up to 804 exposures:

  • Night max exposure: 60000
  • Night delay: 10

There can be some code changes in the script to accommodate larger image sets ( creating a loop that processes say.. only 500 images at a time ).

If you need assistance tweaking your exposure / delay settings, or the image count you're achieving is necessary, please open a new issue so we can work the problem separately since it's not related to the original purpose of this ticket (also, I'm sure Jonk2 isn't thrilled with getting loads of updates on an issue they consider closed ).

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs software change Need user response
Projects
None yet
Development

No branches or pull requests

6 participants