Problem: clean install of Fedora - eclipse won't start - dialogue box says
error in logfile in workspace/.metadata/.log but file doesn't exist to get
more information
Solution:
>cd /usr/lib/eclipse/plugins/
>java -jar org.eclipse.equinox.launcher_1.0.101.R34x_v2008112 5.jar
starts eclipse directly in command line so can see errors on startup as
nothing written to log file
Output:
ZoneInfo: /usr/share/javazi/ZoneInfoMappings (Too many open files)
ZoneInfo: /usr/share/javazi/ZoneInfoMappings (Too many open files)
!SESSION 2009-07-24 06:56:30.890 -----------------------------------------------
eclipse.buildId=M20090211-1700
java.version=1.6.0_0
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
!ENTRY org.eclipse.jdt.apt.ui.nl_iw 4 0 2009-07-24 06:56:32.599
!MESSAGE
!STACK 0
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:131)
at java.util.zip.ZipFile.<init>(ZipFile.java:148)
at org.eclipse.osgi.framework.util.SecureAction.getZi pFile(SecureAction.java:251)
at org.eclipse.osgi.baseadaptor.bundlefile.ZipBundleF ile.basicOpen(ZipBundleFile.java:81)
at
etc. etc.
Hypothesis:
Too many open files reported. Problem opening a zip file (presumably because
open file limit reached). Also possibly explains why log not written as
couldn't get a file handle to report error once limit was reached.
Test: see how many files can open, increase limit, restart
max files given by command:
>ulimit -n
1024
create a group 'eclipse' and add lines into /etc/security/limits.conf to set a higher number
of open files limit (nofiles lines) for group. Need to preceed group name
with an '@' sign.
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain> <type> <item> <value>
#
#Where:
#<domain> can be:
# - an user name
# - a group name, with @group syntax
# - the wildcard *, for default entry
# - the wildcard %, can be also used with %group syntax,
# for maxlogin limit
#
#<type> can have the two values:
# - "soft" for enforcing the soft limits
# - "hard" for enforcing hard limits
#
#<item> can be one of the following:
# - core - limits the core file size (KB)
# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory address space (KB)
# - nofile - max number of open files
# - rss - max resident set size (KB)
# - stack - max stack size (KB)
# - cpu - max CPU time (MIN)
# - nproc - max number of processes
# - as - address space limit (KB)
# - maxlogins - max number of logins for this user
# - maxsyslogins - max number of logins on the system
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
# - sigpending - max number of pending signals
# - msgqueue - max memory used by POSIX message queues (bytes)
# - nice - max nice priority allowed to raise to values: [-20, 19]
# - rtprio - max realtime priority
#
#<domain> <type> <item> <value>
#
#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
@eclipse soft nofile 10000
@eclipse hard nofile 10000
# End of file
Add user in group 'eclipse'. Log out user (as settings created on login), login again, and restart eclipse
Result: eclipse starts up fine