toddsundsted / ktistec

Single user ActivityPub (https://www.w3.org/TR/activitypub/) server.
GNU Affero General Public License v3.0
350 stars 21 forks source link

Hostname lookup failed exceptions #59

Closed vrthra closed 1 year ago

vrthra commented 1 year ago

I am getting quite a few of these exceptions

2022-12-19T01:30:57.196751Z   INFO - {"@context" => "https://www.w3.org/ns/activitystreams", "id" => "https://types.pl/users/josepablocam/followers", "type" => "OrderedCollection", "totalIte
ms" => 32, "first" => "https://types.pl/users/josepablocam/followers?page=1"}                  
Exception: Hostname lookup for mastodon.local failed: No address found (Socket::Addrinfo::Error)                                                                                              
  from /usr/share/crystal/src/socket/addrinfo.cr:132:7 in 'initialize'                         
  from /usr/share/crystal/src/socket/tcp_socket.cr:27:3 in 'initialize'                        
  from /usr/share/crystal/src/socket/tcp_socket.cr:27:3 in 'new'                               
  from /usr/share/crystal/src/http/client.cr:795:10 in 'io'                                    
  from /usr/share/crystal/src/http/client.cr:676:19 in 'send_request'                          
  from /usr/share/crystal/src/http/client.cr:607:5 in 'exec_internal_single'                   
  from /usr/share/crystal/src/http/client.cr:590:18 in 'exec_internal'                         
  from /usr/share/crystal/src/http/client.cr:583:7 in 'exec'                                   
  from /usr/share/crystal/src/http/client.cr:719:5 in 'exec'                                   
  from /usr/share/crystal/src/http/client.cr:751:7 in 'exec'                                   
  from /usr/share/crystal/src/http/client.cr:408:3 in 'get'                                    
  from /build/src/framework/open.cr:10:9 in 'open'                                             
  from /build/src/framework/open.cr:40:13 in 'dereference?:ignore_cached:include_key'          
  from /build/src/controllers/inboxes.cr:51:17 in '->'                                         
  from /build/lib/kemal/src/kemal/route.cr:12:26 in '->'                                       
  from /build/lib/kemal/src/kemal/route_handler.cr:49:39 in 'process_request'                  
  from /build/lib/kemal/src/kemal/route_handler.cr:17:7 in 'call'                              
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'                       
  from /build/lib/kemal/src/kemal/websocket_handler.cr:13:14 in 'call'                         
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'                       
  from /build/src/handlers/canonical.cr:15:14 in 'call'                                        
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'                       
  from /build/src/framework/rewrite.cr:8:14 in 'call'                                          
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'                       
  from /build/src/framework/method.cr:21:14 in 'call'                                          
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'                       
  from /build/src/framework/csrf.cr:49:14 in 'call'                                            
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'                       
  from /build/src/framework/auth.cr:13:14 in 'call'                                            
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'                       
  from /build/lib/kemal/src/kemal/static_file_handler.cr:11:11 in 'call'                       
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'                       
  from /build/lib/kemal/src/kemal/exception_handler.cr:8:7 in 'call'                           
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'                       
  from /usr/share/crystal/src/time.cr:357:5 in 'call'                                          
  from /usr/share/crystal/src/http/server/handler.cr:28:7 in 'call_next'                       
  from /build/lib/kemal/src/kemal/init_handler.cr:12:7 in 'call'                               
  from /usr/share/crystal/src/http/server/request_processor.cr:51:11 in 'process'              
  from /usr/share/crystal/src/http/server.cr:515:5 in 'handle_client'                          
  from /usr/share/crystal/src/http/server.cr:468:13 in '->'                                    
  from /usr/share/crystal/src/fiber.cr:146:11 in 'run'                                         
  from /usr/share/crystal/src/fiber.cr:98:34 in '->'                                           
  from ???                                     

I am not sure why it is looking up mastodon.local. Noting it here in case it is something important.

toddsundsted commented 1 year ago

can you paste ~10 or so log lines before and after this stack trace? my guess is that someone posted from "mastodon.local" (which is probably an incorrectly configured instance)

vrthra commented 1 year ago

you are right; you can close this issue.

2022-12-19T00:27:29.384566Z   INFO - {"@context" => "https://www.w3.org/ns/activitystreams", "id" => "https://mastodon.local/users/Steve#delete", "type" => "Delete", "actor" => "https://mastodon.local/users/Steve", "to" => ["https://www.w3.org/ns/activitystreams#Public"], "object" => "https://mastodon.local/users/Steve", "signature" => {"type" => "RsaSignature2017", "creator" => "https://mastodon.local/users/Steve#main-key", "created" => "2022-12-18T22:36:48Z", "signatureValue" => "gnV+j7kChc7c1c1OpC9N+eRnvj0UQafeHHh/s5E4t69hzYJ75NV5HFZvMlD4s39dMdySn7ndcipE330e1ASdJp2r+4XmG9SFmxPZ7i5sUuLnfbnyK9ymza0jUE2UuPsgZ7Yya6Q/jqYncNc/DS6FC8kBk6uqRlfdVdoyOXGmz5bJXyr3HJuheVR5P6y5uOZfhGuSx+zCXoIJazo+c4UGBtTKjCixcglhxSWGpoMYzJIqF3c7D03ai8esXV4zosD3AM/NY4Se45Hdc492vBb8YGhkGdxwCQ0sPBW56F6Eyz8rbzwL3WJD2OQbAjRNrg/tahZTq2fgBx6c2ecAl+E+6Q=="}}
Exception: Hostname lookup for mastodon.local failed: No address found (Socket::Addrinfo::Error)