Error log since updating from SMF 2.1.1 to SMF 2.1.2

Started by Liviu Lalescu, May 11, 2022, 02:55:28 AM

Previous topic - Next topic

Liviu Lalescu

Hello,

I got 3 errors like below, in nearly 24 hours since updating:

Guest
IP.IP.IP.IP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
https://xxxxxxxxxxxxxxxxxxxx/forum/index.php?action=dlattach;attach=xxxx;type=avatar
/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/forum/Sources/ShowAttachments.php (Line 128)
Backtrace information

Type of error: General
Error message Select
2: sha1_file(/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/forum/attachments/xxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx): failed to open stream: No such file or directory

This IP is of a bing.com bot.

shawnb61

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Liviu Lalescu


movierchives

I've now for the second day had no errors thanks to a post I seen here, just added this to the robot file and the Bingbots are now behaving

User-agent: *
Allow: /*type=rss
Allow: /*rss
Allow: /*board
Allow: /*topic
Allow: /*.xml
Allow: /*.css$
Allow: /*.js$
Allow: /*.png$
Allow: /*.jpg$
Allow: /*.gif$
Allow: /?action=sitemap
Allow: /?action=sitemap;xml
Allow: /Themes/default/css/
Allow: /Themes/default/images/
Allow: /Themes/default/scripts/
Disallow: /administrator/
Disallow: /cache/
Disallow: /components/
Disallow: /editor/
Disallow: /help/
Disallow: /images/
Disallow: /includes/
Disallow: /language/
Disallow: /mambots/
Disallow: /media/
Disallow: /modules/
Disallow: /templates/
Disallow: /installation/
Disallow: /go.php
Disallow: /*action
Disallow: /*board*wap2
Disallow: /*topic*wap2
Disallow: /*wap2
Disallow: /*topic*.msg
Disallow: /*.msg
Disallow: /*.new
Disallow: /*board*sort
Disallow: /*sort
Disallow: /*topicseen
Disallow: /*prev_next
Disallow: /*all
Disallow: /*PHPSESSID
Disallow: /attachments/
Disallow: /avatars/
Disallow: /Packages/
Disallow: /Smileys/
Disallow: /Sources/
Disallow: /Themes/
Disallow: /android-app:
Disallow: /ios-app:
Sitemap: xxx/?action=sitemap;xml
Sitemap: xxx/sitemap.xml
Crawl-delay: 5
Clean-param: PHPSESSID /index.php
Host: xx

Still I didn't need to do this before under SMF 2.0.x

izotz

Quote from: movierchives on May 20, 2022, 06:43:46 AMI've now for the second day had no errors thanks to a post I seen here, just added this to the robot file and the Bingbots are now behaving

User-agent: *
Allow: /*type=rss
Allow: /*rss
Allow: /*board
Allow: /*topic
Allow: /*.xml
Allow: /*.css$
Allow: /*.js$
Allow: /*.png$
Allow: /*.jpg$
Allow: /*.gif$
Allow: /?action=sitemap
Allow: /?action=sitemap;xml
Allow: /Themes/default/css/
Allow: /Themes/default/images/
Allow: /Themes/default/scripts/
Disallow: /administrator/
Disallow: /cache/
Disallow: /components/
Disallow: /editor/
Disallow: /help/
Disallow: /images/
Disallow: /includes/
Disallow: /language/
Disallow: /mambots/
Disallow: /media/
Disallow: /modules/
Disallow: /templates/
Disallow: /installation/
Disallow: /go.php
Disallow: /*action
Disallow: /*board*wap2
Disallow: /*topic*wap2
Disallow: /*wap2
Disallow: /*topic*.msg
Disallow: /*.msg
Disallow: /*.new
Disallow: /*board*sort
Disallow: /*sort
Disallow: /*topicseen
Disallow: /*prev_next
Disallow: /*all
Disallow: /*PHPSESSID
Disallow: /attachments/
Disallow: /avatars/
Disallow: /Packages/
Disallow: /Smileys/
Disallow: /Sources/
Disallow: /Themes/
Disallow: /android-app:
Disallow: /ios-app:
Sitemap: xxx/?action=sitemap;xml
Sitemap: xxx/sitemap.xml
Crawl-delay: 5
Clean-param: PHPSESSID /index.php
Host: xx

Still I didn't need to do this before under SMF 2.0.x

Thanks for posting the solution.
Newbie question here. If the error happens when a robot calls
https://xxxxxxxxxxxxxxxxxxxx/forum/index.php?action=dlattach;attach=xxxx;type=avatar [nofollow]
How does the robot.txt above prevent the robot from calling the index.php? Is it because of any of the "Disallow" above? Which one would that be?

I tried adding it to my forum and I'm still getting those error logs, so I'm assuming I did something wrong (likely) or I didn't capture the right case.

Kindred

None of that is required...

And honestly most of that is specific to pretty urls
Слова
Украина

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

movierchives


Kindred

The errors stopping is incidental..

What you did is **NOT** a solution and is not recommended. Other people should not do what you did.
Слова
Украина

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Eh, leave him running his avatars in the super-inefficient and long since deprecated configuration that consumes a ton more server resources than actually figuring the problem out.
Perhaps it would have been better if I'd simply never bothered. Y'all clearly would be less unhappy that way.

movierchives

Quote from: Arantor on May 22, 2022, 03:39:02 PMEh, leave him running his avatars in the super-inefficient and long since deprecated configuration that consumes a ton more server resources than actually figuring the problem out.
Thank you for that however this was posted by someone else here I just picked it up to try and it has stopped the errors, non for 4 days now.

If its fixed I can delete this again from the robots text

ozbob

I have been getting a lot of similar errors coming up in the server error log.

[30-May-2022 04:51:25 Australia/Brisbane] PHP Warning:  sha1_file(/home/xxxxxxxxxxx/attachments/xxxxxxxxxxxxx): failed to open stream: No such file or directory in /home/xxxxxxxxxxxxx/Sources/ShowAttachments.php on line 128

I assume this is being looked at now?

Quote from: Liviu Lalescu on May 11, 2022, 02:55:28 AMHello,

I got 3 errors like below, in nearly 24 hours since updating:

Guest
IP.IP.IP.IP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
https://xxxxxxxxxxxxxxxxxxxx/forum/index.php?action=dlattach;attach=xxxx;type=avatar
/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/forum/Sources/ShowAttachments.php (Line 128)
Backtrace information

Type of error: General
Error message Select
2: sha1_file(/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/forum/attachments/xxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx): failed to open stream: No such file or directory

This IP is of a bing.com bot.


ozbob

Still getting a lot of these errors in the server log.

Is there a quick fix other than that above?

Thanks.

shawnb61

The following fix will be in 2.1.3:
https://github.com/SimpleMachines/SMF/pull/7470

The errors are harmless & can be safely ignored.

This will happen when crawlers are still looking for old-style avatar links.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp


Pogo Stick

I guess it's safe enough to manually patch ShowAttachments.php with the changes in https://github.com/SimpleMachines/SMF/pull/7470/files [nofollow] ?

Advertisement: