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

Move to Java 8 #419

Closed
13 tasks done
rmader opened this issue May 24, 2016 · 31 comments
Closed
13 tasks done

Move to Java 8 #419

rmader opened this issue May 24, 2016 · 31 comments

Comments

@rmader
Copy link
Contributor

rmader commented May 24, 2016

Before we can do this, we need to check if all one-click deployments support java 8

Branch: https://github.com/loklak/loklak_server/tree/java8
Please push changes needed for the switch in that branch instead of master, so we have don't have changes at different places.

Does support?

  • Heroku
  • Scalingo
  • Bluemix
  • Docker cloud

Checked if changes are needed?

  • Heroku (needs updated buildpack)
  • Scalingo (needs updated buildpack)
  • Bluemix (needs updated buildpack)
  • Docker cloud (the installation guide refers to ubuntu trusty instead of ubuntu:latest as the docker file. trusty does not support jdk-8)

Tested?

  • Heroku
  • Scalingo (not sure yet, will see after merge)
  • Bluemix
  • Docker cloud

Other stuff:

  • Remove java 7 buildbot.
@rmader rmader self-assigned this May 24, 2016
@sudheesh001
Copy link
Member

heroku, scalingo failing, needs updates on buildpack

@rmader
Copy link
Contributor Author

rmader commented May 24, 2016

Ok, they still use openjdk 1.6. That's deprecated and potentially unsecure anyways

@rmader
Copy link
Contributor Author

rmader commented May 24, 2016

@sudheesh001 do you update the build packages? Thanks for testing btw

@sudheesh001
Copy link
Member

@Orbiter
Copy link
Member

Orbiter commented May 24, 2016

I just added c6450cc
to support heroku and scalingo. Hints to update the remaining are included in the commit.

Please test heroku and scalingo deployment with this settings. Here is how you find out if the deployed loklak_server is actually running under Java 1.8:

  • open /api/threaddump.txt on the server where you deployed your test Installation
  • scroll down to the "ELASTICSEARCH ClUSTER STATS" section
  • look for jvm.versions.version

@Orbiter
Copy link
Member

Orbiter commented May 24, 2016

@sudheesh001 Bluemix does NOT work, see http://loklak-server-dispensary-1744.mybluemix.net/api/threaddump.txt according to my hint above: this is still running under Java 1.7

@sudheesh001
Copy link
Member

Yup just noticed, somehow it seems to run whereas the others (heroku/scalingo) crash

@Orbiter
Copy link
Member

Orbiter commented May 24, 2016

We must have a confirmation from the thread dump, otherwise all peers will crash when we switch to Java 1.8

@sudheesh001
Copy link
Member

I've moved locally to java8, everything seems to be working but in the ant build i get a line as follows

 [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.7
    [javac] 1 warning

I don't remember seeing them before. The threaddump shows the following

"nodes" : {
    "count" : {
      "total" : 1,
      "master_only" : 0,
      "data_only" : 0,
      "master_data" : 1,
      "client" : 0
    },
    "versions" : [ "2.3.2" ],
    "os" : {
      "available_processors" : 8,
      "allocated_processors" : 8,
      "mem" : {
        "total_in_bytes" : 7478247424
      },
      "names" : [ {
        "name" : "Mac OS X",
        "count" : 1
      } ]
    },
    "process" : {
      "cpu" : {
        "percent" : 21
      },
      "open_file_descriptors" : {
        "min" : 541,
        "max" : 541,
        "avg" : 541
      }
    },
    "jvm" : {
      "max_uptime_in_millis" : 15011,
      "versions" : [ {
        "version" : "1.8.0_92",
        "vm_name" : "Java HotSpot(TM) 64-Bit Server VM",
        "vm_version" : "25.92-b14",
        "vm_vendor" : "Oracle Corporation",
        "count" : 1
      } ],
      "mem" : {
        "heap_used_in_bytes" : 158709544,
        "heap_max_in_bytes" : 559415296
      },
      "threads" : 132
    },
    "fs" : {
      "total_in_bytes" : 328327507968,
      "free_in_bytes" : 8497786880,
      "available_in_bytes" : 8235642880
    },
    "plugins" : [ ]

@rmader
Copy link
Contributor Author

rmader commented May 25, 2016

@sudheesh001 i also get this in the master branch. Did you compile the java8 branch or master? As the ant buildfile in master is set to compile to source 1.7 (changed to 1.8 in the java8 branch)

@rmader
Copy link
Contributor Author

rmader commented May 25, 2016

I just rebased this branch to include new commits from master, especially the system.properties file

@sudheesh001
Copy link
Member

compiled the java8 branch. https://loklakjavajvm8.herokuapp.com/api/threaddump.txt here's the heroku deployment.

@sudheesh001
Copy link
Member

heroku log

-----> Fetching set buildpack https://github.com/loklak/heroku_buildpack_ant_loklak.git... done
-----> Java (using Apache Ant 1.9.3) app detected
-----> Installing OpenJDK 1.8... done
-----> Installing Apache Ant 1.9.3..... [start]
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
-----> Installing Apache Ant 1.9.3..... [done ]!
-----> executing /tmp/build_b7f4e6533731839f113a5addf415fae6/loklak-loklak_server-dbed2e8/.buildpack/apache-ant-1.9.3/bin/ant -Duser.home=/tmp/build_b7f4e6533731839f113a5addf415fae6/loklak-loklak_server-dbed2e8
       Buildfile: /tmp/build_b7f4e6533731839f113a5addf415fae6/loklak-loklak_server-dbed2e8/build.xml

       init:

       build:
           [mkdir] Created dir: /tmp/build_b7f4e6533731839f113a5addf415fae6/loklak-loklak_server-dbed2e8/classes
            [echo] loklak: /tmp/build_b7f4e6533731839f113a5addf415fae6/loklak-loklak_server-dbed2e8/build.xml
           [javac] Compiling 139 source files to /tmp/build_b7f4e6533731839f113a5addf415fae6/loklak-loklak_server-dbed2e8/classes
           [javac] Note: /tmp/build_b7f4e6533731839f113a5addf415fae6/loklak-loklak_server-dbed2e8/src/org/loklak/server/Accounting.java uses unchecked or unsafe operations.
           [javac] Note: Recompile with -Xlint:unchecked for details.

       BUILD SUCCESSFUL
       Total time: 5 seconds
       total 196
       drwx------ 15 u4034 dyno  4096 May 25 09:01 .
       drwx------  3 u4034 dyno  4096 May 25 09:01 ..
       -rw-------  1 u4034 dyno   408 May 25 08:47 app.json
       drwx------  2 u4034 dyno  4096 May 25 08:47 bin
       drwx------  2 u4034 dyno  4096 May 25 08:47 .bluemix
       -rw-------  1 u4034 dyno  2509 May 25 08:47 build.gradle
       drwx------  3 u4034 dyno  4096 May 25 09:01 .buildpack
       -rw-------  1 u4034 dyno  6010 May 25 08:47 build.xml
       drwx------  3 u4034 dyno  4096 May 25 09:01 classes
       -rw-------  1 u4034 dyno  4269 May 25 08:47 .classpath
       -rw-------  1 u4034 dyno   397 May 25 08:47 cloud9-setup.sh
       drwx------  5 u4034 dyno  4096 May 25 08:47 conf
       -rw-------  1 u4034 dyno    83 May 25 08:47 docker-cloud.yml
       -rw-------  1 u4034 dyno    52 May 25 08:47 docker-compose.yml
       -rw-------  1 u4034 dyno   787 May 25 08:47 Dockerfile
       -rw-------  1 u4034 dyno   131 May 25 08:47 .gitignore
       -rwx------  1 u4034 dyno    58 May 25 08:47 gradle_clean.sh
       -rwx------  1 u4034 dyno    80 May 25 08:47 gradle_init.sh
       drwx------  6 u4034 dyno  4096 May 25 09:01 .heroku
       drwx------  9 u4034 dyno  4096 May 25 08:47 html
       -rw-------  1 u4034 dyno   475 May 25 08:47 installation_cloud9.md
       -rw-------  1 u4034 dyno  9299 May 25 08:47 installation_docker.md
       -rw-------  1 u4034 dyno   378 May 25 08:47 installation_generic.md
       -rw-------  1 u4034 dyno   819 May 25 08:47 installation_heroku.md
       drwx------  6 u4034 dyno  4096 May 25 09:01 .jdk
       drwx------  2 u4034 dyno  4096 May 25 08:47 lib
       -rw-------  1 u4034 dyno 26444 May 25 08:47 LICENSE
       -rw-------  1 u4034 dyno   393 May 25 08:47 manifest.yml
       -rw-------  1 u4034 dyno    28 May 25 08:47 Procfile
       drwx------  2 u4034 dyno  4096 May 25 09:01 .profile.d
       -rw-------  1 u4034 dyno   372 May 25 08:47 .project
       -rw-------  1 u4034 dyno  7387 May 25 08:47 README.md
       -rw-------  1 u4034 dyno   426 May 25 08:47 scalingo.json
       drwx------  2 u4034 dyno  4096 May 25 08:47 .settings
       drwx------  3 u4034 dyno  4096 May 25 08:47 src
       -rw-------  1 u4034 dyno    25 May 25 08:47 system.properties
       drwx------  4 u4034 dyno  4096 May 25 08:47 test
       -rw-------  1 u4034 dyno   163 May 25 08:47 .travis.yml
       total 196
       drwx------ 15 u4034 dyno  4096 May 25 09:01 .
       drwx------  3 u4034 dyno  4096 May 25 09:01 ..
       -rw-------  1 u4034 dyno   408 May 25 08:47 app.json
       drwx------  2 u4034 dyno  4096 May 25 08:47 bin
       drwx------  2 u4034 dyno  4096 May 25 08:47 .bluemix
       -rw-------  1 u4034 dyno  2509 May 25 08:47 build.gradle
       drwx------  3 u4034 dyno  4096 May 25 09:01 .buildpack
       -rw-------  1 u4034 dyno  6010 May 25 08:47 build.xml
       drwx------  3 u4034 dyno  4096 May 25 09:01 classes
       -rw-------  1 u4034 dyno  4269 May 25 08:47 .classpath
       -rw-------  1 u4034 dyno   397 May 25 08:47 cloud9-setup.sh
       drwx------  5 u4034 dyno  4096 May 25 08:47 conf
       -rw-------  1 u4034 dyno    83 May 25 08:47 docker-cloud.yml
       -rw-------  1 u4034 dyno    52 May 25 08:47 docker-compose.yml
       -rw-------  1 u4034 dyno   787 May 25 08:47 Dockerfile
       -rw-------  1 u4034 dyno   131 May 25 08:47 .gitignore
       -rwx------  1 u4034 dyno    58 May 25 08:47 gradle_clean.sh
       -rwx------  1 u4034 dyno    80 May 25 08:47 gradle_init.sh
       drwx------  6 u4034 dyno  4096 May 25 09:01 .heroku
       drwx------  9 u4034 dyno  4096 May 25 08:47 html
       -rw-------  1 u4034 dyno   475 May 25 08:47 installation_cloud9.md
       -rw-------  1 u4034 dyno  9299 May 25 08:47 installation_docker.md
       -rw-------  1 u4034 dyno   378 May 25 08:47 installation_generic.md
       -rw-------  1 u4034 dyno   819 May 25 08:47 installation_heroku.md
       drwx------  6 u4034 dyno  4096 May 25 09:01 .jdk
       drwx------  2 u4034 dyno  4096 May 25 08:47 lib
       -rw-------  1 u4034 dyno 26444 May 25 08:47 LICENSE
       -rw-------  1 u4034 dyno   393 May 25 08:47 manifest.yml
       -rw-------  1 u4034 dyno    28 May 25 08:47 Procfile
       drwx------  2 u4034 dyno  4096 May 25 09:01 .profile.d
       -rw-------  1 u4034 dyno   372 May 25 08:47 .project
       -rw-------  1 u4034 dyno  7387 May 25 08:47 README.md
       -rw-------  1 u4034 dyno   426 May 25 08:47 scalingo.json
       drwx------  2 u4034 dyno  4096 May 25 08:47 .settings
       drwx------  3 u4034 dyno  4096 May 25 08:47 src
       -rw-------  1 u4034 dyno    25 May 25 08:47 system.properties
       drwx------  4 u4034 dyno  4096 May 25 08:47 test
       -rw-------  1 u4034 dyno   163 May 25 08:47 .travis.yml
-----> Discovering process types
       Procfile declares types -> web
-----> Compressing...
       Done: 98.4M
-----> Launching...
       Released v5
       https://loklakjavajvm8.herokuapp.com/ deployed to Heroku

Uses jdk1.8

@rmader rmader mentioned this issue May 25, 2016
@sudheesh001
Copy link
Member

Bluemix deployment working with java 8 http://loklak-server-dispensary-1427.mybluemix.net/api/threaddump.txt

@sudheesh001
Copy link
Member

Docker cloud http://loklak-1.loklakjava8.23a887be.cont.dockerapp.io:32770/api/threaddump.txt

Runs jvm.versions.version=1.8.0_91

@rmader
Copy link
Contributor Author

rmader commented May 25, 2016

ok, can you mark the checkboxes for all things tested?

@rmader
Copy link
Contributor Author

rmader commented May 25, 2016

@Orbiter can you remove the java 7 buildbot?

@sudheesh001
Copy link
Member

@treba123 i've marked it after testing for heroku, bluemix and docker cloud. Can someone test it for scalingo ideally it should work since it works for heroku but my trial for scalingo expired @daminisatya @shivenmian @jig08 Could any of you host the java8 branch on scalingo ?

@shivenmian
Copy link
Member

shivenmian commented May 25, 2016

@sudheesh001 Sure, wait.

@shivenmian
Copy link
Member

shivenmian commented May 25, 2016

@sudheesh001 It works when I went to https://my.scalingo.com/deploy?source=https://github.com/loklak/loklak_server/tree/java8 (i.e used the deploy button, just that I changed the source from master to java8 branch)

It didn't work when I pulled the java8 branch, and deployed from my local machine.

For the first method: https://loklaksm.scalingo.io/api/threaddump.txt

But why should it not work when you deploy this app from your local machine?

@sudheesh001
Copy link
Member

Can i have the scalingo URL deployed please ?

@shivenmian
Copy link
Member

shivenmian commented May 25, 2016

I'd deployed it, had worked, but it's crashing right now. I'll do it again.

@sudheesh001
Copy link
Member

No worries It says 1.8.0_92-cedar14

@shivenmian
Copy link
Member

Yes it did, just crashed for some reason. I think you can merge the java8 branch to master.

@rmader
Copy link
Contributor Author

rmader commented May 25, 2016

Thanks guys! I will wait for the buildbot to be java 8 only, as it will give us build errors for every PR

@sudheesh001
Copy link
Member

@treba123 #430 I've removed java7 for automated build on TravisCI

@rmader
Copy link
Contributor Author

rmader commented May 25, 2016

@sudheesh001 cool, lets merge that one. Do we still have to wait for anything? The docker thing?

@Orbiter
Copy link
Member

Orbiter commented May 25, 2016

Great work, do we need to redeploy existing servers?

@rmader
Copy link
Contributor Author

rmader commented May 26, 2016

I don't think so, but we'll have to when #427 gets merged. So maybe wait for that

@rmader
Copy link
Contributor Author

rmader commented May 26, 2016

Correction: not even then, but as soon as we actually start checking for valid peer hashes

@rmader
Copy link
Contributor Author

rmader commented May 26, 2016

Done #441

@rmader rmader closed this as completed May 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants