Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    remote debugging not working in a clustered environment

    SmartClient Version: v11.1p_2017-10-11/Enterprise Deployment (built 2017-10-11)

    Hello, we're testing a clustered environment composed of two instances of tomcat 8.5 and apache (using AJP) as balancer.
    I've just noticed that remote debug isn't working (while it works in non clustered environment).
    I've configured it Enterprise Mode.
    Firefox is logging every 3 seconds (the keepaliveInterval) this message:

    Code:
    Firefox non puņ stabilire una connessione con il server https://mydomain/myApp/isomorphic/messaging?ts=1507910300901&isc_noLog=1&type=connect&connectionID=isc_HiddenFrame_126&subscribedChannels=%7B%0A%20%20%20%20%2267428C6A-1E68-4CD9-9E66-8DDB1DB5AEA4%22%3A%7B%0A%20%20%20%20%7D%2C%20%0A%20%20%20%20isc_DebugTarget%3A%7B%0A%20%20%20%20%7D%0A%7D&eventStream=true.
    where the message in Italian means
    Firefox can't establish a connection to the server
    does the remote debug requires some special settings for a clustered environment?
    is the realtime messaging implementation compatible with AJP?
    Last edited by claudiobosticco; 13 Oct 2017, 08:06.

    #2
    In a clustered environment you will need to configure the real-time messaging system to use JMS, otherwise, the browser that is the target of debugging and the browser you are trying to debug with may end up connected to different machines, and not see each other. Outside of that, there's no problem using real-time messaging with clusters and load balancing.

    Your error message indicates a more basic issue of just not being able to contact the server at all. You need to look at what's happening with the connection attempt - could be a simple 404, possibly caused by the messaging servlet not being installed, or some intervening layer may be rejecting the connection due to firewall rules, bad security heuristics, etc.

    Comment


      #3
      Hello, thanks for your reply.
      Actually there were some problems in my setup.

      now I'm stuck with this error:

      Code:
      2017-10-17 16:00:24,324 INFO  [ ] MessagingWebSocketEndpoint Registering Realtime Messaging endpoint at: /isomorphic/websocket
      2017-10-17 16:00:24,605 WARN  [ ] FilterInvocationSecurityMetadataSourceParser Duplicate URL defined: /monitoring*. The original attribute values will be overwritten
      2017-10-17 16:00:26,101 ERROR [ ] EngineConfigurationFactoryServlet Unable to find config file.  Creating new servlet engine config file: /WEB-INF/server-config.wsdd
      2017-10-17 16:00:27,111 DEBUG [ ] WireFormatNegotiator Sending: WireFormatInfo { version=9, properties={MaxFrameSize=9223372036854775807, CacheSize=1024, CacheEnabled=true, SizePrefixDisabled=false, MaxInactivityDurationInitalDelay=10000, TcpNoDelayEnabled=true, MaxInactivityDuration=30000, TightEncodingEnabled=true, StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
      2017-10-17 16:00:27,116 DEBUG [ ] ActiveMQConnection Async exception with no exception listener: java.io.EOFException
      java.io.EOFException
          at java.io.DataInputStream.readInt(DataInputStream.java:392)
          at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:275)
          at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:221)
          at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:213)
          at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
          at java.lang.Thread.run(Thread.java:745)
      2017-10-17 16:00:27,112 DEBUG [claudio.bosticco@juventus.com ] WireFormatNegotiator Sending: WireFormatInfo { version=9, properties={MaxFrameSize=9223372036854775807, CacheSize=1024, CacheEnabled=true, SizePrefixDisabled=false, MaxInactivityDurationInitalDelay=10000, TcpNoDelayEnabled=true, MaxInactivityDuration=30000, TightEncodingEnabled=true, StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
      2017-10-17 16:00:27,112 DEBUG [ ] WireFormatNegotiator Sending: WireFormatInfo { version=9, properties={MaxFrameSize=9223372036854775807, CacheSize=1024, CacheEnabled=true, SizePrefixDisabled=false, MaxInactivityDurationInitalDelay=10000, TcpNoDelayEnabled=true, MaxInactivityDuration=30000, TightEncodingEnabled=true, StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
      2017-10-17 16:00:27,112 DEBUG [claudio.bosticco@juventus.com ] WireFormatNegotiator Sending: WireFormatInfo { version=9, properties={MaxFrameSize=9223372036854775807, CacheSize=1024, CacheEnabled=true, SizePrefixDisabled=false, MaxInactivityDurationInitalDelay=10000, TcpNoDelayEnabled=true, MaxInactivityDuration=30000, TightEncodingEnabled=true, StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
      2017-10-17 16:00:27,111 DEBUG [ ] WireFormatNegotiator Sending: WireFormatInfo { version=9, properties={MaxFrameSize=9223372036854775807, CacheSize=1024, CacheEnabled=true, SizePrefixDisabled=false, MaxInactivityDurationInitalDelay=10000, TcpNoDelayEnabled=true, MaxInactivityDuration=30000, TightEncodingEnabled=true, StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
      2017-10-17 16:00:27,120 DEBUG [claudio.bosticco@juventus.com ] ActiveMQConnection Async exception with no exception listener: java.io.EOFException
      java.io.EOFException
          at java.io.DataInputStream.readInt(DataInputStream.java:392)
          at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:275)
          at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:221)
          at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:213)
          at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
          at java.lang.Thread.run(Thread.java:745)
      .......
      2017-10-17 16:00:27,121 DEBUG [ ] ThreadPoolUtils Shutdown of ExecutorService: java.util.concurrent.ThreadPoolExecutor@677b2a56[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] is shutdown: true and terminated: true took: 0.000 seconds. 
      2017-10-17 16:00:27,122 DEBUG [ ] TcpTransport Stopping transport tcp://svjuve19.juventus.priv/172.16.2.73:61616@40702 
      .......
      this line in the log:
      Code:
      MessagingWebSocketEndpoint Registering Realtime Messaging endpoint at: /isomorphic/websocket
      does it means that the framework is using websocket protocol? I'm asking because I've read that websocket doesn't work with the mod_jk apache module which we're using to do the load balancing.
      Is it possible to tell the framework not to use websockets?
      Last edited by claudiobosticco; 17 Oct 2017, 06:49.

      Comment


        #4
        It turned out that there was a problem with the activemq broker.
        Now the messaging in my application is working.

        But the remote debug still doesn't work.
        There's some logging that I may look for to discover what's going on?

        Comment


          #5
          Originally posted by claudiobosticco View Post
          But the remote debug still doesn't work.
          more precisely, the 'remote' selectItem is empty.

          Comment


            #6
            also, is your advice against websocket still valid? https://forums.smartclient.com/forum...538#post198538

            Comment


              #7
              Our advice about WebSockets still applies - it's still not the right choice for most deployments, due to its lack of compatibility. However we had someone with unusual requirements sponsor it, so will be supporting it as an optional protocol in the next version.

              As far as not seeing remote browsers, you can turn on both client- and server-side logging to see the messages flowing back and forth. Most likely ActiveMQ has logging you could enable as well.
              Last edited by Isomorphic; 18 Oct 2017, 07:44. Reason: typo corrected

              Comment


                #8
                continuing here:
                https://forums.smartclient.com/forum...g-doesn-t-work

                Comment

                Working...
                X