-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<pre>Cannot POST /invoicing/createStripeInvoices</pre> #12
Comments
Hi @ferrymul7 - we will need the pod logs from your deployed application to troubleshoot this. Please attach them here. |
@jmsrpp , i got 2 pods. 1/ curl pod give this log: Cannot POST /invoicing/createStripeInvoices 2/ the other btp-invoicing-srv-7c48d874f7-4fr59 pod, doesn't have any logs generated. Please advise. |
hey @ferrymul7 - problem here then. It suggests that the route/url isn't correct for your env. At a minimum, you should see a log for btp-invoicing indicating the the CAP application is up and running, broadcasting the URL, etc. You can delete the pod and have it recreated. Then check the log file for: [cds] - model loaded from 1 file(s): Then double check that you are running in the default namespace. Lastly, try removing the .default from the end of your CURL URL: curl -X POST 'btp-invoicing-srv:8080/invoicing/createStripeInvoices' |
hi @jmsrpp , I deleted the pod and recreating them in trial using command "npm run build-deploy:kyma --image_name=ferrymul/btp-invoicing --namespace=trial" with success build and deploy
Release "btp-invoicing" does not exist. Installing it now. The release "btp-invoicing" is installed in namespace "trial". Your services are available at: Now i see the following problems in the pod events. The pod status is "ContainerCreating" Successfully assigned trial/btp-invoicing-srv-7c48d874f7-xlfz7 to ip-10-250-1-13.ec2.internal weirdly, after a few hours, the only left warning is : Not sure why the 2nd warning disappears though. Please advise. |
The secrets should be mounted from the helm chart. Please double check that the helm matches what we have in the repo, aside from the version changes we implemented earlier in this issue. |
@jmsrpp , i re-clone the stripe branch and re-run all the fixes to make the build phase successful, but still have the same problem. Can you help to point out which files within helm chart that need to be fixed ? Thank you.
Same error : MountVolume.SetUp failed for volume "auth-secret" : secret "btp-invoicing-srv-auth" not found |
Hi @ferrymul7 - sorry you're encountering all these issues. this values.yaml has the service entries. It should result in xsuaa and destination service being created in your namespace. Please confirm. the binding is defined here If this still fails, you can try to recreate the helm chart using cds add helm which should pick up the bindings from the package.json Also adding my colleague, @kay-schmitteckert in case he has any idea? |
@jmsrpp , i realized now that the secrets are always deployed in default namespace. I tried with trial namespace, it always fails as above. Anyway, i have now successfully deployed to default namespace, and below are the POD logs ******* btp-invoicing-srv-7c48d874f7-lw7q5 pod {"level":"info","logger":"cds","timestamp":"2024-11-24T22:55:08.949Z","msg":"loaded model from 1 file(s):\n","type":"log"} ******* curl pod Cannot POST /invoicing/createStripeInvoices() I tried with the followings, but no luck: Please advise. |
Hi @ferrymul7, could you test this again without the parantheses since its an action:
|
@kay-schmitteckert , Tried that and it still the same error. The problem here is that there is no log, and the error messages is unhelpful to point out what is the problem. ~ $ curl -X POST 'btp-invoicing-srv:8080/invoicing/createStripeInvoices' --header 'Content-Type: application/json' --data-raw '{ "month": "11", "year" Cannot POST /invoicing/createStripeInvoices |
The error message isn’t helpful because it’s never making it to the Pod. CURL is succinctly telling us it cannot resolve the hostname you’re trying. It means you need to try some basic DNS, ping, etc. Check this stack thread for a similar problem. They do some lookups, use a verbose option when running CURL, and so on. Unable to use curl and service name from inside kubernetes podstackoverflow.comJim ***@***.*** Nov 25, 2024, at 12:20 AM, Ferry Mulyadi ***@***.***> wrote:
@kay-schmitteckert , Tried that and it still the same error. The problem here is that there is no log, and the error messages is unhelpful to point out what is the problem.
~ $ curl -X POST 'btp-invoicing-srv:8080/invoicing/createStripeInvoices' --header 'Content-Type: application/json' --data-raw '{ "month": "11", "year"
: "2024" }'
<title>Error</title>
Cannot POST /invoicing/createStripeInvoices
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@jmsrpp , i added -v in curl, and i see the following. It seems that it can connect, however it returns HTTP 404. i saw the build & deploy was successfully executed. Is there anything missing here ? ~ $ curl -v -X POST 'btp-invoicing-srv.default:8080/invoicing/createStripeInvoices()' --header 'Content-Type: application/json' --data-raw '{ "month":
Cannot POST /invoicing/createStripeInvoices()* Connection #0 to host btp-invoicing-srv.default left intact |
It’s an action (not a function) so please remove the () from the URL and try again. Jim ***@***.*** Nov 25, 2024, at 11:27 AM, Ferry Mulyadi ***@***.***> wrote:
@jmsrpp , i added -v in curl, and i see the following. It seems that it can connect, however it returns HTTP 404. i saw the build & deploy was successfully executed. Is there anything missing here ?
~ $ curl -v -X POST 'btp-invoicing-srv.default:8080/invoicing/createStripeInvoices()' --header 'Content-Type: application/json' --data-raw '{ "month":
"11", "year": "2024" }'
Note: Unnecessary use of -X or --request, POST is already inferred.
Host btp-invoicing-srv.default:8080 was resolved.
IPv6: (none)
IPv4: 10.111.68.119
Trying 10.111.68.119:8080...
Connected to btp-invoicing-srv.default (10.111.68.119) port 8080
using HTTP/1.x
POST /invoicing/createStripeInvoices() HTTP/1.1
Host: btp-invoicing-srv.default:8080
User-Agent: curl/8.11.0
Accept: /
Content-Type: application/json
Content-Length: 33
upload completely sent off: 33 bytes
< HTTP/1.1 404 Not Found
< X-Powered-By: Express
< Content-Security-Policy: default-src 'none'
< X-Content-Type-Options: nosniff
< Content-Type: text/html; charset=utf-8
< Content-Length: 172
< Date: Mon, 25 Nov 2024 18:22:16 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
<
<title>Error</title>
Cannot POST /invoicing/createStripeInvoices()
* Connection #0 to host btp-invoicing-srv.default left intact
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@jmsrpp , here is without the (). the service seems not available (404) ? ~ $ curl -v -X POST 'btp-invoicing-srv.default:8080/invoicing/createStripeInvoices' --header 'Content-Type: application/json' --data-raw '{ "month": "
Cannot POST /invoicing/createStripeInvoices* Connection #0 to host btp-invoicing-srv.default left intact |
sorry to bother you with all those tests, but could you try this: 'btp-invoicing-srv.default:8080/odata/v4/invoicing/createStripeInvoices' |
No worry @kay-schmitteckert , i moved to the next phase now with new error in the srv pod log "Error during request to remote service: (0 , internal_1.getTenantIdWithFallback) is not a function" .. Look forward for your advise. Thx ********* The request ******
*************** SRV Pod Logs **** {"level":"info","logger":"odata","correlation_id":"5aaa1c22-dd33-4760-84f1-81b974a50423","host":"btp-invoicing-srv.default:8080","user_agent":"curl/8.11.0","accept":"/","content_type":"application/json","content_length":"33","request_size_b":"33","x_correlation_id":"5aaa1c22-dd33-4760-84f1-81b974a50423","timestamp":"2024-11-26T06:46:08.026Z","msg":"POST /odata/v4/invoicing/createStripeInvoices ","type":"log"} |
Actually the request with |
Hi @kay-schmitteckert , Firstly, i did option b, rebuild and deploy to kyma, but it still fails as below. It seems to me only option A will work, please advise the places to change/fix. Second, i see in the btp-invoicing-srv pod error log as : "Error: Error during request to remote service: (0 , internal_1.getTenantIdWithFallback) is not a function" when i used curl with /odata/v4/ .. is this expected too ? or any further changes requred. Thanks. ~ $ curl -v -X POST 'btp-invoicing-srv.default:8080/invoicing/createStripeInvoices' --header 'Content-Type: application/json' --data-raw '{ "month": "11", "year": "2024" }'
Cannot POST /invoicing/createStripeInvoices* Connection #0 to host btp-invoicing-srv.default left intact |
Hi @kay-schmitteckert , May i know the status of this ? I would like to understand if there is any estimated timeline so i can workaround this with our partner. Thanks |
Hi @ferrymul7 - The updated URL with /odata/v4 is the one you will need to use unless you specifically change the @path annotation in the CAP cds. The Can you also post the dependencies from your package.json? It might be also worth deleting your package-lock.json and reinstalling the dependencies, or running If the @sap-cloud-sdk/http-client and @sap-cloud-sdk/openapi have been updated from 3.4.0 respectively you would also need to regenerate the corresponding API clients: https://sap.github.io/cloud-sdk/docs/js/v1/guides/upgrade-to-version-2 I'll also look for @kay-schmitteckert to provide his input when available. |
Happy New Year @jmsrpp , this morning, i changed back the invoicing-services.cds with @path : 'invoicing' .. and somehow without /odata/v4/ the curl call went in with HTTP 204. The error is now only the Error: Error during request to remote service: (0 , internal_1.getTenantIdWithFallback) is not a function. I have run the npm update. As for @sap-cloud-sdk/http-client and @sap-cloud-sdk/openapi , they are still 3.4.0. Do i still need to upgrade the cloud-sdk to 2.0.0 ? if yes, this will be a major undertaking .. i would not be able to do it given my capacity. Please advise, and i am posting the dependencies below |
ferrymul@909c4acf1983 btp-invoicing % npm ls --a npm error code ELSPROBLEMS |
Hi @ferrymul7 - Sorry you ran into this but normalizing the SAP Cloud SDK versions is the way to fix this. From your output: ├─┬ @sap-cloud-sdk/[email protected] so you need these other dependencies updated to v 3.4.0 or you can try lowering the http-client version to 3.25.0 to match the rest of the dependencies. Happy to also take a PR to fix this, sorry that I don't have the bandwidth to attempt to replicate. I last fully tested the E2E Stripe scenario near the end of 2023 and checked in these dependencies successfully at that time. |
Hi @jmsrpp , i updated http-client version to 3.25.0, but unfortunately no luck. I also tried with 3.4.0 to synch all of these, but the same error happened. below is the logs. ├─┬ @sap-cloud-sdk/[email protected] ~ $ curl -v -X POST 'btp-invoicing-srv.default:8080/invoicing/createStripeInvoices' --header 'Content-Type: application/json' --data-raw '{ "month": "11", "year": "2024" }'
{"level":"info","logger":"odata","correlation_id":"4ddb46e8-be17-420f-bf5a-ffde2d0c4499","host":"btp-invoicing-srv.default:8080","user_agent":"curl/8.11.1","accept":"/","content_type":"application/json","content_length":"33","request_size_b":"33","x_correlation_id":"4ddb46e8-be17-420f-bf5a-ffde2d0c4499","timestamp":"2025-01-27T09:26:46.799Z","msg":"POST /invoicing/createStripeInvoices ","type":"log"} |
Hi Team, i got the below error when issueing a curl command to test the deployment with stripe integration. Please advise what is missing. Thanks, Ferry
ferrymul@909c4acf1983 cron-job % kubectl --namespace=default run curl --image=curlimages/curl -i --tty -- sh
<title>Error</title> ~ $If you don't see a command prompt, try pressing enter.
~ $ curl -X POST 'btp-invoicing-srv.default:8080/invoicing/createStripeInvoices' \
The text was updated successfully, but these errors were encountered: