Giter VIP home page Giter VIP logo

Comments (8)

suganyasuven avatar suganyasuven commented on May 27, 2024

Which Ubuntu version you are using? Could you please share the output you get for sudo bal -v?
Please let us know whether the following solution works:

  • Remove ~/.ballerina/ballerina-version file
  • Try bal -v

from ballerina-update-tool.

jimk-osu avatar jimk-osu commented on May 27, 2024

Its running on a debian:jessie pod within a kubernetes cluster (an admin/quick test pod).

I just checked and ~/.ballerina/ballerina-version does not exist:

ls  ~/.ballerina/
Settings.toml  repositories

from ballerina-update-tool.

suganyasuven avatar suganyasuven commented on May 27, 2024

Its running on a debian:jessie pod within a kubernetes cluster (an admin/quick test pod).

I just checked and ~/.ballerina/ballerina-version does not exist:

ls  ~/.ballerina/
Settings.toml  repositories

When we issue bal dist use, if the ballerina-version file is not there, it should be created. Could you please share the output you get for sudo bal -v as well?

from ballerina-update-tool.

jimk-osu avatar jimk-osu commented on May 27, 2024

The pod is running as root and there is no out-of-the-box in debian:jessie (not best practice to run a root level pod, I know 😄 )

from ballerina-update-tool.

jimk-osu avatar jimk-osu commented on May 27, 2024

For what its worth I also tried this using ballerina/ballerina:latest:

bash-5.0$ bal -v
Ballerina Swan Lake Alpha 4
Language specification v2020-12-17
Update Tool 1.3.1

bash-5.0$ bal dist pull 1.2.6
Fetching the '1.2.6' distribution from the remote server...
Downloading 1.2.6 100% [===========================================================] 110/110 MB (0:00:03 / 0:00:00)

Fetching the dependencies for '1.2.6' from the remote server...
Downloading jdk8u202-b08-jre 100% [==================================================] 39/39 MB (0:00:00 / 0:00:00)
'1.2.6' successfully set as the active distribution

bash-5.0$ bal dist list
/ballerina/runtime/bin/bal: line 54: /ballerina/runtime/bin/../dependencies/jdk8u202-b08-jre/bin/java: No such file or directory

bash-5.0$ bal -v
Error: Ballerina is supported only on JDK 1.8
/ballerina/runtime/bin/bal: line 105: /ballerina/runtime/bin/../dependencies/jdk8u202-b08-jre/bin/java: No such file or directory

bash-5.0$ bal dist use 1.2.6
/ballerina/runtime/bin/bal: line 54: /ballerina/runtime/bin/../dependencies/jdk8u202-b08-jre/bin/java: No such file or directory

bash-5.0$ ls /ballerina/runtime/dependencies/jdk8u202-b08-jre/bin/java
/ballerina/runtime/dependencies/jdk8u202-b08-jre/bin/java

bash-5.0$ ls -lah /ballerina/runtime/dependencies/jdk8u202-b08-jre/bin/java
-rwxrwxrwx    1 ballerin troupe      8.5K Apr 21 15:31 /ballerina/runtime/dependencies/jdk8u202-b08-jre/bin/java

bash-5.0$ id
uid=100(ballerina) gid=1000(troupe) groups=1000(troupe)

from ballerina-update-tool.

suganyasuven avatar suganyasuven commented on May 27, 2024

For what its worth I also tried this using ballerina/ballerina:latest:

bash-5.0$ bal -v
Ballerina Swan Lake Alpha 4
Language specification v2020-12-17
Update Tool 1.3.1

bash-5.0$ bal dist pull 1.2.6
Fetching the '1.2.6' distribution from the remote server...
Downloading 1.2.6 100% [===========================================================] 110/110 MB (0:00:03 / 0:00:00)

Fetching the dependencies for '1.2.6' from the remote server...
Downloading jdk8u202-b08-jre 100% [==================================================] 39/39 MB (0:00:00 / 0:00:00)
'1.2.6' successfully set as the active distribution

bash-5.0$ bal dist list
/ballerina/runtime/bin/bal: line 54: /ballerina/runtime/bin/../dependencies/jdk8u202-b08-jre/bin/java: No such file or directory

bash-5.0$ bal -v
Error: Ballerina is supported only on JDK 1.8
/ballerina/runtime/bin/bal: line 105: /ballerina/runtime/bin/../dependencies/jdk8u202-b08-jre/bin/java: No such file or directory

bash-5.0$ bal dist use 1.2.6
/ballerina/runtime/bin/bal: line 54: /ballerina/runtime/bin/../dependencies/jdk8u202-b08-jre/bin/java: No such file or directory

bash-5.0$ ls /ballerina/runtime/dependencies/jdk8u202-b08-jre/bin/java
/ballerina/runtime/dependencies/jdk8u202-b08-jre/bin/java

bash-5.0$ ls -lah /ballerina/runtime/dependencies/jdk8u202-b08-jre/bin/java
-rwxrwxrwx    1 ballerin troupe      8.5K Apr 21 15:31 /ballerina/runtime/dependencies/jdk8u202-b08-jre/bin/java

bash-5.0$ id
uid=100(ballerina) gid=1000(troupe) groups=1000(troupe)

Seems the file is there and it has permissions as well.

from ballerina-update-tool.

suganyasuven avatar suganyasuven commented on May 27, 2024

Is there any specific use case for switching distribution within a pod? If you want only 1.2.6, then you can try using ballerina/ballerina:1.2.6.

from ballerina-update-tool.

keizer619 avatar keizer619 commented on May 27, 2024

@jimk-osu
Thank you reporting this. We have review packing update tool in docker image and since there are issues in the environment and make it simple, we have decided to remove update tool functionality from ballerina image. Therefore now we cannot use ballerina update tool commands in docker and we need to use docker ballerina image versions in order to switch in between.

I will be closing the issue, please feel free to reopen if there are any concerns

from ballerina-update-tool.

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.