Code Monkey home page Code Monkey logo

Comments (6)

shred avatar shred commented on June 19, 2024

The error is reported by the server, so it really seems that there are either too many or too long contacts.

You can read the list of contacts by getting an Account object of your account, and then invoking getContacts() and check the result. I guess that you have a large number of identical addresses. πŸ˜„ If so, you can modify the contact list like described here to remove all unused or duplicate addresses.

The next step would be to find out where the duplicate addresses come from.

from acme4j.

adamtg avatar adamtg commented on June 19, 2024

Why would the same exact email address and domain work with certbot, and not with the code using acme4j?

from acme4j.

shred avatar shred commented on June 19, 2024

I can only guess from the few information you have given me so far.

acme4j just passes your email addresses to the server, but does not apply any constrains on it. The server limits the entire contact JSON structure to a size of 191 bytes. The error occurs if that limit is exceeded on the server. It is the same behavior for acme4j and certbot.

According to the error message, you are trying to modify your account via acme4j. Before you invoke commit(), can you invoke getContacts() and check if the result is as expected?

Account.EditableAccount edit = account.modify();

// Now you do all your usual account modifications...

System.out.println(edit.getContacts());
edit.commit();  // your commit that throws the exception

If the list of contacts looks unsuspicious, you can also enable the debug log level. acme4j will then log the JSON structure that is sent to the server and triggers the error. You can enable debug log e.g. with passing -Dorg.slf4j.simpleLogger.log.org.shredzone.acme4j=debug as Java parameter, unless you use another slf4j log target.

Please understand that it is hard for me to help you if I don't know your source code, or the problematic email address.

from acme4j.

adamtg avatar adamtg commented on June 19, 2024

Thank you very much for the diagnostic help. I will add them in and see what is going on.

from acme4j.

adamtg avatar adamtg commented on June 19, 2024

The debugging showed exactly what was happening, and it was definitely my mistake. Every time i requested a certificate, i was calling:

Account.EditableAccount edit = account.modify();
edit.addEmail(email).commit(); 

and the email list would keep on growing. All i do now is clear the list before it is called, and everything works as expected.

Thank you very much for your time and help.

from acme4j.

shred avatar shred commented on June 19, 2024

This was what I was suspecting. πŸ˜ƒ I'm glad you could fix it.

from acme4j.

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.