Skip to content
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

Build Error: while running C:\NusskNacker\staging\nussknacker-staging\designer\runServer.sh #3954

Closed
pokkireddy opened this issue Jan 26, 2023 · 20 comments
Labels

Comments

@pokkireddy
Copy link

Build Error: while running C:\NusskNacker\staging\nussknacker-staging\designer\runServer.sh

Attached the log file for your reference. please let me know what is missed.

Environment (please fill in the following information):

  • OS: Ubuntu 18.04.6 LTS
  • Nussknacker version [staging]
  • Flink version
  • Java version:
    -openjdk 17.0.6 2023-01-17
    OpenJDK Runtime Environment Temurin-17.0.6+10 (build 17.0.6+10)
    OpenJDK 64-Bit Server VM Temurin-17.0.6+10 (build 17.0.6+10, mixed mode, sharing)
  • Scala version
  • Method of running of components [e.g. in Docker, lite, flink]

    runServer.sh.log
@pokkireddy pokkireddy added the bug label Jan 26, 2023
@gadomsky
Copy link
Collaborator

gadomsky commented Jan 26, 2023

Hi @pokkireddy, thanks for reporting an issue. Looks like your build is missing devModel (<repo dir>/nussknacker-dist/target/universal/stage/managers/development-tests-manager.jar)

If you build source using our scripts as described in Readme https://github.com/TouK/nussknacker/blob/staging/CONTRIBUTING.md#running-full-version-of-designer-from-command-line
everything should work.

So in summary, the order of operations is as follows:

  • cloning fresh repo from repository
  • cd designer
  • ./buildClient.sh
  • ./buildServer.sh (please notice, that this script sets flag addDevArtifacts to true - I think, this is what you were missing)
  • ./runServer.sh

Please try to execute this instructions, and let us know if it had worked for you :)

@pokkireddy
Copy link
Author

runServer_Error.txt

I have followed the same steps, still getting error.
I can able to see this jar ( (/nussknacker-dist/target/universal/stage/managers/development-tests-manager.jar) attached in the log at the end.

Please find the attached log.

My use case is I want to change some UI text for ex: Instead of scenarios we would to like to change something else
and build a docker image from this. Please let me know the steps for that.

@pokkireddy
Copy link
Author

Based on the fix, I can able to runServer.sh without any error.

My use case is I want to change some UI text for ex: Instead of scenarios we would to like to change something else
and build a docker image from this. Please let me know the steps for that. Do we have docker file to generate image ?

@gadomsky
Copy link
Collaborator

Great :) This fix will problably be optimized a little bit before merge, but feel free to used it for now.

Docker images are built with sbt native-packager plugin, so there is no dedicated Dockerfile in our codebase. The usage is straightforward:

  • sbt dist/Docker/publishLocal to publish it locally
  • or sbt dist/Docker/publish to publish to remote docker registry, but please remember to set environment variables dockerUserName and dockerPackageName pointing to your remote registry.
    You can also provide own tag for you image with dockerTagName environment variable.

Can you please also tell us more about your usecase for Nusskancker? And also whether you use Flink or Lite Engine for Nusskancker runtime?

@pokkireddy
Copy link
Author

Could you please provide some steps like from which path to run the command "sbt dist/Docker/publishLocal".
I just executed the ./buildClient.sh ,./buildServer.sh,./runServer.sh
after that if i run above sbt docker command it throws error
sbt_docker_plugin.txt
also it shows "development environment" in UI. How to build and publish in production mode ?

We have an existing k8s environment which we have to use Nussknacker with flink for datamapping and decision making.

@gadomsky
Copy link
Collaborator

Scripts inside desinger are meant for local development.
sbt dist/Docker/publishLocal should be executed from root dir and it results in production build.
Label in the UI is configurable
If you have more questions about Nussknacker feel free to book an appointment with us https://calendly.com/nussknacker/support
In a meantime, you can also star the project if it's interesting for you.

@pokkireddy
Copy link
Author

pokkireddy commented Jan 27, 2023

nussknacker-docker-image-update-notworking.docx

Thanks for your prompt response and details.
I have updated the document with the steps what i did. could you please check why the latest docker image is not working

@gadomsky
Copy link
Collaborator

staging branch is our development branch, it might be not stable, but first of all it's not tested agianst other projects (like nusskancker-helm, nussknacker-quicstart and others). Those project are tested only with stable version, which is branch master. Please try to fork that branch, not staging, and try again.

  • git checkout master
  • addDevArtifacts=true sbt "dist/clean; buildClient; dist/Docker/publishLocal"

Also, please remember to pass flag NO_PULL=true when running ./start.sh in quickstart, because without it, the script pulls image from remote-registry, which in your case overrides your locally built image.

@pokkireddy
Copy link
Author

I am getting some error while executing this command
addDevArtifacts=true sbt "dist/clean; buildClient; dist/Docker/publishLocal"

Please find the log file
buildServer_Error.txt

@gadomsky
Copy link
Collaborator

gadomsky commented Feb 1, 2023

I have checked again, and on my local machine following steps produce successful dockerimage:

git clone git@github.com:TouK/nussknacker.git
cd nussknacker
git checkout master
addDevArtifacts=true sbt "dist/clean; buildClient; dist/Docker/publishLocal"
  • btw. I use java 11 when building, I can see that you're usiing java17, but I dont think it's the case
  • do you obtain the same error when executing this on branch master without any modification of yours?
  • and without executing any prior commands?

@pokkireddy
Copy link
Author

i have not modified anything and followed the above steps, still getting error. please find the
build_eror_1FEB.txt
log

@gadomsky
Copy link
Collaborator

gadomsky commented Feb 2, 2023

btw. I use java 11 when building, I can see that you're usiing java17, but I dont think it's the case

looks like java version it is. I have run the build against java17 and got the same error as you do. Please use java11.

@pokkireddy
Copy link
Author

I have installed java11 and tried build is success. I see the error (At the end) while generating docker image but i think this is not actual error. Please check the logs and confirm.
Build_Details_2-FEB.txt

@gadomsky
Copy link
Collaborator

gadomsky commented Feb 3, 2023

On my local environment, logs look slightly different. But the last two lines of your logs indeed make an impression that the whole build is successful. Please confirm it on your own, that it's ok, by runing this docker image and seeing if everything is ok.

@pokkireddy
Copy link
Author

pokkireddy commented Feb 4, 2023

I can able to run the docker image locally without any issue.
Now i am trying in azure cloud aks environment mode using this link https://nussknacker.io/documentation/quickstart/helm
Please see the errors in the attached document and let me know how to resolve these. we will be using in K8s only.
Also if i want to create all the objects in separate namespace in k8s cluster, where and all i have to change
Nussknacker_k8s_Error.docx

@gadomsky
Copy link
Collaborator

gadomsky commented Feb 6, 2023

You have probably imported this https://github.com/TouK/nussknacker-quickstart/blob/main/docker/streaming/scenarios/DetectLargeTransactions.json scenario to your Nussknacker which is meant for Flink engine. Please import that one https://github.com/TouK/nussknacker-quickstart/blob/main/k8s-helm/scenarios/DetectLargeTransactionsLite.json
They differ in typeSpecificData filed which is engine-specific.

@gadomsky
Copy link
Collaborator

gadomsky commented Feb 6, 2023

image

image
Please verify you have correct configuration of liveness and readiness for your akhq deployment

@pokkireddy
Copy link
Author

I have tried loading https://github.com/TouK/nussknacker-quickstart/blob/main/k8s-helm/scenarios/DetectLargeTransactionsLite.json it is working.
Regarding liveness and readiness probe i have changed the config as per attached document and it is running (please confirm the path is correct). But facing one issue while clicking on schema tab.
akhq.docx

@pokkireddy
Copy link
Author

pokkireddy commented Feb 7, 2023

Regarding docker image command question after i executed the below command and using this image. The data tab is not displayed ?
addDevArtifacts=true sbt "dist/clean; buildClient; dist/Docker/publishLocal"

Docker_Build

@gadomsky
Copy link
Collaborator

gadomsky commented Feb 7, 2023

It's not matter of docker image, but configuration. Additional tabs can be configured in your Helmchart using .Values.nussknacker.customTabs. Api for configuring main menu tabs is described here https://nussknacker.io/documentation/docs/installation_configuration_guide/DesignerConfiguration/#main-menu-configuration

Alternatively you can use a lot more powerful approach, but a little bit more complicated. Provide secret or configMap with separate configuration file application.conf for Nussknacker (this way you can override any Nusskancker configuration), then mount it to you deployment (it's not desribed yet in the docs but you can figure it out from our helm source code. Basically you do it like in normal K8 deployment :
https://github.com/TouK/nussknacker-helm/blob/main/src/templates/deployment.yaml#L50
https://github.com/TouK/nussknacker-helm/blob/main/src/templates/deployment.yaml#L131
)
And then pass it to Nusskacker with Values nussknacker.configFile: <path_to_exisiting_application_conf>,<you_mounted_application_conf_file> (https://artifacthub.io/packages/helm/touk/nussknacker#configuration)
Since Nusskancker accepts multiple configuration files, you can place only configurations that you want to add/override in your file, and pass your file along with default configuration file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants