MacOS – Juniper Network Connect hangs at “Establishing Secure Session” after upgrading to OS X Yosemite

macosNetworkvpn

I know it's a bad idea to upgrade an OS so soon when you are running any enterprise software, especially related to security/vpns etc.

But I did! And I would like to avoid downgrading if possible.

Ever since I upgraded to OS X Yosemite though, juniper's network connect (vpn client) stopped working. First it just wouldn't launch. I realized that was because of the Java 7 compatibility issue on Yosemite. So I upgraded to the latest Java 8 build (and installed the JDK).

Now although Network Connect launches it hangs at the "Establishing Secure Session" step. It seems as though the connection is established (since I lose internet access in this period) but it can't create a tunnel.

Network Connect log

2014-10-17 19:21:06.144 ncproxyd[p64363.t771] ipsec.info New tunnel being created (tunnel.cpp:57)
2014-10-17 19:21:06.151 ncproxyd[p64363.t771] rmon.info got system route 0.0.0.0/0.0.0.0 gw 10.32.0.1 metric 2 via 0x00000000 (routemon.cpp:729)
2014-10-17 19:21:06.151 ncproxyd[p64363.t771] rmon.info got system route <someip>/255.255.248.0 gw 0.0.0.0 metric 1 via 0x00000004 (routemon.cpp:729)
2014-10-17 19:21:06.151 ncproxyd[p64363.t771] rmon.info got system route <someip>/255.255.255.255 gw 0.0.0.0 metric 1 via 0x00000004 (routemon.cpp:729)
2014-10-17 19:21:06.151 ncproxyd[p64363.t771] rmon.info got system route <someip>/255.255.255.255 gw 0.0.0.0 metric 1 via 0x00000004 (routemon.cpp:729)
2014-10-17 19:21:06.151 ncproxyd[p64363.t771] rmon.info got system route <someip>/255.255.255.255 gw 0.0.0.0 metric 1 via 0x00000004 (routemon.cpp:729)
2014-10-17 19:21:06.151 ncproxyd[p64363.t771] rmon.info got system route <someip>/255.0.0.0 gw 127.0.0.1 metric 1 via 0x00000000 (routemon.cpp:729)
2014-10-17 19:21:06.151 ncproxyd[p64363.t771] rmon.info got system route <someip>/255.255.255.255 gw 127.0.0.1 metric 1 via 0x00000000 (routemon.cpp:729)
2014-10-17 19:21:06.151 ncproxyd[p64363.t771] rmon.info got system route <someip>/255.255.0.0 gw 0.0.0.0 metric 1 via 0x00000004 (routemon.cpp:729)
2014-10-17 19:21:06.151 ncproxyd[p64363.t771] DSIPCHandler.info Saving the system routing table: 0|0|16785418|2|0|0000000000000000;8202|16318463|0|1|4|0000000000000000;16785418|-1|0|1|4|0000000000000000;-1711136758|-1|0|1|4|0000000000000000;-1711136758|-1|0|1|4|0000000000000000;127|255|16777343|1|0|0000000000000000;16777343|-1|16777343|1|0|0000000000000000;65193|65535|0|1|4|0000000000000000; (handler.cpp:345)
2014-10-17 19:21:06.151 ncproxyd[p64363.t771] config.info Setting key "ncproxyd_saved_routes" to value "0|0|16785418|2|0|0000000000000000;8202|16318463|0|1|4|0000000000000000;16785418|-1|0|1|4|0000000000000000;-1711136758|-1|0|1|4|0000000000000000;-1711136758|-1|0|1|4|0000000000000000;127|255|16777343|1|0|0000000000000000;16777343|-1|16777343|1|0|0000000000000000;65193|65535|0|1|4|0000000000000000;" in the persistent store (config.cpp:273)
2014-10-17 19:21:06.151 ncproxyd[p64363.t771] config_macos.info Setting value of ncproxyd_saved_routes to: 0|0|16785418|2|0|0000000000000000;8202|16318463|0|1|4|0000000000000000;16785418|-1|0|1|4|0000000000000000;-1711136758|-1|0|1|4|0000000000000000;-1711136758|-1|0|1|4|0000000000000000;127|255|16777343|1|0|0000000000000000;16777343|-1|16777343|1|0|0000000000000000;65193|65535|0|1|4|0000000000000000; (config_macos.objcpp:63)
2014-10-17 19:21:18.821 ncproxyd[p64463.t771] ipsec.info New tunnel being created (tunnel.cpp:57)
2014-10-17 19:21:18.828 ncproxyd[p64463.t771] rmon.info got system route 0.0.0.0/0.0.0.0 gw 10.32.0.1 metric 2 via 0x00000000 (routemon.cpp:729)
2014-10-17 19:21:18.828 ncproxyd[p64463.t771] rmon.info got system route <someip>/255.255.248.0 gw 0.0.0.0 metric 1 via 0x00000004 (routemon.cpp:729)
2014-10-17 19:21:18.828 ncproxyd[p64463.t771] rmon.info got system route <someip>/255.255.255.255 gw 0.0.0.0 metric 1 via 0x00000004 (routemon.cpp:729)
2014-10-17 19:21:18.828 ncproxyd[p64463.t771] rmon.info got system route <someip>/255.255.255.255 gw 0.0.0.0 metric 1 via 0x00000004 (routemon.cpp:729)
2014-10-17 19:21:18.828 ncproxyd[p64463.t771] rmon.info got system route <someip>/255.255.255.255 gw 0.0.0.0 metric 1 via 0x00000004 (routemon.cpp:729)
2014-10-17 19:21:18.829 ncproxyd[p64463.t771] rmon.info got system route <someip>/255.0.0.0 gw 127.0.0.1 metric 1 via 0x00000000 (routemon.cpp:729)
2014-10-17 19:21:18.829 ncproxyd[p64463.t771] rmon.info got system route <someip>/255.255.255.255 gw 127.0.0.1 metric 1 via 0x00000000 (routemon.cpp:729)
2014-10-17 19:21:18.829 ncproxyd[p64463.t771] rmon.info got system route <someip>/255.255.0.0 gw 0.0.0.0 metric 1 via 0x00000004 (routemon.cpp:729)
2014-10-17 19:21:18.829 ncproxyd[p64463.t771] DSIPCHandler.info Saving the system routing table: 

Notice how there are repeated attempts to create a tunnel, and this happens continuously. I have only pasted the logs from the last two attempts that Network Connect made.

I have also tried Junos Pulse as an alternative, it's a little better at error reporting. It shows that there is a connection, but says "tunnel not enabled" and I can't connect to the internet with it either.

The VPN with network connect worked fine until a few hours ago (when I had not upgraded to Yosemite).

Best Answer

Figured it out. First downgrade JAVA to Apple 1.6 as mentioned by Joe L. Farina above. That actually does work in some situations, but if your VPN provider only supports an old version of Network Connect then it will continue to hang.

To fix that, on the terminal run the following, then restart your computer:

sudo nvram boot-args="kext-dev-mode=1"

For some users it might be necessary to do this: https://discussions.apple.com/thread/6546349

Update: Some folks have been asking what the above command does, and fairly so. The above command basically disables kext signing on your OS X equipment. Kext signing is a security (Code signing) feature, that verifies if drivers and other software installed on your computer have been altered in anyway from what the developer of the application/driver had originally released. Old applications developed for the OS X (pre Yosemite) did not have this feature, since the feature was introduced with Yosemite. It does have a theoretical security risk, but if you know what you are installing and you do it from authentic sources (like the app store or well known developers you trust), then you should be fine. Otherwise refrain. To read more about kext signing see: https://developer.apple.com/developer-id/