#Vijay Deepak

1 messages · Page 1 of 1 (latest)

undone berryBOT
onyx widget
#

Hello! Can you give me a quick summary/the most recent logs you're seeing?

hardy pike
#

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.

onyx widget
#

What version of the stripe-java library are you using?

hardy pike
#

group: 'com.stripe', name: 'stripe-java', version: '20.80.0'

onyx widget
#

What does your code look like?

hardy pike
#

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?

onyx widget
#

Hmm... Do you have an example customer creation that was previously successful?

hardy pike
#

This was successfull at 5.20 a.m. PST - req_Q8jvcofap1QHWH

onyx widget
#

(I'm still looking, it's just taking a while)

undone berryBOT
onyx widget
#

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?

hardy pike
#

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.

onyx widget
#

Interesting - so this is an error you're ONLY seeing in your production environement

hardy pike
#

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.

onyx widget
hardy pike
#

No, we don't have any such timeouts set.

onyx widget
#

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?

hardy pike
#

Yes. Both are on AWS servers and have the same settings.

onyx widget
#

Are you getting this with every single request to stripe or is this happening intermittently?

hardy pike
#

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.

onyx widget
#

Are you using any middleware of some sort that could possibly be intercepting the request before being sent to stripe?

hardy pike
#

No, we are not using any middleware.

onyx widget
#

When you're doing your lightweight script test can you make sure to try a test w/ the logger.log and one without?

hardy pike
#

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.

onyx widget
#

Ah, okay that's good to know

undone berryBOT
hardy pike
#

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.

oak kite
#

Hello again