Giter Site home page Giter Site logo

Comments (11)

lnxbil avatar lnxbil commented on June 2, 2024

The main problems - at least in my experience - come from the used OS. Can you please enable debug and state all arguments (mask sensitive information properly) you used to try?

from docker-machine-driver-proxmox-ve.

onegreyonewhite avatar onegreyonewhite commented on June 2, 2024

Output:

$ ./pve-machine.sh 
Docker Machine Version:  0.13.0, build 
Found binary path at /home/grey/.local/bin/docker-machine-driver-proxmox-ve
Launching plugin server for driver proxmox-ve
Plugin server listening at address 127.0.0.1:46835
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
(flag-lookup) Calling .DriverName
(flag-lookup) Calling .GetCreateFlags
Found binary path at /home/grey/.local/bin/docker-machine-driver-proxmox-ve
Launching plugin server for driver proxmox-ve
Plugin server listening at address 127.0.0.1:43655
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(boot2docker) Calling .GetMachineName
(boot2docker) Calling .DriverName
(boot2docker) Calling .GetCreateFlags
(boot2docker) Calling .SetConfigFromFlags
Creating CA: /home/grey/.docker/machine/certs/ca.pem
Creating client certificate: /home/grey/.docker/machine/certs/cert.pem
Running pre-create checks...
(boot2docker) Calling .PreCreateCheck
Error with pre-create check: "unexpected end of JSON input"
notifying bugsnag: [Error with pre-create check: "unexpected end of JSON input"]

Script:

#!/bin/bash

PVE_NODE="cloud.domain.lan"
PVE_HOST="$PVE_NODE"
PVE_USER="root"
PVE_MEMORY=4
PVE_REALM="pam"
PVE_PASSWD="PASSWORD"
PVE_POOL="rancher"
PVE_STORAGE="local-lvm-thinpool"
PVE_STORAGE_TYPE="RAW"
PVE_IMAGE_FILE="isos:iso/boot2docker.iso"
VM_NAME="boot2docker"

docker-machine rm --force $VM_NAME >/dev/null 2>&1 || true

docker-machine --debug \
    create \
    --driver proxmox-ve \
    --proxmox-host $PVE_HOST \
    --proxmox-user $PVE_USER \
    --proxmox-realm $PVE_REALM \
    --proxmox-password $PVE_PASSWD \
    --proxmox-node $PVE_NODE \
    --proxmox-memory-gb $PVE_MEMORY \
    --proxmox-image-file "$PVE_IMAGE_FILE" \
    --proxmox-storage $PVE_STORAGE \
    --proxmox-pool $PVE_POOL \
    --proxmox-storage-type $PVE_STORAGE_TYPE \
    $* \
    $VM_NAME || exit 1

eval $(docker-machine env boot2docker) || exit 1

docker ps || exit 1

OS:

$ uname -a
Linux onegreyonewhite 5.3.10-calculate #1 SMP PREEMPT Mon Nov 11 11:18:18 UTC 2019 x86_64 Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz GenuineIntel GNU/Linux
$ cat /etc/gentoo-release 
Calculate Linux Desktop 18.12 KDE

from docker-machine-driver-proxmox-ve.

lnxbil avatar lnxbil commented on June 2, 2024

Thank you. From where did you download the boot2docker.iso image?

from docker-machine-driver-proxmox-ve.

lnxbil avatar lnxbil commented on June 2, 2024

Please also enable the resty debug flag --proxmox-resty-debug for the driver so that the API communication is also printed (be careful in posting, credentials are readable in clear text).

from docker-machine-driver-proxmox-ve.

lnxbil avatar lnxbil commented on June 2, 2024

So, just released a new version with polishes the error handling and is exclusively focussed on RancherOS and works out-of-the-box with the recent RancherOS version for PVE. I also tried it with PVE 6.0-15.

Please try the new version with the RancherOS iso.

from docker-machine-driver-proxmox-ve.

onegreyonewhite avatar onegreyonewhite commented on June 2, 2024

I found cert error. It may be main problem. Maybe there is some kind of flag that disables certificate verification?

$ ./pve-machine.sh      
Docker Machine Version:  0.13.0, build 
Found binary path at /home/grey/.local/bin/docker-machine-driver-proxmox-ve
Launching plugin server for driver proxmox-ve
Plugin server listening at address 127.0.0.1:32955
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
(flag-lookup) Calling .DriverName
(flag-lookup) Calling .GetCreateFlags
Found binary path at /home/grey/.local/bin/docker-machine-driver-proxmox-ve
Launching plugin server for driver proxmox-ve
Plugin server listening at address 127.0.0.1:37211
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(rancheros-autoformat) Calling .GetMachineName
(rancheros-autoformat) Calling .DriverName
(rancheros-autoformat) Calling .GetCreateFlags
(rancheros-autoformat) Calling .SetConfigFromFlags
Running pre-create checks...
(rancheros-autoformat) Calling .PreCreateCheck
(rancheros-autoformat) DBG | RESTY 2019/11/27 14:23:42 
(rancheros-autoformat) DBG | ---------------------- REQUEST LOG -----------------------
(rancheros-autoformat) DBG | GET  /api2/json/cluster/nextid  HTTP/1.1
(rancheros-autoformat) DBG | HOST   : cloud.domain.lan:8006
(rancheros-autoformat) DBG | HEADERS:
(rancheros-autoformat) DBG |       Csrfpreventiontoken: somecookie
(rancheros-autoformat) DBG |                User-Agent: go-resty v1.3 - https://github.com/go-resty/resty
(rancheros-autoformat) DBG |                    Cookie: PVEAuthCookie=PVE:root@pam:somecookie
(rancheros-autoformat) DBG | BODY   :
(rancheros-autoformat) DBG | ***** NO CONTENT *****
(rancheros-autoformat) DBG | ----------------------------------------------------------
(rancheros-autoformat) DBG | RESTY 2019/11/27 14:23:42 
(rancheros-autoformat) DBG | ---------------------- RESPONSE LOG -----------------------
(rancheros-autoformat) DBG | STATUS             : 200 OK
(rancheros-autoformat) DBG | RECEIVED AT        : 2019-11-27T14:23:42.446113887+10:00
(rancheros-autoformat) DBG | RESPONSE TIME      : 2.189639ms
(rancheros-autoformat) DBG | HEADERS:
(rancheros-autoformat) DBG |                           Date: Wed, 27 Nov 2019 04:23:42 GMT
(rancheros-autoformat) DBG |                         Pragma: no-cache
(rancheros-autoformat) DBG |                         Server: pve-api-daemon/3.0
(rancheros-autoformat) DBG |                 Content-Length: 14
(rancheros-autoformat) DBG |                   Content-Type: application/json;charset=UTF-8
(rancheros-autoformat) DBG |                        Expires: Wed, 27 Nov 2019 04:23:42 GMT
(rancheros-autoformat) DBG |                  Cache-Control: max-age=0
(rancheros-autoformat) DBG |                     Connection: Keep-Alive
(rancheros-autoformat) DBG | BODY   :
(rancheros-autoformat) DBG | {
(rancheros-autoformat) DBG |    "data": "106"
(rancheros-autoformat) DBG | }
(rancheros-autoformat) DBG | ----------------------------------------------------------
(rancheros-autoformat) DBG | RESTY 2019/11/27 14:23:42 
(rancheros-autoformat) DBG | ---------------------- REQUEST LOG -----------------------
(rancheros-autoformat) DBG | GET  /api2/json/nodes/cloud.domain.lan/storage  HTTP/1.1
(rancheros-autoformat) DBG | HOST   : cloud.domain.lan:8006
(rancheros-autoformat) DBG | HEADERS:
(rancheros-autoformat) DBG |                    Cookie: PVEAuthCookie=PVE:root@pam:somecookie
(rancheros-autoformat) DBG |                User-Agent: go-resty v1.3 - https://github.com/go-resty/resty
(rancheros-autoformat) DBG | BODY   :
(rancheros-autoformat) DBG | ***** NO CONTENT *****
(rancheros-autoformat) DBG | ----------------------------------------------------------
(rancheros-autoformat) DBG | RESTY 2019/11/27 14:23:42 
(rancheros-autoformat) DBG | ---------------------- RESPONSE LOG -----------------------
(rancheros-autoformat) DBG | STATUS             : 596 tls_process_server_certificate: certificate verify failed
(rancheros-autoformat) DBG | RECEIVED AT        : 2019-11-27T14:23:42.457038372+10:00
(rancheros-autoformat) DBG | RESPONSE TIME      : 10.744867ms
(rancheros-autoformat) DBG | HEADERS:
(rancheros-autoformat) DBG |                        Expires: Wed, 27 Nov 2019 04:23:42 GMT
(rancheros-autoformat) DBG |                  Cache-Control: max-age=0
(rancheros-autoformat) DBG |                           Date: Wed, 27 Nov 2019 04:23:42 GMT
(rancheros-autoformat) DBG |                         Pragma: no-cache
(rancheros-autoformat) DBG |                         Server: pve-api-daemon/3.0
(rancheros-autoformat) DBG | BODY   :
(rancheros-autoformat) DBG | 
(rancheros-autoformat) DBG | ----------------------------------------------------------
Error with pre-create check: "unexpected end of JSON input"
notifying bugsnag: [Error with pre-create check: "unexpected end of JSON input"]

from docker-machine-driver-proxmox-ve.

lnxbil avatar lnxbil commented on June 2, 2024

Oh, that is strange indeed. I do not have a working certificate in my test environment either, but it works as it should. The validation is already skipped, so it has to be another certificate related issue like expired, wrong hostname, etc.

from docker-machine-driver-proxmox-ve.

onegreyonewhite avatar onegreyonewhite commented on June 2, 2024

Expiration date in 2029 and hostname is valid - I have checked it.

from docker-machine-driver-proxmox-ve.

lnxbil avatar lnxbil commented on June 2, 2024

It is also strange that some API calls work only the last one does not with the tls_process_server_certificate. AFAIK, the connection is never closed, so there should not be a revalidation Have you looked at the server side, maybe some stange error is reported there.

The DBG in the beginning suggests, that you're not using v2, is this correct?

from docker-machine-driver-proxmox-ve.

onegreyonewhite avatar onegreyonewhite commented on June 2, 2024

I found problem!
I GUI node-name is cloud.domain.lan but in API node-name is just a cloud. Changing PVE_NODE='cloud' solves this problem.
ThanX for your help.

from docker-machine-driver-proxmox-ve.

lnxbil avatar lnxbil commented on June 2, 2024

Glad it worked out.

from docker-machine-driver-proxmox-ve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.