This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 252819 - Installer package not deployable when no user is logged in
Summary: Installer package not deployable when no user is logged in
Status: REOPENED
Alias: None
Product: installer
Classification: Unclassified
Component: Mac Native (show other bugs)
Version: 8.2
Hardware: Macintosh (x86) Mac OS X
: P3 normal with 2 votes (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-04 23:41 UTC by michalmmac
Modified: 2017-01-18 04:48 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Installer verbose output (70.04 KB, application/octet-stream)
2015-06-09 13:42 UTC, michalmmac
Details
Relevant part of /var/log/install.log (29.46 KB, application/octet-stream)
2015-06-09 13:43 UTC, michalmmac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description michalmmac 2015-06-04 23:41:14 UTC
OS X 10.10.3
JDK 8 v45
NetBeans 8.0.2 .pkg (full install ~250MB)

I tried to deploy NetBeans package via munki (https://github.com/munki). Munki can install packages when OS X is at loginwindow and no user is logged in. Unfortunately installation of NetBeans package gets stuck at "running package scripts". 

I am able to replicate this by logging in via SSH (no user logged in) and running command:
sudo installer -package "NetBeans 8.0.2.pkg" -target /
Installer gets stuck at "Running package scripts".

Latest nightly build has same problem.

I suspect this may me connected to postinstall scripts launching GUI apps. However I was able to deploy NetBeans 8.0.2 with OS X 10.9.5 and JDK 7 without encountering this problem.

Conclusion:
I would greatly apreciate if NetBeans installer package would be deployable when no user is logged in (= system in at loginwindow). This would save me (and probably other Mac sysadmins) a lot of time. Without solving this from your end I would have to repackage whole thing and get rid off commands in scripts which cause this (<- and possibly breaking something else by doing that).
Comment 1 Libor Fischmeistr 2015-06-09 13:07:44 UTC
Could you please provide installer log?
Comment 2 michalmmac 2015-06-09 13:42:21 UTC
Created attachment 154127 [details]
Installer verbose output
Comment 3 michalmmac 2015-06-09 13:43:09 UTC
Created attachment 154128 [details]
Relevant part of /var/log/install.log
Comment 4 michalmmac 2015-06-09 13:45:36 UTC
(In reply to Libor Fischmeistr from comment #1)
> Could you please provide installer log?

Thank you for response.
I added two attachments.

installer.log is output of installer process (run via ssh) with -verbose and -dumplog flags

install.log is relevant part of /var/log/install.log

Observation:
After last message in /var/log/install.log installer is still outputing "installer: Running package scripts…....." in infinite loop.
Comment 5 michalmmac 2016-01-26 14:25:47 UTC
I can confirm this problem with version 9.1 package.

Last messages in /var/log/install.log when hang occurs during loginwindow installation.

Jan 26 15:11:57 osx1142-102 installd[467]: ./postinstall: updates=70
Jan 26 15:11:57 osx1142-102 installd[467]: ./postinstall: Establishing a connection ...
Jan 26 15:11:57 --- last message repeated 1 time ---
Jan 26 15:11:57 osx1142-102 installd[467]: ./postinstall: Remote implementation
Jan 26 15:11:58 --- last message repeated 1 time ---
Jan 26 15:11:58 osx1142-102 installd[467]: ./postinstall: Mercurial
Jan 26 15:12:00 --- last message repeated 1 time ---
Jan 26 15:12:00 osx1142-102 installd[467]: ./postinstall: null
Jan 26 15:12:17 --- last message repeated 1 time ---
Jan 26 15:12:17 osx1142-102 installd[467]: ./postinstall: Updates not found.
Jan 26 15:12:17 osx1142-102 installd[467]: ./postinstall: updates=0

Last message is the same as in "Relevant part of /var/log/install.log" attached to this report.
Comment 6 michalmmac 2016-01-26 14:26:52 UTC
Sorry. I meant version 8.1.
Comment 7 n8felton 2016-08-20 03:55:08 UTC
Bump.

Having the same issue while attempting to deploy NetBeans to multiple computer labs.

As a suggestion as a possible alternative solution, perhaps there can be a release of NetBeans that is a complete offline installer that does not require pulling updates as part of the postinstall.
Comment 8 n8felton 2017-01-18 03:55:49 UTC
Problem still exists in 8.2
Comment 9 n8felton 2017-01-18 04:48:39 UTC
After tracing through some things, I believe was able to determine the command that is failing

/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/bin/java -Djdk.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home -classpath '/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/boot.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/org-openide-modules.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/org-openide-util-lookup.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/org-openide-util-ui.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/org-openide-util.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/boot_ja.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/boot_pt_BR.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/boot_ru.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/boot_zh_CN.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-modules_ja.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-modules_pt_BR.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-modules_ru.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-modules_zh_CN.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util-lookup_ja.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util-lookup_pt_BR.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util-lookup_ru.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util-lookup_zh_CN.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util-ui_ja.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util-ui_pt_BR.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util-ui_ru.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util-ui_zh_CN.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util_ja.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util_pt_BR.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util_ru.jar:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/locale/org-openide-util_zh_CN.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/lib/tools.jar' '-Dnetbeans.dirs=/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/nb:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/ergonomics:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/ide:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extide:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/java:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/apisupport:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/webcommon:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/websvccommon:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/enterprise:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/mobility:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/profiler:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/python:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/php:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/identity:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/harness:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/cnd:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/cndext:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/dlight:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/groovy:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/extra:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/javacard:/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/javafx:' '-Dnetbeans.home=/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform' -Xdock:name=NetBeans '-Xdock:icon=/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/nb/netbeans.icns' -Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade -Dnetbeans.accept_license_class=org.netbeans.license.AcceptLicense -Xmx1024m -client -Xss2m -Xms32m -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.java2d.noddraw=true -Dsun.java2d.dpiaware=true -Dsun.zip.disableMemoryMapping=true -Dnetbeans.close=true -Dorg.netbeans.core.WindowSystem.show=false -Dorg.netbeans.core.WindowSystem.show=false -DaddExports:java.desktop/com.apple.eawt=ALL-UNNAMED -DaddExports:java.desktop/sun.awt=ALL-UNNAMED -DaddExports:java.base/jdk.internal.jrtfs=ALL-UNNAMED -DaddExports:java.desktop/apple.laf=ALL-UNNAMED -DaddExports:java.desktop/java.awt.peer=ALL-UNNAMED -DaddExports:java.desktop/com.sun.beans.editors=ALL-UNNAMED -DaddExports:java.desktop/sun.awt.im=ALL-UNNAMED -DaddExports:java.management/sun.management=ALL-UNNAMED -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/tmpnb/var/log/heapdump.hprof org.netbeans.Main --cachedir /tmp/tmpnb/var/cache --userdir /tmp/tmpnb --branding nb --nosplash --modules --update-all


Running this command results in the output:

Updates not found.
updates=0

So, the command above is launched in /Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/platform/lib/nbexec on line 466. On line 470 there is a `wait $PID` command that is waiting for the command above, but the command above appears to never properly exit, so the scrip sits there and spins  on `wait`.

The part I'm confused about is that on line 469 there is a `trap "kill $PID" EXIT` command. So which is it? Should we be waiting for the command to complete, or should we let `nbexec` exit and force kill the java process launched with the command above?

So yeah, I'm in the weeds, and probably way off base, but I figured I'd start poking around at what was stalling, and this is where I ended up. Hope it helps someone? I'll continue to poke tomorrow...