GithubHelp home page GithubHelp logo

Comments (9)

eknori avatar eknori commented on June 23, 2024 1

AHHHHH. Got it

`curl -v -X POST http://192.168.178.137:443/register

  • About to connect() to 192.168.178.137 port 443 (#0)
  • Trying 192.168.178.137...
  • Connected to 192.168.178.137 (192.168.178.137) port 443 (#0)

POST /register HTTP/1.1
User-Agent: curl/7.29.0
Host: 192.168.178.137:443
Accept: /

< HTTP/1.1 201 Created
< Content-Type: application/json; charset=UTF-8
< Vary: Origin
< Date: Mon, 11 Sep 2017 16:00:32 GMT
< Content-Length: 243
<

  • Connection #0 to host 192.168.178.137 left intact
    {"allowfrom":[],"fulldomain":"935a8902-cf96-4a65-90b6-132076192af0.eknori.blogsite.org","password":"zWEhjPvYHC0rZffY3NFqZYuAugF9DWwpnfMT2_Sh","subdomain":"935a8902-cf96-4a6
    5-90b6-132076192af0","username":"5c50d03f-71c5-49a5-bba5-c48ba5a1a9ad"}[root@docker dns]# `

from acme-dns.

joohoi avatar joohoi commented on June 23, 2024 1

Closing the issue as resolved. If you run into other problems while installing, feel free to open new issue!

from acme-dns.

joohoi avatar joohoi commented on June 23, 2024

Unfortunately I'm unavailable to reproduce the problem. Could you post the HTTP request you are sending in?

Does this work:
curl -X GET http://your-container-ip:443/register
how about:
curl -X POST http://your-container-ip:443/register --data '{"allowfrom": ["127.0.0.1/32"]}'

from acme-dns.

eknori avatar eknori commented on June 23, 2024

I have tried a couple of POST /GET but no success

`root@docker ~]# curl -s -X POST https://eknori.blogsite.org:443/register |python -m json.tool

No JSON object could be decoded

[root@docker ~]# curl -s -X POST https://eknori.blogsite.org/register |python -m json.tool
No JSON object could be decoded

[root@docker ~]# curl -s -X POST https://192.168.178.137/register |python -m json.tool
No JSON object could be decoded

[root@docker ~]# curl -s -X POST https://192.168.178.137:443/register |python -m json.tool
No JSON object could be decoded

[root@docker ~]# curl -s -X POST https://192.168.178.137:443/register --data '{"allowfrom": ["127.0.0.1/32"]}' |python -m json.tool

No JSON object could be decoded
[root@docker ~]# curl -s -X POST https://192.168.178.137:443/register --data '{"allowfrom": ["127.0.0.1/32"]}'

[root@docker ~]# curl -X POST https://192.168.178.137:443/register --data '{"allowfrom": ["127.0.0.1/32"]}'
curl: (35) SSL received a record that exceeded the maximum permissible length.

[root@docker ~]# curl -X GET https://192.168.178.137:443/register --data '{"allowfrom": ["127.0.0.1/32"]}'
curl: (35) SSL received a record that exceeded the maximum permissible length.

[root@docker ~]# curl -X POST https://eknori.blogsite.org/register |python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 167 100 167 0 0 826 0 --:--:-- --:--:-- --:--:-- 830
No JSON object could be decoded

[root@docker ~]# curl -X GET https://eknori.blogsite.org/register |python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 159 100 159 0 0 1121 0 --:--:-- --:--:-- --:--:-- 1127
No JSON object could be decoded
[root@docker ~]# `

from acme-dns.

joohoi avatar joohoi commented on June 23, 2024

Ah, I see. The "No JSON object could be decoded" - message is printed by Python, indicating that it recieved anything but a JSON object. To help with debugging, try leaving the |python -m json.tool out, all it does is pretty printing after all.

What comes to the underlying error, I guess curl tries to communicate with acme-dns using HTTPS, but acme-dns configuration value means that it speaks plain HTTP:

 # possible values: "letsencrypt", "cert", "none"
 tls = "none"

I suggest testing it out with:
curl -X POST http://eknori.blogsite.org:443/register
note http substitution in the protocol part of the URL.

from acme-dns.

eknori avatar eknori commented on June 23, 2024

sorry, does not work either. I have also tried with port 80 exposed, but it gives me
curl: (7) Failed connect to 192.168.178.137:80; Connection refused

So, I think, that I'l have to create a self signed cert and retry with that.

what I got from my latest tests is

`[root@docker ~]# curl -X POST https://eknori.blogsite.org/register

<TITLE>Unable to Process Request</TITLE>

Http Status Code: 404

Reason: Unable to process request, resource not found

[root @docker ~]# curl -X POST https://eknori.blogsite.org/register <TITLE>Unable to Process Request</TITLE>

Http Status Code: 404

Reason: Unable to process request, resource not found

[root @docker ~]# curl -X GET https://eknori.blogsite.org/register <TITLE>Unable to Process Request</TITLE>

Http Status Code: 404

Reason: File not found or unable to read file

[root@docker ~]# curl -X POST http://eknori.blogsite.org:443/register curl: (52) Empty reply from server`

Looks like acme-dns is looking for the files in /etc/tls but cannot find any.

from acme-dns.

joohoi avatar joohoi commented on June 23, 2024

Unfortunately this looks like some other service answering the requests, you might be able to get more information from the HTTP headers by adding -v (verbose) parameter to curl command line.

acme-dns doesn't give HTTP answers (<TITLE>.... part there), so it must be some other server getting the requests in the endpoint. The connection refused when trying port 80 suggests that there's some kind of firewall in between or port hasn't been exposed from Docker host.

Also your config states that you are running the service with TLS disabled from the API, so it doesn't try to look for the files at all.

from acme-dns.

eknori avatar eknori commented on June 23, 2024

Bummer. Yes. Need to use the IP because blogsite.org is pointing to another server

Now I get

`curl: (35) SSL received a record that exceeded the maximum permissible length.
[root@docker dns]# curl -v -X POST https://192.168.178.137:443/register

  • About to connect() to 192.168.178.137 port 443 (#0)
  • Trying 192.168.178.137...
  • Connected to 192.168.178.137 (192.168.178.137) port 443 (#0)
  • Initializing NSS with certpath: sql:/etc/pki/nssdb
  • CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
  • NSS error -12263 (SSL_ERROR_RX_RECORD_TOO_LONG)
  • SSL received a record that exceeded the maximum permissible length.
  • Closing connection 0
    curl: (35) SSL received a record that exceeded the maximum permissible length.`

from acme-dns.

joohoi avatar joohoi commented on June 23, 2024

Check my comment #13 (comment) the issue is that you have configured acme-dns to talk plain HTTP but curl assumes HTTPS, because of https:// - part in the URL. Should work fine with http://yourip:443/register

Naturally either enabling TLS or moving to another port would be a bit less confusing :)

from acme-dns.

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.