# How can I reconnect scz server manually?

**URL:** <https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590>\
**Category:** HOOPS Visualize Web\
**Tags:** webviewer\
**Created:** [April 25, 2025, 4:30am UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590 "2025-04-25T04:30:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ying.Li11](https://avatars.discourse-cdn.com/v4/letter/y/c37758/32.png) [@Ying.Li11](https://forum.techsoft3d.com/u/Ying.Li11)\
**Post date:** [April 25, 2025, 4:30am UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/1 "2025-04-25T04:30:34Z")

</div>

Now I met a problem that we Frequently disconnect when I create a model connect with hoops server,there are some server logs below.

2025/04/25 09:51:30 [debug] 19#0: \*973 recv: fd:25 -1 of 4096  
2025/04/25 09:51:30 [info] 19#0: \*973 recv() failed (104: Connection reset by peer) while proxying upgraded connection, client: 10.251.14.1, server: , request: “GET /ws/scz?renderingLocation=csr HTTP/1.1”, upstream: “[http://10.250.73.95:8998/ws/scz?renderingLocation=csr](http://10.250.73.95:8998/ws/scz?renderingLocation=csr)”, host: “[fview-uat.geely-test.com](http://fview-uat.geely-test.com)”  
2025/04/25 09:51:30 [debug] 19#0: \*973 http upstream upgraded done

It’s possible that the data was sent too frequently, resulting in the connection being reset.

My client requires that the support of my hoops web client remain open throughout the day, and there is a need for enhanced connection and heartbeat check mechanisms.

Does hoops support these functions？

How can I establish a reconnection method through hoops?

Thanks a lot! plz help me ,its so hard for me .

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [April 27, 2025, 10:18pm UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/2 "2025-04-27T22:18:31Z")

</div>

Hello @Ying.Li11,

The server log snippet you provided seems to be coming from Nginx. Nothing jumps out to us as to the causes of the disconnection issue that you are experiencing. Have you had the opportunity to look at other forum posts on setting up the server, for exampe:

> [@HOOPS Communicator HTTPS server with reverse proxy](https://forum.techsoft3d.com/t/hoops-communicator-https-server-with-reverse-proxy/1682):
>
> Introduction Although HOOPS Communicator SC server can be configured with HTTPS server like this article: [HOOPS Communicator server with HTTPS (SSL)](https://forum.techsoft3d.com/t/hoops-communicator-server-with-https-ssl/1681) , there is a non-standard port: 11182 that is open to the internet, posing a security risk. We’ll need to close it by restricting the non-standard port to the private environment. It’s important the user minimizes exposure to the public zone. This article explains another way to configure SC server with HTTPS server using reverse proxy of nginx. I…

Thanks,  
Tino

---

<div class="post-metadata">

**Author:** ![Ying.Li11](https://avatars.discourse-cdn.com/v4/letter/y/c37758/32.png) [@Ying.Li11](https://forum.techsoft3d.com/u/Ying.Li11)\
**Post date:** [May 8, 2025, 10:44am UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/3 "2025-05-08T10:44:15Z")

</div>

Hi tino,the problem is that the connect will break down when I use scz stream server.I cannot find the real reason to solve the problem. Is the model so big ? we often failed that the model scz file is so large.

---

<div class="post-metadata">

**Author:** ![Ying.Li11](https://avatars.discourse-cdn.com/v4/letter/y/c37758/32.png) [@Ying.Li11](https://forum.techsoft3d.com/u/Ying.Li11)\
**Post date:** [May 8, 2025, 10:47am UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/4 "2025-05-08T10:47:42Z")

</div>

Another condition that is different from the hoops demo is that my server is java. Will this have an impact? Although the server of the hoops demo is nodejs

---

<div class="post-metadata">

**Author:** ![Ying.Li11](https://avatars.discourse-cdn.com/v4/letter/y/c37758/32.png) [@Ying.Li11](https://forum.techsoft3d.com/u/Ying.Li11)\
**Post date:** [May 8, 2025, 5:27pm UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/5 "2025-05-08T17:27:45Z")

</div>

I read my code,I found that we connect ts3d server directly ,but nodejs demo code tell us that we have to wait to recived the “ready” signal.  
here are the pic that I screened.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/1/175031fa55a9a00feba3a5bac1629240f051828e.png)

---

<div class="post-metadata">

**Author:** ![Ying.Li11](https://avatars.discourse-cdn.com/v4/letter/y/c37758/32.png) [@Ying.Li11](https://forum.techsoft3d.com/u/Ying.Li11)\
**Post date:** [May 8, 2025, 5:28pm UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/6 "2025-05-08T17:28:56Z")

</div>

Does it effect? or have another solver for this problem?

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [May 10, 2025, 5:05pm UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/7 "2025-05-10T17:05:27Z")

</div>

Based on the screenshots, nothing jumps as as being the cause of server disconnection. Nor do I suspect that Java versus Node is having an effect.

Let’s try taking a look at the Communicator logs which is specified in the _server\_config.js_ file based to the server. By default, the name of the **folder** is called `ts3d_communicator_logs` so you can just do a search for this folder. The folder will contain logs for the server and SSR (server side rendering) and CSR (client side rendering) spawned instanced.

---

<div class="post-metadata">

**Author:** ![Ying.Li11](https://avatars.discourse-cdn.com/v4/letter/y/c37758/32.png) [@Ying.Li11](https://forum.techsoft3d.com/u/Ying.Li11)\
**Post date:** [June 5, 2025, 10:43am UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/8 "2025-06-05T10:43:01Z")

</div>

I record some error logs , please help me to analysis the logs.

the connect will interrupt when data transfering,

we would see the error :lws: getpeername: Transport endpoint is not connected?

```auto
Thu Jun 5 18:11:50 2025.0.188:dbug: data: term=End, rx=0, tx=65520, rx-rate=0Kb/s, tx-rate=3744.18Kb/s, rx-total=9.554Kb, tx-total=910260Kb
Thu Jun 5 18:11:50 2025.0.188:dbug: data: term=End, rx=0, tx=24084, rx-rate=0Kb/s, tx-rate=3768.26Kb/s, rx-total=9.554Kb, tx-total=910284Kb
Thu Jun 5 18:11:50 2025.0.229:dbug: data: term=End, rx=0, tx=65520, rx-rate=0Kb/s, tx-rate=3833.78Kb/s, rx-total=9.554Kb, tx-total=910349Kb
Thu Jun 5 18:11:50 2025.0.230:dbug: data: term=End, rx=0, tx=65520, rx-rate=0Kb/s, tx-rate=3899.3Kb/s, rx-total=9.554Kb, tx-total=910415Kb
Thu Jun 5 18:11:50 2025.0.230:dbug: data: term=End, rx=0, tx=20660, rx-rate=0Kb/s, tx-rate=3919.96Kb/s, rx-total=9.554Kb, tx-total=910435Kb
Thu Jun 5 18:11:50 2025.0.230:dbug: data: term=End, rx=0, tx=65520, rx-rate=0Kb/s, tx-rate=3985.48Kb/s, rx-total=9.554Kb, tx-total=910501Kb
Thu Jun 5 18:11:50 2025.0.230:dbug: data: term=End, rx=0, tx=55672, rx-rate=0Kb/s, tx-rate=4041.15Kb/s, rx-total=9.554Kb, tx-total=910557Kb
Thu Jun 5 18:12:49 2025.0.683:dbug: lws: getpeername: Transport endpoint is not connected
Thu Jun 5 18:12:49 2025.0.684:dbug: 2025-06-05 18:12:49 !command.context->is_connected()
Thu Jun 5 18:12:49 2025.0.684:dbug: 2025-06-05 18:12:49 !!! start releasing model !!!
Thu Jun 5 18:12:49 2025.0.971:dbug: 2025-06-05 18:12:49 !!! finished release model!!!
Thu Jun 5 18:12:49 2025.0.983:dbug: lws: lws_context_destroy

```

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [June 5, 2025, 11:12am UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/9 "2025-06-05T11:12:14Z")

</div>

Thanks for providing the log details.

I noticed that the `getpeername` call occurs roughly **1 minute after** the previous entry in the log. Do you know if this 1 minute is always consistent. If so, this can indicate that the server has a timeout setting.

The Web Viewer does have the method [setClientTimeout](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/WebViewer.html#WebViewer.setClientTimeout) but by default this occurs after 15 mintues of inactivity. So perhaps the timeout is being set somewhere else in your server.

---

<div class="post-metadata">

**Author:** ![Ying.Li11](https://avatars.discourse-cdn.com/v4/letter/y/c37758/32.png) [@Ying.Li11](https://forum.techsoft3d.com/u/Ying.Li11)\
**Post date:** [June 6, 2025, 1:22am UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/10 "2025-06-06T01:22:49Z")

</div>

However, the situation is like this. Currently, I’m using scz to load a relatively large model. Occasionally, it loads normally, but sometimes it doesn’t. This occurs in the log file. If you say it’s a timeout setting on the server side, it should be a problem that always occurs, disconnecting every time. But no, it only disconnects occasionally.

This is a probabilistic disconnection problem.

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [June 6, 2025, 1:55am UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/11 "2025-06-06T01:55:49Z")

</div>

@Ying.Li11,

I’ve sent to a file request to your email address for the SCZ file. I’d like to take a closer look at it.

Thanks,  
Tino

---

<div class="post-metadata">

**Author:** ![Ying.Li11](https://avatars.discourse-cdn.com/v4/letter/y/c37758/32.png) [@Ying.Li11](https://forum.techsoft3d.com/u/Ying.Li11)\
**Post date:** [June 6, 2025, 2:54am UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/12 "2025-06-06T02:54:48Z")

</div>

I hava a question about scz streaming rendering.  
if I build a connect throuth a loadName , hoops c++ server will read other file slices or only read a whole file ? which way does hoops do ?  
I must realized the number of files so that I can send you a right SCZ file.

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [June 6, 2025, 11:37am UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/13 "2025-06-06T11:37:28Z")

</div>

I think you are referring to the function [loadSubtreeFromModel](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/Model.html#loadsubtreefrommodel) (but there are variants). This function needs a complete filename to load the model but this function can be called multiple times. As a check, please do a search for “loadSubtreeFrom” in your code and let me know which function is being called.

---

<div class="post-metadata">

**Author:** ![Ying.Li11](https://avatars.discourse-cdn.com/v4/letter/y/c37758/32.png) [@Ying.Li11](https://forum.techsoft3d.com/u/Ying.Li11)\
**Post date:** [June 11, 2025, 3:07am UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/14 "2025-06-11T03:07:32Z")

</div>

> [@tino](#):
>
> loadSubtreeFrom

```auto
  /** Creates a viewer that will directly connect to a server using a websocket URI.
   * @param {string} uri */
  _createDirectConnectViewer: function (uriRoot) {
    var renderingLocation = Sample._getRenderingLocationString();
    var fullUri = uriRoot + '?renderingLocation=' + renderingLocation;

    /** @type {Communicator.WebViewerConfig} */
    var config = {
      containerId: this._config.viewerId || 'viewerContainer',
      endpointUri: fullUri,
      model: this._config.modelName, //'8894982415_null', //Sample._getModel(),
      rendererType: Sample._getRendererType(),
      streamingMode: Sample._getStreamingMode(),
      memoryLimit: Sample._getMemoryLimit(),
      boundingPreviewMode: 0,
    };
    Sample._applyExtraProperties(config);
    var viewer = new Communicator.WebViewer(config);

    return Promise.resolve(viewer);
  },

```

firstly,I am sorry about that I`m too late to response to your reply.  
I have already read the place where I called,I found that only use the demo “Sample Code”, I have no use to “loadSubtreeFrom”.

when I build a ws(wss) connect with server,How many files will I read from the server in the end?  
I know my model should be a large model.  
Theoretically, it should be an assembly with many subsets.  
I don’t know the principle of loading files on the hoops server because it’s a black box. Could you help me explain it? thx a lot .

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [June 11, 2025, 11:17am UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/15 "2025-06-11T11:17:18Z")

</div>

Based on the code you provided, it does not look like you are aggregating models in the viewer and instead, just loading a monolithic Stream Cache file. All that is to say that you are loading a single Stream Cache file containing a model with likely many different assemblies and sub-assemblies.

I had sent to a file request to your email address. Please use the upload link in that email to send me the one Stream Cache file.

---

<div class="post-metadata">

**Author:** ![Ying.Li11](https://avatars.discourse-cdn.com/v4/letter/y/c37758/32.png) [@Ying.Li11](https://forum.techsoft3d.com/u/Ying.Li11)\
**Post date:** [June 12, 2025, 9:24am UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/16 "2025-06-12T09:24:09Z")

</div>

Hi ,tino

thanx for your help,I had sent a file to u,please help me to solve the problem that it`s so puzzle for me .

---

<div class="post-metadata">

**Author:** ![Ying.Li11](https://avatars.discourse-cdn.com/v4/letter/y/c37758/32.png) [@Ying.Li11](https://forum.techsoft3d.com/u/Ying.Li11)\
**Post date:** [June 12, 2025, 9:31am UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/17 "2025-06-12T09:31:51Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/9/94f44e54be3eebdcd6ffe5fba7ce319bbb4eac72.png)  
could u see my picture?  
I have ran a demo project , but I met the problem that hoops request to load another file ,but I only download one file and send u.  
why this will happen? why does the engine load another file ?  
we just discuss that we guess that there only big file that when I use scz to load.

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [June 12, 2025, 12:44pm UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/18 "2025-06-12T12:44:09Z")

</div>

Initially, I thought you were loading one large Stream Cache file given that you were not using `loadSubtreeFrom*` function to aggregate individual models. But since you are seeing “requests” to load another file, you may be using a shattered workflow which uses a master model as a link to other SC files.

It will be easier to send me files via the Support Portal. To that end, I will initiate the process of creating a support account for you. You will receive confirmations via your email.

---

<div class="post-metadata">

**Author:** ![Ying.Li11](https://avatars.discourse-cdn.com/v4/letter/y/c37758/32.png) [@Ying.Li11](https://forum.techsoft3d.com/u/Ying.Li11)\
**Post date:** [July 3, 2025, 3:23am UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/19 "2025-07-03T03:23:37Z")

</div>

Hi tono , we haven`t sent u the origin 3dfile yet,But I have some problem about that can we update java server sokect version to solve this question?

Now I have a code

```auto
      <dependency>
            <groupId>io.socket</groupId>
            <artifactId>socket.io-server</artifactId>
            <version>4.0.1</version>
        </dependency>

```

can i use socketio [https://github.com/socketio/socket.io](https://github.com/socketio/socket.io) to Initiate a websocket？  
But I found that the method for initiating the socket is encapsulated in the Communicator sdk 。

Can u support a demo for me that how to use the “socket” lib wo build the scz connection?  
Or does Communicator not support doing so。

So much thanx to U。

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [July 3, 2025, 1:06pm UTC](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590/20 "2025-07-03T13:06:01Z")

</div>

[Socket.IO](http://Socket.IO) can serve as a compliment to the Communicator server/client framework. Although, [Socket.IO](http://Socket.IO) would not be recommended as a replacement. [Socket.IO](http://Socket.IO) is really designed for chat apps and synchronization of events. I’m not sure if we’re still on the topic of large model loading in regards to your question. But if it is, we do not recommend [Socket.IO](http://Socket.IO) for that.

We actually already have a demo integrating [Socket.IO](http://Socket.IO) as a way to handle collaboration between two viewers:  
[Collaborator Demo | Tech Soft 3D Labs](https://labs.techsoft3d.com/project/collaborator-demo)

[Next page](https://forum.techsoft3d.com/t/how-can-i-reconnect-scz-server-manually/4590.md?page=2)
