#Vijay Deepak
1 messages · Page 1 of 1 (latest)
Hello! Can you give me a quick summary/the most recent logs you're seeing?
Looks like Stripe isn't receiving parameters passed in the POST body in our calls.. below is a log message..
Customer customer = Customer.create(param);
LOG MESSAGE:
Action:StripeCheckout
2023-06-02/17:58:27.904 [INFO] - Stripe Customer ID:
2023-06-02/17:58:27.904 [INFO] - Before customer creation
2023-06-02/17:58:27.904 [INFO] - param: {metadata={customerId=12390}, email=vijay@desk365.io}
2023-06-02/17:58:28.160 [INFO] - Error in creating stripe customer com.stripe.exception.ApiConnectionException: IOException during API request to Stripe (https://api.stripe.com): Cannot write output after reading input. Please check your internet connection and try again. If this problem persists,you should check Stripe's service status at https://twitter.com/stripestatus, or let us know at support@stripe.com.
We tried curl from the same server. It seems to work fine.
The same java build from our test server also seems to work fine.
What version of the stripe-java library are you using?
group: 'com.stripe', name: 'stripe-java', version: '20.80.0'
What does your code look like?
Map<String, Object> param = new HashMap<>();
param.put("email", userName);
Map<String, Object> metadata = new HashMap<>();
metadata.put("customerId", compId);
param.put("metadata", metadata);
try {
logger.log(Level.INFO, "Before customer creation");
logger.log(Level.INFO, "param: " + param.toString());
Customer customer = Customer.create(param);
logger.log(Level.INFO, "After customer creation");
logger.log(Level.INFO, "param: " + param.toString());
stripeCustId = customer.getId();
logger.log(Level.INFO, "Stripe Customer ID: " + stripeCustId);
logger.log(Level.INFO, "Email: " + customer.getEmail());
} catch (Exception e) {
logger.log(Level.INFO, "Error in creating stripe customer " + e);
}
It was working fine until today morning.. Suddenly, it has stopped working since morning. No code change has happened. We're wondering if there's some kind of Stripe issue with this particular IP address?
Hmm... Do you have an example customer creation that was previously successful?
This was successfull at 5.20 a.m. PST - req_Q8jvcofap1QHWH
(I'm still looking, it's just taking a while)
Is this something you can reproduct in a really light-weight one-off script from your server? I assume that the code you sent over earlier was part of a larger file - if you stripe away evrything else and JUST do the stripe call, do you still get the same error?
From the test server with the exact same code it worked fine. Also, when we used the same production code locally with a debugger it seems to work fine.
Interesting - so this is an error you're ONLY seeing in your production environement
Yes. That's what is strange about it. ONLY in production server that ran fine until today morning, we're facing errors. I'm wondering if for some reason, there is a connectivity issue between Stripe and this particular ip address.
I don't think it'd be a connectivity issue - b ut also just want to double check, do you happen to be setting read or connect timeouts? https://github.com/stripe/stripe-java#configuring-timeouts
No, we don't have any such timeouts set.
I'm pulling in some other folks to take a look as well - thanks for being patient
Are your test and production servers hosted by the same provide? Have all the same configuration/settings?
Yes. Both are on AWS servers and have the same settings.
Are you getting this with every single request to stripe or is this happening intermittently?
It's happening for every single request since this morning
We're also creating a lightweight script now with just the create Customer call and will try it out on the production server.
Are you using any middleware of some sort that could possibly be intercepting the request before being sent to stripe?
No, we are not using any middleware.
When you're doing your lightweight script test can you make sure to try a test w/ the logger.log and one without?
Ok, we'll do that. Btw, we earlier today had the code without the logger messages and then added it to debug on the prod server. Both failed.
Ah, okay that's good to know
We ran a lightweight version and it worked fine. Then, we realized we have a observability service (New Relic) running on the servers and thought maybe that is interfering. We disabled it and restarted the production server. That seems to have fixed the issue. Greatly appreciate your support through out this process. We'll investigate further to see why that was causing this issue.
Hello again