Many log entries after update

Started by izotz, May 11, 2022, 06:51:10 AM

Previous topic - Next topic

izotz

I upgraded from 2.1.1 to 2.1.2 a couple of days ago. I think I only have the Tapatalk mod, which I upgraded at the same time. Before this, I was getting very few entries in the "Error Log" in the "Admin" panel. But now I get 100s a day with this or similar format :

Guest
 (IP address here)
 5cf77ccf48c083eb3c620112626aa1ee
 http://www.(my forum domain).com/forum/index.php?action=dlattach;attach=419;type=avatar
 /(full path to my forum in the server) /Sources/ShowAttachments.php (Line 128) 

Type of error: General
Error messageSelect
2: sha1_file(/(full path to my forum in the server) /public_html/attachments/419_6c61845375501e74464b2c872951a57d8c6b4197): failed to open stream: No such file or directory

They are all general, generated for a Guest user, for different attach ID (419 in the example).

The forum works ok, as far as I can see. I logged out and as guest I could display the forum attachments and avatars in the threads.

I have very limited knowledge of this. I'm confused because I don't know if it makes sense that it refers to type=avatar when it points to the attachments folder.

I thought they could be scrapers or web crawlers. A few IP addresses look like it, but some of them don't.

Should I be worried about this? Am I the only one experimenting this?

Liviu Lalescu


chadon

Quote from: izotz on May 11, 2022, 06:51:10 AMShould I be worried about this? Am I the only one experimenting this?
No, I have the same error but not as often as you.

izotz

Quote from: chadon on May 12, 2022, 11:24:16 AM
Quote from: izotz on May 11, 2022, 06:51:10 AMShould I be worried about this? Am I the only one experimenting this?
No, I have the same error but not as often as you.


Even though I may not getting the error with the same frequency, I wonder for those who encountered this issue, what common patter we can find. In my case, the only change I could think of, was an upgrade of SMF from 2.1.1 to 2.1.2, and Tapatalk mod from (I think) 5.1.1 to 5.1.3. I wonder if any of these was the reason to go from "few" to 100s, that is, they multiplied by 100.

Maybe as long as the forum is working ok, and we are only generating a few 100s of records a day, nothing is going to break. I'm curious if other people are experiencing the same, what the trigger could possibly be and if something can be improved, or something I messed up.

The other admin in my forum believes it could have to do with external agents (bots, users, spammers...) hitting random URLs, but this makes no sense to me. Anyway, none of us are very proficient in these matters.

chadon

You asked if you were the only one experimenting this and I replied no. Sorry if I gave too much information in my reply.  ::)

movierchives

I'm getting this error now, thought I had a workaround but that didn't stop it and they all seem to be caused by Bingbot IP addresses

2: sha1_file(/home/removed/public_html/forum/attachments/8049_664eb9f4d60221d64c5227300d6e9f731d741168): failed to open stream: No such file or directory

Doug Heffernan

Quote from: movierchives on May 17, 2022, 11:46:21 AMI'm getting this error now, thought I had a workaround but that didn't stop it and they all seem to be caused by Bingbot IP addresses

2: sha1_file(/home/removed/public_html/forum/attachments/8049_664eb9f4d60221d64c5227300d6e9f731d741168): failed to open stream: No such file or directory

What workaround did you have if I may ask?

Did you upgrade your forum recently? If you go to your Admin Panel->Forum->Attachments and Avatars->Attachment Settings. Can you double check and confirm that everything is as it should there?

pikeman

After updating to 2.1.2 identical bugs appeared on my forum:

Quotec5df6b650a3d62ab2f6037dc734c2435
https://******************action=dlattach;attach=4224;type=avatar
/home/**********/public_html/Sources/ShowAttachments.php (Linija 128)



2: sha1_file(/***********/public_html/attachments/4224_e39aac4ddb3088b04dedd09f4d7fff99fe1e0b0e): failed to open stream: No such file or directory

izotz

Quote from: movierchives on May 17, 2022, 11:46:21 AMI'm getting this error now, thought I had a workaround but that didn't stop it and they all seem to be caused by Bingbot IP addresses
I think you are right. Even though I discarded it at the beginning, many of them are Microsoft's bots. I tried banning some IP addresses, but it is pointless as they have too many of them, and it doesn't fix whatever underlying issue there may be.

Quote from: Doug Heffernan on May 17, 2022, 12:51:52 PMWhat workaround did you have if I may ask?

Did you upgrade your forum recently? If you go to your Admin Panel->Forum->Attachments and Avatars->Attachment Settings. Can you double check and confirm that everything is as it should there?
No idea about their workaround, but I was not too successful with my IP ban. And I didn't find editing the .htaccess file too successful in the past.

I did upgrade from 2.1.1 to 2.1.2 . I don't think I changed anything in the admin panel. No idea what I could be missing in the config. Maybe I can paste it here, in case anything jumps out of it.

Attachments mode : Enable all attachments
Choose the method for the management of the attachment directories : (Manual) SMF default behavior
Attachments directory : /xxxxxxx/public_html/attachments

Maximum number of files per directory (0 for no limit) : 0
Max attachment directory space : (0 for no limit) 0  KB
Do not show attachments under the post if they are already embedded in it : unchecked

Max attachment size per post : 1012 KB
Max size per attachment : 256 KB
Max number of attachments per post (0 for no limit) : 8

Check attachment's extension : checked
Allowed attachment extensions : txt,doc,pdf,jpg,jpeg,tiff,gif,mpg,png,kmz,xls,xlsx,webp
Re-encode potentially dangerous image attachments : checked
Perform extensive security checks on uploaded image attachments : unchecked

Display image attachments as pictures under post : checked
Resize images when showing under posts : checked
Save thumbnails as PNG : checked
Adaptive thumbnail memory : unchecked

Maximum width of thumbnails : 0
Maximum height of thumbnails : 0
Max display width of posted or attached images (0 for no limit) : 0
Max display height of posted or attached images : 0

movierchives

#9
Quote from: Doug Heffernan on May 17, 2022, 12:51:52 PM
Quote from: movierchives on May 17, 2022, 11:46:21 AMI'm getting this error now, thought I had a workaround but that didn't stop it and they all seem to be caused by Bingbot IP addresses

2: sha1_file(/home/removed/public_html/forum/attachments/8049_664eb9f4d60221d64c5227300d6e9f731d741168): failed to open stream: No such file or directory

What workaround did you have if I may ask?

Did you upgrade your forum recently? If you go to your Admin Panel->Forum->Attachments and Avatars->Attachment Settings. Can you double check and confirm that everything is as it should there?
Well as I say it didn't work but I created a new membergroup for the spiders only allowing them to visit public parts of the forum although it has kept the errors down somewhat, I'm going to tweak permissions again & yes I went from 2.0.19 to 2.1

I also checked file integrity and everything was fine but strange that its only Microsoft bots doing this as well

EDIT:  Right removed all permissions so the bots can view posts etc but can't touch attachments or avatars so will know over night if this has worked

movierchives

Update this workaround after changing permissions hasn't stopped it either, again all Microsoft Bingbot IP's

207.46.13.76
2: sha1_file(/home/removed/public_html/forum/attachments/9190_d571b3ad9f2db9fa2dac642e439599588da36912): failed to open stream: No such file or directory
207.46.13.126
2: sha1_file(/home/removed/public_html/forum/attachments/6574_f6f965d378bf8f4dacd97f90b155803cdf3b7d75): failed to open stream: No such file or directory
157.55.39.221
2: sha1_file(/home/removed/public_html/forum/attachments/1118_4093d620e278761a3b703ca67a64c22b57480292): failed to open stream: No such file or directory
207.46.13.126
2: sha1_file(/home/removed/public_html/forum/attachments/6090_00abf5e1dbd6d7e9fab7a54ca6f6d352bc47baa4): failed to open stream: No such file or directory
207.46.13.126
2: sha1_file(/home/removed/public_html/forum/attachments/2487_925b474ab7e4dc95583f0b5e42114ef8eb46243e): failed to open stream: No such file or directory

shawnb61

Actually, I just saw one of these as well.

In my case, this appears to be someone attempting to download an avatar that doesn't exist anymore.  The only reason I know it is an avatar is that I have an old backup I could look at from before deletion.

Logged here:
https://github.com/SimpleMachines/SMF/issues/7468
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

boardhead

I have this same problem.  Here is an example URL from the error message:

https://exiftool.org/forum/index.php?action=dlattach;attach=4367;type=avatar

I upgraded to 2.1.2 from 2.0.19, and after upgrade there are no attachments beginning with 4367.  But before upgrade there was a file named 4367_2d2cd814a36f47905f9ce0ec7da40059de33eb08 in the attachments folder.

I've got more than 50 of these errors in the last day.  Most for 4367, but there are a handful of other numbers.

It seems that these errors may not be indicative of a problem, so my questions are:

1. Why are these errors occurring?

2. How do I prevent these errors from filling up my error log?

TIA.

- Phil


Arantor

I'd imagine that in your case the file has been converted to a different file name and moved to the custom_avatar folder and the old avatar route doesn't redirect correctly for some reason.

boardhead

Thanks, but that doesn't help with me getting rid of the errors.  I tried copying the 4367 file from the backup and adding a .dat (so it is now 4367_2d2cd814a36f47905f9ce0ec7da40059de33eb08.dat), but the 40 characters at the end of the file name changes with every error message:

2: sha1_file(.../forum/attachments/4367_21ad6d79d34e1808982c4640e3ebb6de8683e3d8): failed to open stream: No such file or directory
2: sha1_file(.../forum/attachments/4367_51942b45d07a0667c023b547e09ea8461ba70fa3): failed to open stream: No such file or directory
2: sha1_file(.../forum/attachments/4367_cdebec86d6ae3abe6a780788457ca8f9027d1c61): failed to open stream: No such file or directory

Presumably this is an sha1 changing, so I don't understand how to generate the file from the backup to avoid the error message.

- Phil

shawnb61

As noted above, known issue that will be fixed in 2.1.3.  You can follow the link above for the explanation/solution.

Short version: Annoying but harmless.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Arantor

Here's the thing though, solving the etag problem doesn't change the fact that dlattach should be capable of redirecting to the new home of the avatar file in the custom_avatar folder rather than 404ing it; the (new) filename is in the attachments table, the type of the attachment is also known at that point to confirm it is an avatar.

That way you wouldn't get the bots hammering looking for links that are no longer the same between 2.0 and 2.1, but they could be 301'd to the correct place.

boardhead


Steve

Marking solved and moving to Bug Reports. (Solved meaning the developers are aware of it and are working on a solution.)
Please do not PM me for support.

Advertisement: