Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with PECL and PEAR behind proxy #117

Open
palexGit opened this issue Apr 7, 2015 · 7 comments
Open

Problem with PECL and PEAR behind proxy #117

palexGit opened this issue Apr 7, 2015 · 7 comments

Comments

@palexGit
Copy link

palexGit commented Apr 7, 2015

Hello all, and please scuse me for my english.

Well i got a problem configuring my vagrant (with puphpet) behind my compagny proxy. I use the vagrant-proxyconf plugin. But i have this error :

default: Error: /Stage[main]/Puphpet::Nodejs/Exec[install-node]/returns: change from notrun to 0 failed: /.puphpet-stuff/node_install.sh returned 1 instead of one of [0]

or

==> default: Error: printf "\\n" | pecl -d preferred_state=stable install uuid returned 1 instead of one of [0]
    ==> default: Error: /Stage[main]/Main/Puphpet::Php::Pecl[uuid]/Php::Pecl::Module[uuid]/Exec[pecl-uuid]/returns: change from notrun to 0 failed: printf "\\n" | pecl -d 

etc..

I don't understand what's wrong.
Let see my config.yaml
<---
vagrantfile-local:
    vm:
        box: puphpet/debian75-x64
        box_url: puphpet/debian75-x64
        hostname: ''
        memory: '1024'
        cpus: '1'
        chosen_provider: virtualbox
        network:
            private_network: 192.168.56.101
            forwarded_port:
                iE80WwC030mP:
                    host: '6445'
                    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:
            a4KgyKGkJhcs:
                owner: www-data
                group: www-data
                source: 'e:\sites'
                target: /var/www/local.dev
                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
users_groups:
    install: '1'
    groups:
        - www-data
    users:
        - www-data
cron:
    install: '1'
    jobs: {  }
firewall:
    install: '1'
    rules: {  }
apache:
    install: '1'
    settings:
        user: www-data
        group: www-data
        default_vhost: true
        manage_user: false
        manage_group: false
        sendfile: 0
    modules:
        - proxy_fcgi
        - rewrite
    vhosts:
        qx0al9h9q5m0:
            servername: local.dev
            serveraliases:
                - local.dev
            docroot: /var/www/local.dev
            port: '80'
            setenv:
                - 'APP_ENV dev'
            custom_fragment: ''
            directories:
                tbp589u2ofui:
                    provider: directory
                    path: /var/www/local.dev
                    options:
                        - Indexes
                        - FollowSymlinks
                        - MultiViews
                    allow_override:
                        - All
                    require:
                        - 'all granted'
                    custom_fragment: ''
                    files_match:
                        ceggheaait09:
                            provider: filesmatch
                            path: \.php$
                            sethandler: 'proxy:fcgi://127.0.0.1:9000'
                            custom_fragment: ''
            ssl_cert: ''
            ssl_key: ''
            ssl_chain: ''
            ssl_certs_dir: ''
nginx:
    install: '0'
    settings:
        default_vhost: 1
        proxy_buffer_size: 128k
        proxy_buffers: '4 256k'
    upstreams: {  }
    vhosts:
        obxluyyvyzmw:
            proxy: ''
            server_name: awesome.dev
            server_aliases:
                - www.awesome.dev
            www_root: /var/www/awesome
            listen_port: '80'
            index_files:
                - index.html
                - index.htm
                - index.php
            client_max_body_size: 1m
            locations:
                uejfixoiwfjs:
                    location: /
                    try_files:
                        - $uri
                        - $uri/
                        - index.php
                    fastcgi: ''
                    fastcgi_index: ''
                    fastcgi_split_path: ''
                gjuvzuirqkjc:
                    location: '~ \.php$'
                    try_files:
                        - $uri
                        - $uri/
                        - index.php
                        - /index.php$is_args$args
                    fastcgi: '127.0.0.1:9000'
                    fastcgi_index: index.php
                    fastcgi_split_path: '^(.+\.php)(/.*)$'
                    fast_cgi_params_extra:
                        - 'SCRIPT_FILENAME $request_filename'
                        - 'APP_ENV dev'
            ssl_cert: ''
            ssl_key: ''
            ssl_port: '443'
php:
    install: '1'
    settings:
        version: '56'
    fpm_settings:
        port: 9000
    composer: '1'
    composer_home: ''
    modules:
        php:
            - cli
            - intl
            - mcrypt
        pear: {  }
        pecl:
            - timezonedb
            - uuid
            - yaml
            - igbinary
            - scrypt
            - PDO
            - pecl_http
    ini:
        display_errors: On
        error_reporting: '-1'
        session.save_path: /var/lib/php/session
        date.timezone: UTC
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: '0'
wpcli:
    install: '0'
    version: v0.17.1
drush:
    install: '0'
    version: 6.3.0
ruby:
    install: '1'
    versions: {  }
nodejs:
    install: '1'
    npm_packages: {  }
python:
    install: '1'
    packages: {  }
    versions: {  }
mysql:
    install: '1'
    settings:
        version: '5.6'
        root_password: root
        override_options: {  }
    adminer: 0
    users: {  }
    databases: {  }
    grants: {  }
postgresql:
    install: '0'
    settings:
        global:
            encoding: UTF8
            version: '9.3'
        server:
            postgres_password: '123'
    databases: {  }
    users: {  }
    grants: {  }
    adminer: 0
sqlite:
    install: '0'
    adminer: 0
    databases: {  }
mongodb:
    install: '0'
    settings:
        auth: 1
        bind_ip: 127.0.0.1
        port: '27017'
    databases: {  }
redis:
    install: '0'
    settings:
        conf_port: '6379'
mailcatcher:
    install: '1'
    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'
    users: {  }
    vhosts: {  }
    plugins: {  }
elastic_search:
    install: '1'
    settings:
        version: 1.4.1
        java_install: true
solr:
    install: '0'
    settings:
        version: 4.10.2
        port: '8984'

and the vagrantfile configuration :

.../...
data = configValues['vagrantfile-local']

Vagrant.require_version '>= 1.6.0'

Vagrant.configure('2') do |config|
  if Vagrant.has_plugin?("vagrant-proxyconf")
    config.proxy.http = "http://192.150.10.2:8000"
    config.proxy.https  = "http://192.150.10.2:8000"
    config.proxy.ftp  = "http://192.150.10.2:8000"
    config.proxy.no_proxy = "localhost,127.0.0.1"
    config.apt_proxy.http =  "http://192.150.10.2:8000"
  end 
  config.vm.box     = "#{data['vm']['box']}"
  config.vm.box_url = "#{data['vm']['box_url']}"

  if data['vm']['hostname'].to_s.strip.length != 0
    config.vm.hostname = "#{data['vm']['hostname']}"
  end
.../..

Can you help me ?
thanks for all

@otahi
Copy link
Collaborator

otahi commented Apr 7, 2015

I am not familiar with PHP, puphpet, PECL, and so on. If you can describe the phenomenon correctly, you will get the correct answer.

I want to know following information at first:

  1. which OS
  2. which vagrant version
  3. which vagrant-proxyconf version
  4. log which you run the vagrant(you can put it on Gist)
  5. what is the smallest set which can reproduce phenomenon

Now, I don't understand what you see. Please describe what you see 😄

@palexGit
Copy link
Author

palexGit commented Apr 8, 2015

OK

  1. My OS is a Win7 professional 64 bits
  2. I use VirtualBox 4.3.26r98988
  3. Vagrant 1.7.2
  4. Vagrant-proxyconf 1.5.0
  5. the machine is a Debian 7.5 64bits

To create this configuration i use Puphpet.
You can find all the logs and docs here

When i use this configuration not behind my company all is ok and the vagrant runs good.

But behind the proxy, i've some problems with PEAR and PECL. I don't understand why. I guess PEAR and PECL don't find my proxy to go out

@otahi
Copy link
Collaborator

otahi commented Apr 8, 2015

@palexGit Thank you for your giving information! But it is huge. Can you provide the smallest scripts and configuration which can reproduce this phenomenon.

@palexGit
Copy link
Author

palexGit commented Apr 9, 2015

Hi Otahi,

I 've updated my error log and put just the kinds of error i have.

For me VagrandFile is ok. I read the vagrant-proxyconf's doc . So i think there is no problem inside.

For the config.yaml, if there is a bug, it is between line 127 to 159 ( in the php configuration).

@palexGit
Copy link
Author

palexGit commented Apr 9, 2015

I' tried to built my VM without PECL and it's OK.
Finally, the problem is between my proxy and PECL. PEAR is ok too

@palexGit
Copy link
Author

No ideas ?

@otahi
Copy link
Collaborator

otahi commented Apr 13, 2015

Sorry, I don't understand PEAR and PECL, and have much time to dig deeper.

I found this puphpet/puphpet#768 .
Does it make sense?

If PECL is not installed at the beginning, vagrant-proxyconf will pass http_proxy when vagrant reload --provision.

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

No branches or pull requests

2 participants