Gerrit lfs-plugin

1,740 views
Skip to first unread message

Ashwini T R

unread,
Oct 17, 2016, 1:56:16 AM10/17/16
to Repo and Gerrit Discussion
Hi,

We are trying to install lfs-plugin in our gerrit instance which has version "2.13.1"
we tried downloading plugin in below link :

https://gerrit-ci.gerritforge.com/job/plugin-lfs-master/19/ 


But, when we download and check the plugin is not installed, error log says below:


[root@<server> logs]# cat error_log |grep lfs

[2016-10-17 07:31:22,745] [PluginScanner] WARN  com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin lfs

java.lang.UnsupportedClassVersionError: com/googlesource/gerrit/plugins/lfs/Module : Unsupported major.minor version 52.0

[2016-10-17 07:42:48,671] [main] WARN  com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin lfs

java.lang.UnsupportedClassVersionError: com/googlesource/gerrit/plugins/lfs/Module : Unsupported major.minor version 52.0

[2016-10-17 07:49:34,427] [main] WARN  com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin lfs

java.lang.UnsupportedClassVersionError: com/googlesource/gerrit/plugins/lfs/Module : Unsupported major.minor version 52.0

[2016-10-17 07:50:45,157] [main] WARN  com.google.gerrit.server.plugins.PluginLoader : Cannot load plugin lfs

java.lang.UnsupportedClassVersionError: com/googlesource/gerrit/plugins/lfs/Module : Unsupported major.minor version 52.0


thanks

Ashwini


Luca Milanesio

unread,
Oct 17, 2016, 2:40:23 AM10/17/16
to Ashwini T R, Repo and Gerrit Discussion
Hi Ashwiki,
are you using JDK 7 or 8?

Luca.

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ashwini T R

unread,
Oct 17, 2016, 2:58:14 AM10/17/16
to Repo and Gerrit Discussion, ashu.r...@gmail.com
Hi Luca,

Thanks for the reply, we are using JDK 7.x

[root@<host> ~]# java -version
java version "1.7.0_45"
OpenJDK Runtime Environment (rhel-2.4.3.3.el6-x86_64 u45-b15)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)


Thanks
Ashwini

Luca Milanesio

unread,
Oct 17, 2016, 3:04:24 AM10/17/16
to Ashwini T R, Repo and Gerrit Discussion
Ohhh yes, found the issue then.

The jenkins slaves we used on Gerrit CI have JDK 8 enabled by default.
I've pushed a change recently to switch to JDK 7 according to the .buckconfig settings, but old builds were using a Java 8 bytecode.

You have downloaded a master build of the plugin and *then* it is compiled with the same JDK level required by Gerrit master: Java 8.
When [1] will be merged, you will have as well the stable-2.13 version of the plugin, which will be built using JDK level 7, the same one used by Gerrit.

In the meantime ... bear with us, or you can build the plugin yourself :-)

Luca.

Ashwini T R

unread,
Oct 17, 2016, 3:25:19 AM10/17/16
to Repo and Gerrit Discussion, ashu.r...@gmail.com
Hi Luca,

Thank you so much for the update.. we would try to build the plugin.. And meantime we would wait for your 
response on this topic.

Thanks
Ashwini

lucamilanesio

unread,
Oct 17, 2016, 7:32:27 AM10/17/16
to Repo and Gerrit Discussion, ashu.r...@gmail.com

Ashwini T R

unread,
Oct 18, 2016, 5:05:53 AM10/18/16
to Repo and Gerrit Discussion, ashu.r...@gmail.com
Hi Luca,

Thank you so much for the plugin:):) we are able to load the plugin without any errors:
we have configured the lfs as below and we are getting error in log:

Please let us know we need to configure anything 

 cat etc/gerrit.config |grep lfs

[lfs]

        plugin = lfs


cat /opt/gerrit/etc/lfs.config


[lfs "check_lfs/*"]

        enabled = true

        maxObjectSize = 1000m


when we tried to push binaries getting this error


[root@<host>3 check_lfs]# git push origin master

Git LFS: (0 of 2 files) 0 B / 537.93 MB

exit status 1

exit status 1

error: failed to push some refs to 'ssh://<user>@<host>:8282/check_lfs'



regards
Ashwini

Saša Živkov

unread,
Oct 18, 2016, 8:10:04 AM10/18/16
to Ashwini T R, Repo and Gerrit Discussion
Please try pushing using the http protocol.

--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.

Ashwini T R

unread,
Oct 18, 2016, 10:21:09 AM10/18/16
to Repo and Gerrit Discussion, ashu.r...@gmail.com

--
--
To unsubscribe, email repo-discuss...@googlegroups.com

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi,

Thank you for your suggestion.
But it looks like our configuration is not correct. When tried with http protocol, got the below error.

Could you please let us know if our configuration is not correct.

[root@server check_lfs_new]# git push origin master
Git LFS: (0 of 1 files) 0 B / 258.58 MB
LFS is not available for repository check_lfs

Errors logged to /home/holimath/check_lfs_new/.git/lfs/objects/logs/20161018T171114.480089952.log
Use `git lfs logs last` to view the log.

The log file contents:

[root@server check_lfs_new]# cat /home/holimath/check_lfs_new/.git/lfs/objects/logs/20161018T171114.480089952.log
git-lfs/1.2.0 (GitHub; linux amd64; go 1.5.3; git 9bd3b8e)
git version 1.8.3.1

LFS is not available for repository check_lfs

LFS is not available for repository check_lfs
goroutine 1 [running]:
        /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.2.0/src/github.com/github/git-lfs/lfs/errors.go:566 +0x80
github.com/github/git-lfs/commands.logPanicToWriter(0x7fe44e068358, 0xc8201121e8, 0x7fe44c1e14d8, 0xc8201077a0)
        /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.2.0/src/github.com/github/git-lfs/commands/commands.go:195 +0xf7f
        /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.2.0/src/github.com/github/git-lfs/commands/commands.go:159 +0x421
        /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.2.0/src/github.com/github/git-lfs/commands/commands.go:134 +0x4e
github.com/github/git-lfs/commands.LoggedError(0x7fe44c1e14d8, 0xc8201077a0, 0xc820166600, 0x2d, 0x0, 0x0, 0x0)
        /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.2.0/src/github.com/github/git-lfs/commands/commands.go:84 +0x82
        /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.2.0/src/github.com/github/git-lfs/commands/uploader.go:143 +0xb97
        /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.2.0/src/github.com/github/git-lfs/commands/command_pre_push.go:81 +0x6a0
        /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.2.0/src/github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra/command.go:477 +0x403
        /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.2.0/src/github.com/github/git-lfs/vendor/_nuts/github.com/spf13/cobra/command.go:551 +0x46a
        /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.2.0/src/github.com/github/git-lfs/commands/commands.go:99 +0x23
main.main()
        /tmp/docker_run/git-lfs/rpm/BUILD/git-lfs-1.2.0/git-lfs.go:34 +0x12e

ENV:
LocalWorkingDir=/home/holimath/check_lfs_new
LocalGitDir=/home/holimath/check_lfs_new/.git
LocalGitStorageDir=/home/holimath/check_lfs_new/.git
LocalMediaDir=/home/holimath/check_lfs_new/.git/lfs/objects
LocalReferenceDir=
TempDir=/home/holimath/check_lfs_new/.git/lfs/tmp
ConcurrentTransfers=3
BatchTransfer=true
GIT_PREFIX=

Regards,
Ashwini
 

Matthias Sohn

unread,
Oct 18, 2016, 10:39:28 AM10/18/16
to Ashwini T R, Repo and Gerrit Discussion
Git LFS: (0 of 1 files) 0 B / 258.58 MB
LFS is not available for repository check_lfs

Errors logged to /home/holimath/check_lfs_new/.git/lfs/objects/logs/20161018T171114.480089952.log
Use `git lfs logs last` to view the log.

The log file contents:

[root@server check_lfs_new]# cat /home/holimath/check_lfs_new/.git/lfs/objects/logs/20161018T171114.480089952.log
git-lfs/1.2.0 (GitHub; linux amd64; go 1.5.3; git 9bd3b8e)
git version 1.8.3.1



you need to configure which projects are allowed to use LFS, see

-Matthias 

Ashwini T R

unread,
Oct 19, 2016, 4:40:33 AM10/19/16
to Repo and Gerrit Discussion, ashu.r...@gmail.com
Hi Matthias,

Thank you for providing the link. We have configured the projects to use LFS as below.

We have added a lfs.config file on refs/meta/config branch of ALL-Projects. And in Global level, we have configured /xx/xx/etc/gerrit.config file as below.
But still getting the same error:( Could you please help us in solving this.

lfs.config file on refs/meta/config of ALL-Projects:

[lfs "check_lfs/*"]

        enabled = true

        maxObjectSize = 1000m


[root@server gerrit]# cat etc/lfs.config

[lfs "check_lfs/*"]

        enabled = true

        maxObjectSize = 1000m


[root@server gerrit]# cat etc/gerrit.config |grep lfs

[lfs]

        plugin = lfs


[root@server1 check_lfs]# git push origin master

Password for 'https://holi...@ulisot11.emea.nsn-net.net:443':

Password for 'https://holi...@ulisot11.emea.nsn-net.net:443':

Password for 'https://holi...@ulisot11.emea.nsn-net.net:443':

Git LFS: (0 of 1 files) 0 B / 258.58 MB

LFS is not available for repository check_lfs


Errors logged to /home/holimath/check_lfs/.git/lfs/objects/logs/20161019T103645.371331044.log

Use `git lfs logs last` to view the log.

error: failed to push some refs to 'https://holi...@ulisot11.emea.nsn-net.net:443/a/check_lfs'


Regards,

Ashwini


Matthias Sohn

unread,
Oct 19, 2016, 5:01:32 AM10/19/16
to Ashwini T R, Repo and Gerrit Discussion
Git LFS: (0 of 1 files) 0 B / 258.58 MB
LFS is not available for repository check_lfs

Errors logged to /home/holimath/check_lfs_new/.git/lfs/objects/logs/20161018T171114.480089952.log
Use `git lfs logs last` to view the log.

The log file contents:

[root@server check_lfs_new]# cat /home/holimath/check_lfs_new/.git/lfs/objects/logs/20161018T171114.480089952.log
git-lfs/1.2.0 (GitHub; linux amd64; go 1.5.3; git 9bd3b8e)
git version 1.8.3.1

Git LFS: (0 of 1 files) 0 B / 258.58 MB

LFS is not available for repository check_lfs


Errors logged to /home/holimath/check_lfs/.git/lfs/objects/logs/20161019T103645.371331044.log

Use `git lfs logs last` to view the log.


I think "check_lfs" doesn't match "check_lfs/*" configured in lfs.config in refs/meta/config branch.
Try this

[lfs "check_lfs"]

        enabled = true

        maxObjectSize = 1000m

 
-Matthias

Saša Živkov

unread,
Oct 19, 2016, 5:15:39 AM10/19/16
to Ashwini T R, Repo and Gerrit Discussion
Git LFS: (0 of 1 files) 0 B / 258.58 MB
LFS is not available for repository check_lfs

Errors logged to /home/holimath/check_lfs_new/.git/lfs/objects/logs/20161018T171114.480089952.log
Use `git lfs logs last` to view the log.

The log file contents:

[root@server check_lfs_new]# cat /home/holimath/check_lfs_new/.git/lfs/objects/logs/20161018T171114.480089952.log
git-lfs/1.2.0 (GitHub; linux amd64; go 1.5.3; git 9bd3b8e)
git version 1.8.3.1


This section doesn't belong to the etc/lfs.config, see the documentation [1].
In the etc/lfs.config we configure LFS backends. For example:

[storage]
  backend = fs

[fs]
  directory = /path/to/lfs/store/dir




[root@server gerrit]# cat etc/gerrit.config |grep lfs

[lfs]

        plugin = lfs


[root@server1 check_lfs]# git push origin master

Git LFS: (0 of 1 files) 0 B / 258.58 MB

LFS is not available for repository check_lfs


Errors logged to /home/holimath/check_lfs/.git/lfs/objects/logs/20161019T103645.371331044.log

Use `git lfs logs last` to view the log.

error: failed to push some refs to 'https://holimath@ulisot11.emea.nsn-net.net:443/a/check_lfs'


Regards,

Ashwini


--
--

More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.

Ashwini T R

unread,
Oct 19, 2016, 5:28:30 AM10/19/16
to Repo and Gerrit Discussion, ashu.r...@gmail.com
Git LFS: (0 of 1 files) 0 B / 258.58 MB
LFS is not available for repository check_lfs

Errors logged to /home/holimath/check_lfs_new/.git/lfs/objects/logs/20161018T171114.480089952.log
Use `git lfs logs last` to view the log.

The log file contents:

[root@server check_lfs_new]# cat /home/holimath/check_lfs_new/.git/lfs/objects/logs/20161018T171114.480089952.log
git-lfs/1.2.0 (GitHub; linux amd64; go 1.5.3; git 9bd3b8e)
git version 1.8.3.1


Hi Matthias,

Thanks a lot. It worked.

Regards,
Ashwini 
Reply all
Reply to author
Forward
0 new messages