Giter VIP home page Giter VIP logo

Comments (4)

nocin avatar nocin commented on June 16, 2024 1

Hi @alperdedeoglu,

I followed your steps and replaced the registry entry from
grafik
to
grafik

Now the package-lock.json under gen/db-com has the correct npm registry after building.

There was one last step I had to make. When trying to deploy the "susaas-db-com-dev" failed again. But this time there was another reason:

#2.0#2022 11 17 12:31:58.460#Z#DEBUG#com.sap.cloud.lm.sl.xs2.604e2745-6673-11ed-a7b5-eeee0a9e8155.susaas-db-com-dev.executeTaskTask# ######org.cloudfoundry.multiapps.controller.persistence.services.ProcessLogger########flowable-async-job-executor-thread-1602### [PollExecuteTaskStatusExecution] [susaas-db-com-dev] f9383bbc-4435-4144-bc58-80d2b7cc423a [Thu Nov 17 12:31:39 UTC 2022] Error: Connection failed (RTE:[89013] Socket closed by peer {10.128.205.130:41766 -> 34.202.189.140:443} (10.128.205.130:41766 -> adb7bc07-e190-419b-a98d-6468e201b38e.hana.trial-us10.hanacloud.ondemand.com:443)) (STDERR, APP/TASK/deploy)#

I could fix that by changing the HANA DB settings.
grafik
But I'm a bit confused, why this is now necessary when deploying from BAS.

Anyway, finally the deploy process finished with success! :-)

After posting my previous answer, I also tried to deploy this multitenancy sample and got the same buildpack errors. This led me to the same conclusion that it must be a BAS problem. Alltough I'm wondering why nobody else had this problem yet.

Thanks so much for your help! Now that the application is deployed I can finally have a look in the actual example in the next days!

Thanks & Regards
Nico

from btp-cf-cap-multitenant-susaas.

alperdedeoglu avatar alperdedeoglu commented on June 16, 2024

Hi @nocin,
Thank you very much for your contribution.
Actually, we have included an .npmrc file in the root directory of the project, to be able to avoid the npm registry issue.

I have done the following:

  1. Created a SAP BAS Subscription on Trial Account
  2. Created a new space via choosing the full-stack development option
  3. Cloned the repo and checked out to the basic branch
  4. Run the commands and follow the steps from here as you mentioned

At the end, the deployment was successful for me so unfortunately I can not reproduce your issue. Please
see the screenshot below for the successful deployment and date.

Maybe you can share what have you done to overcome this issue on your end, then I can add the steps to the
relevant troubleshooting section.

BR,
Alper

trial-deployment

from btp-cf-cap-multitenant-susaas.

nocin avatar nocin commented on June 16, 2024

Hi @alperdedeoglu,

to be 100% sure, this time I created a complete new trial account.
Again following the steps and noticed that this time in the package-lock.json there were already the correct urls with
https://registry.npmjs.org after running npm i.
I did everything exactly the same as yesterday, so I can't tell what went wrong last time.

Unfortunately, I still could not get it deployed. To be honest, I directly deployed and forgot to create a hana instance first (there was non, because I created a new trial account). So it failed correctly with:

Error monitoring creation or update of services: Error creating service "dev-susaas-com-hdi-container" from offering "hana" and plan "hdi-shared": Service broker error: Service broker hana-broker failed with: Can not create service instance 'dev-susaas-com-hdi-container': There is no database available. Ensure that you have a database available in space 'dev' within organization 'c28f01aetrial'.

So I created a database and deployed again. Got again an error which sounds correct.

Service "dev-susaas-com-hdi-container" is in state "create failed" and may not be operational. Actions like update of credentials and binding may fail! Consider recreating it by specifying the --delete-services option.

So next try with --delete-services.
cf deploy mta_archives/susaas_0.0.1.mtar -e ./configs/deployment/trial-private.mtaext --delete-services

I already thought it's done, when another error came up. This time, I had no idea what went wrong.

Error staging application "susaas-db-com-dev": BuildpackCompileFailed - App staging failed in the buildpack compile phase Download the application logs via the dmol command and check them for more information. A step of the process has failed. Retrying it may solve the issue. Proceeding with automatic retry... (3 of 3 attempts left) Staging application "susaas-db-com-dev"... Error starting application "susaas-srv-dev": Some instances have crashed. Check the logs of your application for more information. Download the application logs via the dmol command and check them for more information. A step of the process has failed. Retrying it may solve the issue. Proceeding with automatic retry... (2 of 3 attempts left)

But when downloading the logs, there it was again... the incorrect nginx-redirector.

[PollStageAppStatusExecution] [susaas-db-com-dev] 99be4ba2-ef29-4a4a-82c6-087ed78113dc [Tue Nov 15 16:06:03 UTC 2022] npm ERR! network request to http://nginx-redirector.repo-cache.svc.cluster.local/repository/appstudio-npm-group/@sap/hdi-deploy/-/hdi-deploy-4.5.1.tgz failed, reason: getaddrinfo ENOTFOUND nginx-redirector.repo-cache.svc.cluster.local (STDOUT, STG)#

Full log: susaas-db-com-dev.log

So I thought, I'd better undeploy and redeploy everything again.

cf undeploy susaas --delete-services --delete-service-keys --delete-service-brokers
cf deploy mta_archives/susaas_0.0.1.mtar -e ./configs/deployment/trial-private.mtaext

But still no success. Again, the BuildpackCompileFailed error for "susaas-db-com-dev". I checked the package-lock.json in the gen/db-com folder, and there I could again find http://nginx-redirector.repo-cache.svc.cluster.local...
Seems like the BTP is not able to fetch the buildpack this way.

Sorry for the long text! I know some parts are not directly related to the issue, but wanted to be sure, you get what I was doing, so I wrote down every step I did.

best regards
Nico

from btp-cf-cap-multitenant-susaas.

alperdedeoglu avatar alperdedeoglu commented on June 16, 2024

Hi @nocin,
I sincerely appreciate the time and effort you put into this.
Your efforts on behalf of the community are greatly valued.

I took a look at the discussions and the problem, as far as I understand, even though you have the .npmrc file in your root your package-lock.json file under your gen/db-com directory has local npm registry for SAP Business Application Studio.
Can you check if this is the case?
If so this seems to be a SAP BAS issue.

Let me know if the following steps are helpful.

  1. Check SAP HANA Cloud Trial is running, if not please start it.
  2. Undeploy the application using the command cf undeploy susaas --delete-services --delete-service-keys --delete-service-brokers
  3. Open directory /home/users/ in your SAP Business Application Studio. Find the .npmrc file under that directory and change the value as shown below. npm-registry-bas
  4. Build the application again with the command mbt build -e ./configs/deployment/trial-private.mtaext
  5. Deploy the application with the command cf deploy mta_archives/susaas_0.0.1.mtar

Kind Regards,

Alper

from btp-cf-cap-multitenant-susaas.

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.