Unable to determine host for current URL [SYS0107]


(Mail) #1

Perhaps my question is better off posted in this section, I wonder if anybody could advise me on how to avoid the error…

    *MySource Error*
    File : [SYSTEM_ROOT]/core/include/locale_manager.inc
    Line : 504
    Version : 3.20.3
    DB Type : pgsql
    
    Unable to determine host for current URL [SYS0107]
    ------------------------------------------------------------------
    *User Details*
    ------------------------------------------------------------------
    *Root Urls*
    www.divorce-london.co.uk
    divorce-london.co.uk
    ------------------------------------------------------------------
    *Current URL*
    http://NO HOST/NO REQUEST URI
    ------------------------------------------------------------------

(Aleks Bochniak) #2

When does this appear?


(Mail) #3

[quote]
When does this appear?

[/quote]



I think it's when the cron job is running, the full error is as…


    *MySource Error*
    File : [SYSTEM_ROOT]/core/include/locale_manager.inc
    Line : 504
    Version : 3.20.3
    DB Type : pgsql
    
    Unable to determine host for current URL [SYS0107]
    ------------------------------------------------------------------
    *User Details*
    ------------------------------------------------------------------
    *Root Urls*
    www.divorce-london.co.uk
    divorce-london.co.uk
    vps.divorce-london.co.uk
    ------------------------------------------------------------------
    *Current URL*
    http://NO HOST/NO REQUEST URI
    ------------------------------------------------------------------
    *Back Trace*
    0 => array (
    "function" => "sq_error_handler",
    "args" => array (
    0 => 256,
    1 => "Unable to determine host for current URL [SYS0107]",
    2 => "[SYSTEM_ROOT]/core/include/locale_manager.inc",
    3 => 504,
    4 => array (
    [Max Depth Reached]
    ) 
    ) 
    ),
    1 => array (
    "file" => "[SYSTEM_ROOT]/core/include/locale_manager.inc",
    "line" => 504,
    "function" => "trigger_error",
    "args" => array (
    0 => "Unable to determine host for current URL [SYS0107]",
    1 => 256 
    ) 
    ),
    2 => array (
    "file" => "[SYSTEM_ROOT]/core/include/general.inc",
    "line" => 1160,
    "function" => "raiseError",
    "class" => "Locale_Manager",
    "type" => "->",
    "object" => new Locale_Manager Object (
    "locale_stack" => array (
    [Max Depth Reached]
    ),
    "_strings" => array (
    [Max Depth Reached]
    ),
    "_errors" => array (
    [Max Depth Reached]
    ),
    "_internal_messages" => array (
    [Max Depth Reached]
    ),
    "_tmp" => array (
    [Max Depth Reached]
    ) 
    ),
    "args" => array (
    0 => "SYS0107",
    1 => 256,
    2 => array (
    [Max Depth Reached]
    ) 
    ) 
    ),
    3 => array (
    "file" => "[SYSTEM_ROOT]/core/include/general.inc",
    "line" => 618,
    "function" => "trigger_localised_error",
    "args" => array (
    0 => "SYS0107",
    1 => 256 
    ) 
    ),
    4 => array (
    "file" => "[SYSTEM_ROOT]/core/include/general.inc",
    "line" => 453,
    "function" => "current_url",
    "args" => array (
    0 => ,
    1 => 1 
    ) 
    ),
    5 => array (
    "file" => "[SYSTEM_ROOT]/core/assets/system/session_handling/session_handler_types/session_handler_default/session_handler_default.inc",
    "line" => 63,
    "function" => "sq_web_path",
    "args" => array (
    0 => "root_url" 
    ) 
    ),
    6 => array (
    "file" => "[SYSTEM_ROOT]/core/include/mysource.inc(243) : eval()\'d code",
    "line" => 1,
    "function" => "init",
    "class" => "Session_Handler_Default",
    "type" => "::",
    "args" => array (
    [Empty]
    ) 
    ),
    7 => array (
    "file" => "[SYSTEM_ROOT]/core/include/mysource.inc",
    "line" => 243,
    "function" => "eval" 
    ),
    8 => array (
    "file" => "[SYSTEM_ROOT]/core/include/init.inc",
    "line" => 233,
    "function" => "init",
    "class" => "MySource",
    "type" => "->",
    "object" => new MySource Object (
    "db" => ,
    "\0*\0_db_conns" => array (
    [Max Depth Reached]
    ),
    "\0*\0_db_stack" => array (
    [Max Depth Reached]
    ),
    "\0*\0_run_level_stack" => array (
    [Max Depth Reached]
    ),
    "backend" => ,
    "am" => new Asset_Manager Object (
    [Max Depth Reached]
    ),
    "tm" => ,
    "\0*\0ms" => ,
    "\0*\0mm" => ,
    "\0*\0hh" => ,
    "\0*\0wm" => ,
    "\0*\0fv" => ,
    "\0*\0em" => ,
    "\0*\0tag_manager" => ,
    "lm" => new Locale_Manager Object (
    [Max Depth Reached]
    ),
    "\0*\0trigger_manager" => ,
    "log_manager" => ,
    "user" => ,
    "frontend_asset" => ,
    "\0*\0_user_is_root" => ,
    "\0*\0_user_is_sys_admin" => ,
    "\0*\0_user_is_public" => 1,
    "\0*\0_msgs" => ,
    "\0*\0_global_defines" =>  
    ),
    "args" => array (
    [Empty]
    ) 
    ),
    9 => array (
    "file" => "[SYSTEM_ROOT]/core/cron/run.php",
    "line" => 36,
    "args" => array (
    0 => "[SYSTEM_ROOT]/core/include/init.inc" 
    ),
    "function" => "require_once" 
    )

(Aleks Bochniak) #4

Do you have any triggers enabled?


(Duncan Robertson) #5

I'm probably not the only one, what's www.divorce-london.co.uk? :slight_smile:


(Mail) #6

[quote]
I'm probably not the only one, what's www.divorce-london.co.uk? :slight_smile:

[/quote]



lol, it's actually a site specialising in divorce, in London. By the way, not ideal but I overcome the problem by removing the email on my message rules, I don't know what the problem is but the site has been working fine otherwise.


(Tbaatar) #7

Did you find a solution to this problem?


Had similar error:


    
    *MySource Error*
    File : [SYSTEM_ROOT]/core/include/locale_manager.inc
    Line : 547
    Version : 4.0.3
    DB Type : pgsql
    
    Unable to determine host for current URL [SYS0107]



    
    ------------------------------------------------------------------
    *Current URL*
    http:///
    ------------------------------------------------------------------
    *Back Trace*
    0 => array (
       "function" => "sq_error_handler",
       "args" => array (
               0 => 256,
               1 => "Unable to determine host for current URL [SYS0107]",
               2 => "[SYSTEM_ROOT]/core/include/locale_manager.inc",
               3 => 547,
               4 => array (
                       [Max Depth Reached]
               )
       )
    ),
    1 => array (
       "file" => "[SYSTEM_ROOT]/core/include/locale_manager.inc",
       "line" => 547,
       "function" => "trigger_error",
       "args" => array (
               0 => "Unable to determine host for current URL [SYS0107]",
               1 => 256
       )
    ),
    2 => array (
       "file" => "[SYSTEM_ROOT]/core/include/general.inc",
       "line" => 1309,
       "function" => "raiseError",
       "class" => "Locale_Manager",
       "object" => new Locale_Manager Object (
               "locale_stack" => array (
                       [Max Depth Reached]
               ),
               "_strings" => array (
                       [Max Depth Reached]
               ),
               "_errors" => array (
                       [Max Depth Reached]
               ),
               "_internal_messages" => array (
                       [Max Depth Reached]
               ),
               "\0Locale_Manager\0_assets_included" => array (
                       [Max Depth Reached]
               ),
               "\0Locale_Manager\0_packages_included" => array (
                       [Max Depth Reached]
               ),
               "\0Locale_Manager\0_core_included" => array (
                       [Max Depth Reached]
               ),
               "_tmp" => array (
                       [Max Depth Reached]
               )
       ),
       "type" => "->",
       "args" => array (
               0 => "SYS0107",
               1 => 256,
               2 => array (
                       [Max Depth Reached]
               )
       )
    ),
    3 => array (
       "file" => "[SYSTEM_ROOT]/core/include/general.inc",
       "line" => 688,
       "function" => "trigger_localised_error",
       "args" => array (
               0 => "SYS0107",
               1 => 256
       )
    ),
    4 => array (
       "file" => "[SYSTEM_ROOT]/core/include/general.inc",
       "line" => 523,
       "function" => "current_url",
       "args" => array (
               0 => ,
               1 => 1
       )
    ),
    5 => array (
       "file" => "[SYSTEM_ROOT]/core/assets/system/session_handling/session_handler_types/session_handler_default/session_handler_default.inc",
       "line" => 63,
       "function" => "sq_web_path",
       "args" => array (
               0 => "root_url"
       )
    ),
    6 => array (
       "file" => "[SYSTEM_ROOT]/core/include/mysource.inc(294) : eval()\'d code",
       "line" => 1,
       "function" => "init",
       "class" => "Session_Handler_Default",
       "type" => "::",
       "args" => array (
               [Empty]
       )
    ),
    7 => array (
       "file" => "[SYSTEM_ROOT]/core/include/mysource.inc",
       "line" => 294,
       "function" => "eval"
    ),
    8 => array (
       "file" => "[SYSTEM_ROOT]/core/include/init.inc",
       "line" => 255,
       "function" => "init",
       "class" => "MySource",
       "object" => new MySource Object (
               "db" => ,
               "\0*\0_db_conns" => array (
                       [Max Depth Reached]
               ),
               "\0*\0_db_stack" => array (
                       [Max Depth Reached]
               ),
               "\0*\0_run_level_stack" => array (
                       [Max Depth Reached]
               ),
               "\0*\0_context_stack" => array (
                       [Max Depth Reached]
               ),
               "backend" => ,
               "am" => new Asset_Manager Object (
                       [Max Depth Reached]
               ),
               "tm" => ,
               "\0*\0ms" => ,
               "\0*\0mm" => ,
               "\0*\0hh" => ,
               "\0*\0wm" => ,
               "\0*\0fv" => ,
               "\0*\0em" => ,
               "\0*\0tag_manager" => ,
               "lm" => new Locale_Manager Object (
                       [Max Depth Reached]
               ),
               "\0*\0trigger_manager" => ,
               "log_manager" => ,
               "user" => ,
               "frontend_asset" => ,
               "\0*\0_user_is_root" => ,
               "\0*\0_user_is_sys_admin" => ,
               "\0*\0_user_is_public" => 1,
               "\0*\0_msgs" => ,
               "\0*\0_global_defines" => ,
               "\0*\0_deja_vu" => new Deja_Vu Object (
                       [Max Depth Reached]
               ),
               "_tmp" =>
       ),
       "type" => "->",
       "args" => array (
               [Empty]
       )
    ),
    9 => array (
       "file" => "[SYSTEM_ROOT]/core/web/index.php",
       "line" => 28,
       "args" => array (
               0 => "[SYSTEM_ROOT]/core/include/init.inc"
       ),
       "function" => "require_once"
    )




The site is running. What could the cause be?

(Duncan Robertson) #8

Bump, I was wondering if anyone knew what this was?


(Tbaatar) #9

This problem seems reoccur once every year.

 

Does anyone know why this happens and is there a way to debug it?

 

Thanks


(Nic Hubbard) #10

I get these randomly too. Across many many Matrix sites that I am the admin of. My thoughts were always that someone was trying to do something hackish on the sites. But strangely, I get a few of these at the same time, from different servers.


(Luke Wright) #11

This particular error (SYS0107 "Unable to determine host for current URL") is a pretty specific error - it happens when determining the current_url() [in general.inc], and to trigger it appears to involve

  • Not having a "Host" header in the request from the user (possible if the user is not sending a HTTP/1.1 header, which would mean a really old browser/crawler, or something the server is being instructed to fall back to HTTP/1.0 on)
  • Also not having an appropriate server name set in your server config ("ServerName" in Apache, "server_name" in nginx), as it's meant to fall back to that
  • Also not being in CLI mode (so things like scripts that run on a CLI version of PHP shouldn't trigger this, but if you accidentally run a CGI build of PHP on the command line, maybe it would trigger it?)

The latter point doesn't seem applicable on tbaatar's backtrace from 2011 (as it's entering via web/index.php) but might be possible on the OP seeing it's happening when the cron is being run. In some older distributions, "php" was set to use the CGI executable and "php-cli" to the CLI one - that may well depend on the distribution in the end.

 

I'm sorry I can't provide much more help than a general overview, but hopefully the details of how that error is triggered might provide some insight into what might be at fault.


(Tbaatar) #12

Thanks for the feedback Luke.

 

It does seem strange that all 6 different matrix builds, different versions, setup on a different dates on different server throws up the same error message within the same week.

 

As for your points:

- How would you get around the user not having the host header?

- We do have ServerName setup in Apache.

- PHP5 CLI is installed, is there anything else that need to setting it up?

 

Is there anyway other ways of debugging it? As the problem happens once or twice a year, it is extremely difficult to debug.

 

Here is an example from today:

*MySource Error*
File : [SYSTEM_ROOT]/core/include/general.inc
Line : 819
Version : 4.18.9
DB Type : pgsql

Unable to determine host for current URL [SYS0107]

User Details
IP Address: 62.75.216.19
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0

Root Urls
31.222.157.20
www.ronasailingproject.com
www.ronasailingproject.org
www.ronasailingproject.net

Current URL
http:///

Back Trace
0 => array (
“function” => “sq_error_handler”,
“args” => array (
0 => 256,
1 => “Unable to determine host for current URL [SYS0107]”,
2 => “[SYSTEM_ROOT]/core/include/locale_manager.inc”,
3 => 547,
4 => array (
[Max Depth Reached]
)
)
),
1 => array (
“file” => “[SYSTEM_ROOT]/core/include/locale_manager.inc”,
“line” => 547,
“function” => “trigger_error”,
“args” => array (
0 => “Unable to determine host for current URL [SYS0107]”,
1 => 256
)
),
2 => array (
“file” => “[SYSTEM_ROOT]/core/include/general.inc”,
“line” => 1490,
“function” => “raiseError”,
“class” => “Locale_Manager”,
“object” => new Locale_Manager Object (
“locale_stack” => array (
[Max Depth Reached]
),
“_strings” => array (
[Max Depth Reached]
),
“_errors” => array (
[Max Depth Reached]
),
“_internal_messages” => array (
[Max Depth Reached]
),
“\0Locale_Manager\0_assets_included” => array (
[Max Depth Reached]
),
“\0Locale_Manager\0_packages_included” => array (
[Max Depth Reached]
),
“\0Locale_Manager\0_core_included” => array (
[Max Depth Reached]
),
“_tmp” => array (
[Max Depth Reached]
)
),
“type” => “->”,
“args” => array (
0 => “SYS0107”,
1 => 256,
2 => array (
[Max Depth Reached]
)
)
),
3 => array (
“file” => “[SYSTEM_ROOT]/core/include/general.inc”,
“line” => 819,
“function” => “trigger_localised_error”,
“args” => array (
0 => “SYS0107”,
1 => 256
)
),
4 => array (
“file” => “[SYSTEM_ROOT]/core/include/general.inc”,
“line” => 653,
“function” => “current_url”,
“args” => array (
0 => ,
1 => 1
)
),
5 => array (
“file” => “[SYSTEM_ROOT]/core/assets/system/session_handling/session_handler_types/session_handler_default/session_handler_default.inc”,
“line” => 63,
“function” => “sq_web_path”,
“args” => array (
0 => “root_url”
)
),
6 => array (
“function” => “init”,
“class” => “Session_Handler_Default”,
“type” => “::”,
“args” => array (
[Empty]
)
),
7 => array (
“file” => “[SYSTEM_ROOT]/core/include/mysource.inc”,
“line” => 308,
“function” => “call_user_func”,
“args” => array (
0 => array (
[Max Depth Reached]
)
)
),
8 => array (
“file” => “[SYSTEM_ROOT]/core/include/init.inc”,
“line” => 290,
“function” => “init”,
“class” => “MySource”,
“object” => new MySource Object (
“db” => ,
“\0*\0_db_conns” => array (
[Max Depth Reached]
),
“\0*\0_db_stack” => array (
[Max Depth Reached]
),
“\0*\0_run_level_stack” => array (
[Max Depth Reached]
),
“\0*\0_context_stack” => array (
[Max Depth Reached]
),
“backend” => ,
“am” => new Asset_Manager Object (
[Max Depth Reached]
),
“tm” => ,
“pm” => new Performance_Manager Object (
[Max Depth Reached]
),
“\0*\0ms” => ,
“\0*\0mm” => ,
“\0*\0hh” => ,
“\0*\0wm” => ,
“\0*\0fv” => ,
“\0*\0em” => ,
“\0*\0tag_manager” => ,
“lm” => new Locale_Manager Object (
[Max Depth Reached]
),
“\0*\0trigger_manager” => ,
“log_manager” => ,
“user” => ,
“frontend_asset” => ,
“\0*\0_user_is_root” => ,
“\0*\0_user_is_sys_admin” => ,
“\0*\0_user_is_public” => 1,
“\0*\0_msgs” => ,
“\0*\0_global_defines” => ,
“\0*\0_deja_vu” => new Deja_Vu Object (
[Max Depth Reached]
),
“_tmp” =>
),
“type” => “->”,
“args” => array (
[Empty]
)
),
9 => array (
“file” => “[SYSTEM_ROOT]/core/web/index.php”,
“line” => 28,
“args” => array (
0 => “[SYSTEM_ROOT]/core/include/init.inc”
),
“function” => “require_once”
)

Thanks.


(Nic Hubbard) #13

We got these errors today too. @tbaatar - What time did yours happen at?


(Tbaatar) #14

This email error came for 2 different server at:

 

- 30 June 2015 at 02:42

- 30 June 2015 at 08:19


(Nic Hubbard) #15

Mine was at 12:38am PST.


(K Dennis) #16

We experienced the same problem with Ver 5.5.6.3, after we changed the configuration to use auto generated SSL certificate from Let’s Encrypt.

Our solution was to add the following “default.conf” file to /etc/openresty/conf.d

server {
listen xxx.xx.x.xxx:80 default_server;
return 444;
}

server {
listen xxx.xx.x.xxx:443 ssl default_server;
return 444;
}