8 Replies Latest reply: Oct 21, 2014 10:44 AM by Gary Graham-Oracle RSS

    SQL Developer 4.0.2 ignores socks proxy options

    user13086221

      Hello.

       

      I have a problem with SQL Developer 4.0.2 working through socks proxy server. SQL Developer 3.2 works good with same settings.

       

      OS: Windows 8 Pro, 64-bit

      Version: Oracle SQL Developer 4.0.2 (4.0.2.15.21) - sqldeveloper-4.0.2.15.21-no-jre

      JDK: 1.7.0_55, 64-bit

       

      I've added additional options for JVM into %USERPROFILE%\AppData\Roaming\sqldeveloper\1.0.0.0.0\product.conf

       

      # Proxy settings

      AddVMOption -DsocksProxyHost=localhost

      AddVMOption -DsocksProxyPort=3129

       

      (I also tried all *.conf files, e.g. ide.conf, sqldeveloper.conf, jdk.conf, etc.)

       

      And these options are enabled (see listing below)

       

      But no result, SQL Developer 4.0.2 uses only direct connection.

      Socks proxy server on localhost works fine, another version of SQL Developer works through it.

      Could you please help me?

      Thanks!

       

      P.S. .\sqldeveloper64.exe -verbose

       

      Processing Hotspot specific options

      Processing Hotspot JDK 7 specific options

      savedArg0 = .\sqldeveloper\sqldeveloper\bin\sqldeveloper64.exe

      VM to launch C:\Program Files\Java\jdk1.7.0_55\jre\bin\server\jvm.dll

      JNI Option: -Xbootclasspath/a:C:\Program Files\Java\jdk1.7.0_55\lib\tools.jar;C:\Program Files\Java\jdk1.7.0_55\lib\dt.jar

      JNI Option: -Dsun.java2d.noddraw=true

      JNI Option: -Dnetbeans.home=./Software/sqldeveloper/netbeans/platform/

      JNI Option: -Dnetbeans.logger.console=true

      JNI Option: -Dexcluded.modules=org.eclipse.osgi

      JNI Option: -Dide.cluster.dirs=./Software/sqldeveloper/netbeans/fcpbridge/:./Software/sqldeveloper

      /netbeans/ide/:./Software/sqldeveloper/netbeans/../

      JNI Option: -Xverify:none

      JNI Option: -Doracle.ide.extension.HooksProcessingMode=LAZY

      JNI Option: -Dorg.eclipse.equinox.simpleconfigurator.configUrl=file:bundles.info

      JNI Option: -Dosgi.bundles=file:./Software/sqldeveloper/ide/ide/lib/oracle.ide.osgi.jar@3:start

      JNI Option: -Dosgi.bundles.defaultStartLevel=1

      JNI Option: -Dosgi.configuration.cascaded=false

      JNI Option: -Dosgi.noShutdown=true

      JNI Option: -Dorg.osgi.framework.bootdelegation=*

      JNI Option: -Dosgi.parentClassloader=app

      JNI Option: -Dosgi.locking=none

      JNI Option: -Xbootclasspath/p:./Software/sqldeveloper/rdbms/jlib/ojdi.jar

      JNI Option: -Dosgi.classloader.type=parallel

      JNI Option: -Dosgi.bundlefile.limit=500

      JNI Option: -Dide.feedback-server=ide.us.oracle.com

      JNI Option: -Djavax.xml.transform.TransformerFactory=oracle.ide.xml.switchable.SwitchableTransformerFactory

      JNI Option: -Djavax.xml.stream.XMLInputFactory=com.ctc.wstx.stax.WstxInputFactory

      JNI Option: -Djavax.xml.stream.util.XMLEventAllocator=oracle.ideimpl.xml.stream.XMLEventAllocatorImpl

      JNI Option: -Doracle.ide.reportEDTViolations=bug

      JNI Option: -Doracle.ide.reportEDTViolations.exceptionsfile=./Software/sqldeveloper/ide/bin/swing-thread-violations.conf

      JNI Option: -Xms128M

      JNI Option: -Xmx800M

      JNI Option: -Dide.update.usage.servers=http://www.oracle.com/webfolder/technetwork/sqldeveloper/usage.xml

      JNI Option: -Doracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG=true

      JNI Option: -Dsun.java2d.ddoffscreen=false

      JNI Option: -Dwindows.shell.font.languages=

      JNI Option: -XX:MaxPermSize=256M

      JNI Option: -Doracle.ide.startup.features=sqldeveloper

      JNI Option: -Doracle.ide.osgi.boot.api.OJStartupHook=oracle.dbtools.raptor.startup.HomeSupport

      JNI Option: -Doracle.jdbc.mapDateToTimestamp=false

      JNI Option: -Doracle.jdbc.autoCommitSpecCompliant=false

      JNI Option: -Doracle.jdbc.useFetchSizeWithLongColumn=true

      JNI Option: -Dsun.locale.formatasdefault=true

      JNI Option: -Dorg.netbeans.CLIHandler.server=false

      JNI Option: -Dide.AssertTracingDisabled=true

      JNI Option: -Doracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG=true

      JNI Option: -Djava.util.logging.config.file=logging.conf

      JNI Option: -Dsqldev.debug=false

      JNI Option: -Xms128m

      JNI Option: -Xmx800m

      JNI Option: -DsocksProxyHost=localhost

      JNI Option: -DsocksProxyPort=3129

      JNI Option: -Dide.startingArg0=.\Software\sqldeveloper\sqldeveloper\bin\sqldeveloper64.exe

      JNI Option: -Dide.startingArg1=-verbose

      JNI Option: -Dide.launcherProcessId=3068

      JNI Option: -Dide.config_pathname=.\Software\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf

      JNI Option: -Dide.startingcwd=.\Software\sqldeveloper\sqldeveloper\bin

      JNI Option: -Duser.conf=C:\Users\.user\AppData\Roaming\sqldeveloper\1.0.0.0.0\product.conf

      JNI Option: -Dtool.user.conf=C:\Users\.user\AppData\Roaming\sqldeveloper\1.0.0.0.0\sqldeveloper.conf

      JNI Option: -Dide.shell.enableFileTypeAssociation=.\Software\sqldeveloper\sqldeveloper\bin\sqldeveloper64.exe

      JNI Option: -Dide.pref.dir.base=C:\Users\.user\AppData\Roaming

      JNI Option: -Dide.work.dir.base=C:\Users\.user\Documents

      JNI Option: -Dsun.java.command=oracle.ide.osgi.boot.OracleIdeLauncher

      JNI Option: -Djava.class.path=.\Software\sqldeveloper\ide\lib\ide-boot.jar;.\Software\sqldevel

      oper\netbeans\platform\lib\boot.jar;.\Software\sqldeveloper\netbeans\platform\lib\org-openide-util.jar;

      .\Software\sqldeveloper\netbeans\platform\lib\org-openide-util-lookup.jar;.\Software\sqldeveloper\

      netbeans\platform\lib\org-openide-modules.jar;.\Software\sqldeveloper\ide\lib\fcpboot.jar;.\So

      ftware\sqldeveloper\ide\lib\xml-factory.jar;.\Software\sqldeveloper\ide\lib\woodstox-core-asl-4.2.0.jar;

      .\Software\sqldeveloper\ide\lib\stax2-api-3.1.1.jar;.\Software\sqldeveloper\sqldeveloper\lib\orac

      le.sqldeveloper.homesupport.jar

      JVM path is C:\Program Files\Java\jdk1.7.0_55\jre\bin\server\jvm.dll

       

      LOAD TIME : 394

        • 1. Re: SQL Developer 4.0.2 ignores socks proxy options
          user578081
          Hello user13086221,

           

          I'm facing exactly the same problem with Windows7 32bit. Have you maybe been able to solve it in the meanwhile? If yes could you please share your solution?

           

          Thanks a lot!

          • 2. Re: SQL Developer 4.0.2 ignores socks proxy options
            Gary Graham-Oracle

            Although I have no direct experience with this issue, one possibility is JavaFX 2.2 (used beginning with SQL Developer 4.0 and bundled with jdk1.7.0_u6 and up) interfering with your socks proxy settings.  For example, see the following blog post...

            https://blogs.oracle.com/talkingjavadeployment/entry/packaging_improvements_in_jdk_7#4

             

            So try adding the following to your sqldeveloper.conf file:

            AddVMOption -Djavafx.autoproxy.disable=true


            Hope this helps,

            Gary

            SQL Developer Team

            • 3. Re: Re: SQL Developer 4.0.2 ignores socks proxy options
              user578081

              Hello Gary,

               

              I tried by adding

               

              AddVMOption -Djavafx.autoproxy.disable=true

              AddVMOption -DsocksProxyHost=127.0.0.1

              AddVMOption -DsocksProxyPort=38120

               

              to my sqldeveloper.conf file but this did not help either.

               

              I'm always getting the following error:

               

              An error was encountered performing the requested operation:

              lo exception: The Network Adapter could not establish the connection

              Vendor code 17002


              Thanks a lot for your help!


              Cheers,

              Ilias

              • 4. Re: SQL Developer 4.0.2 ignores socks proxy options
                Gary Graham-Oracle

                Hi Ilias,

                 

                Actually I have been reminded this is a known issue, and in fact came up recently in a status meeting during discussion of adding future support for ssh tunneling directly in the connection definition, i.e, start up the tunnel automatically upon open connection.  Should have paid closer attention!

                 

                Some customers prefer the convenience of dynamic SOCKS-based port forwarding (the ssh -D <proxyPort> <user>@<remoteHost> flavor), rather than forward local port to remote address (the ssh -L <proxyPort>:<remoteHost>:<remotePort> <user>@<remoteHost> flavor) which seems much better in terms of security.  Testing these two flavors, I see that forward local port to remote address works fine on both 3.2.2 and 4.0.2.  For dynamic port forwarding, however, I had to laugh a bit at myself since I could not get it to work even on 3.2.2 -- not sure what I'm missing.

                 

                Regarding javafx.autoproxy.disable as a workaround: either I was completely off-base there, or perhaps due to timing issues around initializing the network stack, passing it directly on the command line instead of via AddVMOption might be required.  No idea.

                 

                Regards,

                Gary

                • 5. Re: SQL Developer 4.0.2 ignores socks proxy options
                  user451616

                  Is there the possibility to get this fixed ? We are using regularly this feature in our environment, because Oracle cluster is hidden behind CERN network.

                  Thanks for your help,

                  Andrea

                  • 6. Re: SQL Developer 4.0.2 ignores socks proxy options
                    Gary Graham-Oracle

                    Hi Andrea,

                     

                    Can you confirm whether or not this issue still exists using the latest 4.0.3 production release?  Here is a post where the poster has a problem using 4.0.3 with ssh tunneling to a Cluster.  It has useful images and related links: ssh tunnel fails with Cluster in 4.0.3

                     

                    More work in this area is planned for 4.1, so it is important to get as much feedback as possible.

                     

                    Thanks,

                    Gary

                    SQL Developer Team

                    • 7. Re: SQL Developer 4.0.2 ignores socks proxy options
                      user451616

                      Hi Gary, I do not know if this can help you...here is a more detailed description (using 4.0.3 release as you suggested, and an older 3.2.20.09.87)

                      of what I'm doing:

                      1) connect to the machine cluster at CERN activating a socks ssh -D 3129 user@remotehost

                      2) modify the jdk.conf for 4.0.3 (instead I used the ide.conf for 3.2), adding

                      AddVMOption -DsocksProxyHost=localhost

                      AddVMOption -DsocksProxyPort=3129

                       

                      3) open a connection from a tnsnames file of the following kind:

                      ANAME=(

                              DESCRIPTION=

                              (ADDRESS= (PROTOCOL=TCP) (HOST=host1.cern.ch) (PORT=10121) )

                              (ADDRESS= (PROTOCOL=TCP) (HOST=host2.cern.ch) (PORT=10121) )

                              (ADDRESS= (PROTOCOL=TCP) (HOST=host3.cern.ch) (PORT=10121) )

                              (LOAD_BALANCE=on)

                              (ENABLE=BROKEN)

                              (CONNECT_DATA=

                                      (SERVER=DEDICATED)

                                      (SERVICE_NAME=aname.cern.ch)

                              )

                      )

                       

                      For the 3.2 version of sqldeveloper this works...for the 4.0.3 I get the message error

                      Screen Shot 2014-10-17 at 12.29.11.png

                       

                      Andrea

                       

                      PS: tell me if you have any test/debugging info that I should look at....

                      • 8. Re: SQL Developer 4.0.2 ignores socks proxy options
                        Gary Graham-Oracle

                        Hi Andrea,

                         

                        Sorry for the late reply.  It's good you tried 4.0.3, but did you actually try using the new SSH functionality mentioned in the other discussion link I posted previously?  In that case, you should no longer add socksProxyHost to the conf file, etc. 

                         

                        Look in the properties of the connection (the New / Select Database Connection dialog) and click on the Advanced button (to the right of the Kerberos Authentication button).  Use the SSH tab to configure the connection.  I do not believe there is any intent to get the old socksProxyHost method working on the 4.x releases.

                         

                        Regards,

                        Gary