Fatal error: Uncaught exception 'Phalcon\Mvc\Dispatcher\Exception'with message 'Action 'route404' was not found on handler


#1

I’m getting an error when trying to run bootstrap:

$ knife bootstrap --run-list “role[haproxy]” --json-attributes “{“haproxy”: {“server_name”: “haproxy01.st.example.com”}}” --ssh-user root haproxy01.st.example.com

The command fails, because all cookbook files on the client are 544 byte files with the following content
(below, for /var/chef/cache/cookbooks/build-essential/libraries/matchers.rb):

Fatal error: Uncaught exception ‘Phalcon\Mvc\Dispatcher\Exception’ with message ‘Action ‘route404’ was not found on handler ‘index’’ in /var/www/cysoco/public/index.php:127
Stack trace:
#0 [internal function]: Phalcon\Mvc\Dispatcher->_throwDispatchException('Action ‘route40…’, 5)
#1 [internal function]: Phalcon\Dispatcher->dispatch()
#2 /var/www/cysoco/public/index.php(127): Phalcon\Mvc\Application->handle()
#3 /var/www/cysoco/public/index.php(134): Application->main()
#4 {main}
thrown in /var/www/cysoco/public/index.php on line 127

Knife bootstrap doesn’t complain when uploading it, but of course breaks when trying to compile a broken file:

(…)
haproxy01.st.exaple.com Starting Chef Client, version 11.12.2
haproxy01.st.example.com resolving cookbooks for run list: [“haproxy”]
haproxy01.st.example.com Synchronizing Cookbooks:
haproxy01.st.example.com - build-essential
haproxy01.st.example.com - cpu
haproxy01.st.example.com - haproxy
haproxy01.st.example.com Compiling Cookbooks…
haproxy01.st.example.com
haproxy01.st.example.com ================================================================================
haproxy01.st.example.com Recipe Compile Error in /var/chef/cache/cookbooks/build-essential/libraries/matchers.rb
haproxy01.st.example.com ================================================================================
haproxy01.st.example.com
haproxy01.st.example.com
haproxy01.st.example.com SyntaxError
haproxy01.st.example.com -----------
haproxy01.st.example.com /var/chef/cache/cookbooks/build-essential/libraries/matchers.rb:2: syntax error, unexpected tIDENTIFIER, expecting keyword_do or ‘{’ or ‘(’

On my worstation side, the file looks fine:

$ cat cookbooks/build-essential/libraries/matchers.rb
if defined?(ChefSpec)
def install_xcode_command_line_tools(resource_name)
ChefSpec::Matchers::ResourceMatcher.new(:xcode_command_line_tools, :install, resource_name)
end
end

Any ideas why this breaks?

I’m using this on workstation and client:

$ dpkg -l|grep chef
ii chef 11.12.2-1 amd64 The full stack of chef

Server has this installed:

dpkg -l|grep chef

ii chef-server 11.0.12-1.ubuntu.12.04 The full stack of chef-server


Tomasz Chmielewski
http://wpkg.org


#2

Replying to myself - this client had DNS issues and was trying to fetch
content from a wrong server.


Tomasz Chmielewski
http://wpkg.org

On Tue, 15 Apr 2014 14:51:13 +0100
Tomasz Chmielewski tch@wpkg.org wrote:

I’m getting an error when trying to run bootstrap:

$ knife bootstrap --run-list “role[haproxy]” --json-attributes
"{“haproxy”: {“server_name”: “haproxy01.st.example.com”}}"
–ssh-user root haproxy01.st.example.com

The command fails, because all cookbook files on the client are 544
byte files with the following content (below,
for /var/chef/cache/cookbooks/build-essential/libraries/matchers.rb):

Fatal error: Uncaught exception 'Phalcon\Mvc\Dispatcher\Exception’
with message 'Action ‘route404’ was not found on handler ‘index’'
in /var/www/cysoco/public/index.php:127 Stack trace: #0 [internal
function]: Phalcon\Mvc\Dispatcher->_throwDispatchException(‘Action
’route40…’, 5) #1 [internal function]:
Phalcon\Dispatcher->dispatch()
#2 /var/www/cysoco/public/index.php(127):
Phalcon\Mvc\Application->handle()
#3 /var/www/cysoco/public/index.php(134): Application->main() #4
{main} thrown in /var/www/cysoco/public/index.php on line 127

Knife bootstrap doesn’t complain when uploading it, but of course
breaks when trying to compile a broken file:

(…)
haproxy01.st.exaple.com Starting Chef Client, version 11.12.2
haproxy01.st.example.com resolving cookbooks for run list: [“haproxy”]
haproxy01.st.example.com Synchronizing Cookbooks:
haproxy01.st.example.com - build-essential
haproxy01.st.example.com - cpu
haproxy01.st.example.com - haproxy
haproxy01.st.example.com Compiling Cookbooks…
haproxy01.st.example.com
haproxy01.st.example.com

haproxy01.st.example.com Recipe Compile Error
in /var/chef/cache/cookbooks/build-essential/libraries/matchers.rb
haproxy01.st.example.com

haproxy01.st.example.com haproxy01.st.example.com
haproxy01.st.example.com SyntaxError haproxy01.st.example.com

haproxy01.st.example.com /var/chef/cache/cookbooks/build-essential/libraries/matchers.rb:2:
syntax error, unexpected tIDENTIFIER, expecting keyword_do or ‘{’ or
’(’

On my worstation side, the file looks fine:

$ cat cookbooks/build-essential/libraries/matchers.rb
if defined?(ChefSpec)
def install_xcode_command_line_tools(resource_name)
ChefSpec::Matchers::ResourceMatcher.new(:xcode_command_line_tools, :install,
resource_name) end
end

Any ideas why this breaks?

I’m using this on workstation and client:

$ dpkg -l|grep chef
ii chef
11.12.2-1 amd64 The
full stack of chef

Server has this installed:

dpkg -l|grep chef

ii chef-server
11.0.12-1.ubuntu.12.04 The full stack of chef-server


Tomasz Chmielewski