Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Composer & Xhprof fail provisioning #1071

Closed
franz-josef-kaiser opened this issue Sep 2, 2014 · 15 comments
Closed

Composer & Xhprof fail provisioning #1071

franz-josef-kaiser opened this issue Sep 2, 2014 · 15 comments

Comments

@franz-josef-kaiser
Copy link

During provisioning, the following error(s) occur. I have no idea what the root cause could be. The thing that gives me headaches is that it seems to install Xhprof just fine, but then fails on ... something. Note, that I had to add the following to my Vagrantfile to prevent the facter fqdn not found error:

config.vm.hostname = "custom.dev"

Here's the full error incl. trace.

==> default: Notice: /Stage[main]/Puphpet::Php::Xhprof/Exec[configure xhprof]/returns: executed successfully
==> default: Error: php /usr/local/bin/composer install --no-plugins --no-scripts --no-interaction
==> default:  returned 1 instead of one of [0]
==> default: Error: /Stage[main]/Puphpet::Php::Xhprof/Composer::Exec[xhprof-composer-run]/Exec[composer_update_xhprof-composer-run]/returns: change from notrun to 0 faile
d: php /usr/local/bin/composer install --no-plugins --no-scripts --no-interaction
==> default:  returned 1 instead of one of [0]
==> default: Notice: /Stage[main]/Main/Service[php5-fpm]: Triggered 'refresh' from 1 events
==> default: Info: Class[Apache::Service]: Scheduling refresh of Service[httpd]
==> default: Notice: /Stage[main]/Main/File[/var/run/apache2/ssl_mutex]/ensure: created
==> default: Info: /Stage[main]/Main/File[/var/run/apache2/ssl_mutex]: Scheduling refresh of Service[httpd]
==> default: Notice: /Stage[main]/Apache::Service/Service[httpd]: Triggered 'refresh' from 2 events
==> default: Notice: Finished catalog run in 326.05 seconds
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

FACTER_ssh_username='vagrant' FACTER_provisioner_type='virtualbox' FACTER_vm_target_key='vagrantfile-local' puppet apply --verbose --hiera_config /vagrant/puphpet/puppet/
hiera.yaml --parser future --modulepath '/tmp/vagrant-puppet-3/modules-0:/etc/puppet/modules' --manifestdir /tmp/vagrant-puppet-3/manifests --detailed-exitcodes /tmp/vagr
ant-puppet-3/manifests/site.pp

Stdout from the command:

Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/composer/lib/facter/composer_home.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/concat/lib/facter/concat_basedir.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/epel/lib/facter/os_maj_version.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/firewall/lib/facter/ip6tables_version.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/firewall/lib/facter/iptables_persistent_version.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/firewall/lib/facter/iptables_version.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/git/lib/facter/git_exec_path.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/git/lib/facter/git_version.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/php/lib/facter/php_fact_extension_dir.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/php/lib/facter/php_fact_version.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/puppi/lib/facter/last_run.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/puppi/lib/facter/puppi_projects.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/puppi/lib/facter/windows_common_appdata.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/rabbitmq/lib/facter/rabbitmq_erlang_cookie.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/rvm/lib/facter/rvm_installed.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/rvm/lib/facter/rvm_version.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/staging/lib/facter/staging_http_get.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/staging/lib/facter/staging_windir.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/stdlib/lib/facter/facter_dot_d.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/stdlib/lib/facter/pe_version.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/stdlib/lib/facter/puppet_vardir.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/stdlib/lib/facter/root_home.rb
Notice: Compiled catalog for custom.dev in environment production in 96.35 seconds
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/composer/lib/facter/composer_home.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/concat/lib/facter/concat_basedir.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/epel/lib/facter/os_maj_version.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/firewall/lib/facter/ip6tables_version.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/firewall/lib/facter/iptables_persistent_version.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/firewall/lib/facter/iptables_version.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/git/lib/facter/git_exec_path.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/git/lib/facter/git_version.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/php/lib/facter/php_fact_extension_dir.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/php/lib/facter/php_fact_version.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/puppi/lib/facter/last_run.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/puppi/lib/facter/puppi_projects.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/puppi/lib/facter/windows_common_appdata.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/rabbitmq/lib/facter/rabbitmq_erlang_cookie.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/rvm/lib/facter/rvm_installed.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/rvm/lib/facter/rvm_version.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/staging/lib/facter/staging_http_get.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/staging/lib/facter/staging_windir.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/stdlib/lib/facter/facter_dot_d.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/stdlib/lib/facter/pe_version.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/stdlib/lib/facter/puppet_vardir.rb
Info: Loading facts in /tmp/vagrant-puppet-3/modules-0/stdlib/lib/facter/root_home.rb
Info: Applying configuration version '1409622676'
Info: /Stage[main]/Apache/File[/etc/apache2/apache2.conf]: Filebucketed /etc/apache2/apache2.conf to puppet with sum 0e11b710ff02e9333b608f365be010a9
Notice: /Stage[main]/Apache/File[/etc/apache2/apache2.conf]/content: content changed '{md5}0e11b710ff02e9333b608f365be010a9' to '{md5}d815720c3af8c425170688c680c7d628'
Info: /Stage[main]/Apache/File[/etc/apache2/apache2.conf]: Scheduling refresh of Class[Apache::Service]
Notice: /Stage[main]/Composer/Exec[download_composer]/returns: executed successfully
Info: /Stage[main]/Composer/File[/usr/local/bin/composer]: Filebucketed /usr/local/bin/composer to puppet with sum 2443b40e546727a9b51882169acf7829
Notice: /Stage[main]/Composer/File[/usr/local/bin/composer]/content: content changed '{md5}2443b40e546727a9b51882169acf7829' to '{md5}be6c2f9e983de825e900f18b20265e89'
Notice: /Stage[main]/Swap_file/Exec[Attach swap file]/returns: executed successfully
Notice: /Stage[main]/Main/Exec[dotfiles]/returns: executed successfully
Notice: /Stage[main]/Pyenv/Vcsrepo[/usr/local/pyenv]/revision: revision changed '3cde540ca00208fbfd0a5e7708c3053bc8cca9f5' to 'v0.4.0-20140404'
Notice: /Stage[main]/Main/Php_pecl_mod[pecl_http]/Puphpet::Php::Pecl[pecl_http]/Php::Pecl::Module[pecl_http]/Exec[pecl-pecl_http]/returns: executed successfully
Notice: /Stage[main]/Main/Php_mod[mysql]/Puphpet::Php::Module[mysql]/Php::Module[mysql]/Package[PhpModule_mysql]/ensure: created
Info: /Stage[main]/Main/Php_mod[mysql]/Puphpet::Php::Module[mysql]/Php::Module[mysql]/Package[PhpModule_mysql]: Scheduling refresh of Service[php5-fpm]
Notice: /Stage[main]/Puphpet::Php::Xhprof/Exec[configure xhprof]/returns: executed successfully
Notice: /Stage[main]/Main/Service[php5-fpm]: Triggered 'refresh' from 1 events
Info: Class[Apache::Service]: Scheduling refresh of Service[httpd]
Notice: /Stage[main]/Main/File[/var/run/apache2/ssl_mutex]/ensure: created
Info: /Stage[main]/Main/File[/var/run/apache2/ssl_mutex]: Scheduling refresh of Service[httpd]
Notice: /Stage[main]/Apache::Service/Service[httpd]: Triggered 'refresh' from 2 events
Notice: Finished catalog run in 326.05 seconds


Stderr from the command:

stdin: is not a tty
Error: php /usr/local/bin/composer install --no-plugins --no-scripts --no-interaction
 returned 1 instead of one of [0]
Error: /Stage[main]/Puphpet::Php::Xhprof/Composer::Exec[xhprof-composer-run]/Exec[composer_update_xhprof-composer-run]/returns: change from notrun to 0 failed: php /usr/l
ocal/bin/composer install --no-plugins --no-scripts --no-interaction
 returned 1 instead of one of [0]

The contents of the config.yaml:


---
vagrantfile-local:
    vm:
        box: puphpet/ubuntu1404-x64
        box_url: puphpet/ubuntu1404-x64
        hostname: ''
        memory: '512'
        cpus: '1'
        chosen_provider: virtualbox
        network:
            private_network: 192.168.56.101
            forwarded_port:
                Q21kPc0dU9kQ:
                    host: '8080'
                    guest: '22'
        post_up_message: ''
        provider:
            virtualbox:
                modifyvm:
                    natdnshostresolver1: on
            vmware:
                numvcpus: 1
            parallels:
                cpus: 1
        provision:
            puppet:
                manifests_path: puphpet/puppet
                manifest_file: site.pp
                module_path: puphpet/puppet/modules
                options:
                    - '--verbose'
                    - '--hiera_config /vagrant/puphpet/puppet/hiera.yaml'
                    - '--parser future'
        synced_folder:
            3O4dVs0DjVcM:
                source: ./
                target: /var/www
                sync_type: default
                rsync:
                    args:
                        - '--verbose'
                        - '--archive'
                        - '-z'
                    exclude:
                        - .vagrant/
                    auto: 'false'
        usable_port_range:
            start: 10200
            stop: 10500
    ssh:
        host: null
        port: null
        private_key_path: null
        username: vagrant
        guest_port: null
        keep_alive: true
        forward_agent: false
        forward_x11: false
        shell: 'bash -l'
    vagrant:
        host: detect
server:
    install: '1'
    packages:
        - vim
        - htop
firewall:
    install: '1'
    rules: null
apache:
    install: '1'
    settings:
        user: www-data
        group: www-data
        default_vhost: true
        manage_user: false
        manage_group: false
        sendfile: 0
    modules:
        - rewrite
    vhosts:
        Sqa6z8hf4vdf:
            servername: custom.dev
            serveraliases:
                - www.custom.dev
            docroot: /var/www/custom
            port: '80'
            setenv:
                - 'APP_ENV dev'
            override:
                - All
            options:
                - Indexes
                - FollowSymLinks
                - MultiViews
            engine: php
            custom_fragment: ''
            ssl_cert: ''
            ssl_key: ''
            ssl_chain: ''
            ssl_certs_dir: ''
    mod_pagespeed: 0
nginx:
    install: '0'
    settings:
        default_vhost: 1
        proxy_buffer_size: 128k
        proxy_buffers: '4 256k'
    vhosts:
        F8wBe6wfdKRp:
            server_name: awesome.dev
            server_aliases:
                - www.awesome.dev
            www_root: /var/www/awesome
            listen_port: '80'
            location: \.php$
            index_files:
                - index.html
                - index.htm
                - index.php
            envvars:
                - 'APP_ENV dev'
            engine: php
            ssl_cert: ''
            ssl_key: ''
php:
    install: '1'
    version: '55'
    composer: '1'
    composer_home: ''
    modules:
        php:
            - cli
            - curl
            - fpm
            - gd
            - imagick
            - intl
            - mbstring
            - mcrypt
            - memcache
            - memcached
            - mysql
            - xcache
            - xmlrpc
        pear: {  }
        pecl:
            - pecl_http
    ini:
        display_errors: On
        error_reporting: '-1'
        session.save_path: /var/lib/php/session
    timezone: Europe/Vienna
    mod_php: 0
hhvm:
    install: '0'
    nightly: 0
    composer: '1'
    composer_home: ''
    settings:
        host: 127.0.0.1
        port: '9000'
    ini:
        display_errors: On
        error_reporting: '-1'
    timezone: null
xdebug:
    install: '1'
    settings:
        xdebug.default_enable: '1'
        xdebug.remote_autostart: '0'
        xdebug.remote_connect_back: '1'
        xdebug.remote_enable: '1'
        xdebug.remote_handler: dbgp
        xdebug.remote_port: '9000'
xhprof:
    install: '1'
drush:
    install: '0'
    version: 6.3.0
ruby:
    install: '1'
    versions:
        QIXUemsIIgpR:
            version: ''
nodejs:
    install: '0'
    npm_packages: {  }
python:
    install: '1'
    packages: {  }
    versions:
        z02TgOtWIjMM:
            version: ''
mysql:
    install: '1'
    root_password: root
    adminer: '1'
    databases:
        Opoa8oX70pav:
            grant:
                - ALL
            name: app
            host: localhost
            user: admin
            password: admin
            sql_file: ''
postgresql:
    install: '0'
    settings:
        root_password: '123'
        user_group: postgres
        encoding: UTF8
        version: '9.3'
    databases: {  }
    adminer: 0
mariadb:
    install: '0'
    root_password: '123'
    adminer: 0
    databases: {  }
    version: '10.0'
sqlite:
    install: '0'
    adminer: 0
    databases: {  }
mongodb:
    install: '0'
    settings:
        auth: 1
        port: '27017'
    databases: {  }
redis:
    install: '0'
    settings:
        conf_port: '6379'
mailcatcher:
    install: '0'
    settings:
        smtp_ip: 0.0.0.0
        smtp_port: 1025
        http_ip: 0.0.0.0
        http_port: '1080'
        mailcatcher_path: /usr/local/rvm/wrappers/default
        from_email_method: inline
beanstalkd:
    install: '0'
    settings:
        listenaddress: 0.0.0.0
        listenport: '13000'
        maxjobsize: '65535'
        maxconnections: '1024'
        binlogdir: /var/lib/beanstalkd/binlog
        binlogfsync: null
        binlogsize: '10485760'
    beanstalk_console: 0
    binlogdir: /var/lib/beanstalkd/binlog
rabbitmq:
    install: '0'
    settings:
        port: '5672'
elastic_search:
    install: '0'
    settings:
        java_install: true
        autoupgrade: true
@kusmierz
Copy link

kusmierz commented Sep 2, 2014

This is because phacility/xhprof has removed composer.json support. See phacility/xhprof@e3df210 and phacility/xhprof#40

@franz-josef-kaiser
Copy link
Author

What a drama... oh. my. god.

Still something should be done as it breaks the build.

@pfuhrmann
Copy link

+1 getting same error. Don't understand why they removed composer in the first place...

@lox
Copy link

lox commented Sep 8, 2014

Fwiw I'm maintaining a fork at https://github.com/lox/xhprof, which is what https://packagist.org/packages/facebook/xhprof presently points to. When they come to their senses I'll redirect to the "official" package.

@pfuhrmann
Copy link

Haha. Thanks @lox. I will use your fork for the time being.

@franz-josef-kaiser
Copy link
Author

@lox Thanks for taking this burden on you... as long as composer is so incredibly "unsafe" to use.

@donatj
Copy link

donatj commented Sep 8, 2014

👍 to @lox for being so logical unlike some.

@brainvial
Copy link

what changes do i need to make to config.yaml to use lox's fork?

@kusmierz
Copy link

kusmierz commented Sep 9, 2014

Unfortunately puphet uses regular git clone instead composer. See here: https://github.com/puphpet/puppet-puphpet/blob/049e28a9c4232b30d8ed957eb980889f7ad08646/manifests/php/xhprof.pp#L15

You can change source link in puphpet/puppet/modules/puphpet/manifests/php/xhprof.pp:15 to lox's one - https://github.com/lox/xhprof.git or ask @jtreminio to change it in source file :)

@pfuhrmann
Copy link

Probably would be better if @jtreminio can change it or somebody could make an 'official' updated puphpet fork for the time being. This situation with composer is still ridiculous...

@brainvial
Copy link

Thanks. I'll just do manual installs for now until jtreminio fixes puphpet.

@heyyoyo
Copy link

heyyoyo commented Nov 23, 2014

I still have this error even after editing the source link of xhprof with fork repo and recreating the vm with vagrant up. Did I miss something ?

Does this work wit php-fpm 5.6 or only with php-fpm 5.5 ?

==> default: Notice: /Stage[main]/Puphpet::Php::Xhprof/Exec[configure xhprof]/returns: executed successfully
==> default: Error: php /usr/local/bin/composer install --no-plugins --no-scripts --no-interaction
==> default: returned 1 instead of one of [0]
==> default: Error: /Stage[main]/Puphpet::Php::Xhprof/Composer::Exec[xhprof-composer-run]/Exec[composer_update_xhprof-composer-run]/returns: change from notrun to 0 failed: php /usr/local/bin/composer install --no-plugins --no-scripts --no-interaction
==> default: returned 1 instead of one of [0]

@joscandreu
Copy link

The workaround mentioned by @kusmierz is not working as of today. Maybe I'm missing something other than that change. I'm in the same situation as @heyyoyo
Should I go and handle this via a manual install? It's been a while since this happened and it seems there is no official update on this.

@marcosgdf
Copy link

Same happens to me.

@jtreminio
Copy link
Member

Fixed in #1411

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants