ZeroGW configuration and segmentation fault

25 views
Skip to first unread message

Bogdan Glinskiy

unread,
Feb 10, 2015, 11:30:18 AM2/10/15
to zer...@googlegroups.com
Hi everybody!

I have a configuration file "zerogw,yam" which is following:

Server:
  listen
:
 
- host: 0.0.0.0
    port
: 8080


Routing:
  routing
: !Prefix
  routing
-by: !Path
  map
:
   
/*:
      static:
          enabled: yes
          root: /home/bogdan/Downloads/terminal_ws
          index-file: /index.html
          restrict-root: yes

      websocket:
        enabled: yes
        forward: !zmq.Push
        - !zmq.Connect "tcp://127.0.0.1:5557"
        subscribe: !zmq.Sub
        - !zmq.Connect "tcp://127.0.0.1:5556"
        - !zmq.Connect "tcp://127.0.0.1:5558"

In terminal_ws i have many files: index.html, settings.html etc and directories: img, settings, js etc in which another directories can be included.
But when i run my zerogw with this conf, there is a segmentation fault after index.html is loaded. Where is the problem? Seems the conf file isn't 
fully correct


Thank's a lot,
Bogdan

Bogdan Glinskiy

unread,
Feb 10, 2015, 12:02:06 PM2/10/15
to zer...@googlegroups.com
Well, i just should replace !Path to  routing-by: !Uri.

But the problem is that other pages won't load fully if i open index.html via local network. But on my laptop everything works fine

Paul Colomiets

unread,
Feb 12, 2015, 8:20:01 AM2/12/15
to zer...@googlegroups.com
Hi Bogdan,

Sorry, for the late reply.
As far as I remember you can't have two different services in single
route. In your config you have static and websockets enabled on same
route (and since you have single route you have no difference between
Uri and Path routes). Try to split them like the following:



Routing:
routing: !Prefix
routing-by: !Path
map:
/*:
static:
enabled: yes
root: /home/bogdan/Downloads/terminal_ws
index-file: /index.html
restrict-root: yes
/websock:
websocket:
enabled: yes
forward: !zmq.Push
- !zmq.Connect "tcp://127.0.0.1:5557"
subscribe: !zmq.Sub
- !zmq.Connect "tcp://127.0.0.1:5556"
- !zmq.Connect "tcp://127.0.0.1:5558"

--
Paul

Paul Colomiets

unread,
Feb 12, 2015, 3:29:25 PM2/12/15
to zer...@googlegroups.com
Hi Bogdan,

On Tue, Feb 10, 2015 at 6:30 PM, Bogdan Glinskiy <fett...@gmail.com> wrote:
> But when i run my zerogw with this conf, there is a segmentation fault after
> index.html is loaded. Where is the problem? Seems the conf file isn't
> fully correct

Well, I tried to reproduce the segmentation fault and I can't. So
please answer the following questions:

Do you have backends running when you get segfault?
Does your index.html connect websockets or request resources from the
same zerogw?
What size of your index.html?
Which version of zerogw, zeromq, libwebsite and coyaml do you have?
What is in the log output on highest loglevel?

The recommendation to split routes is still there. But getting
segfault is bad anyway. Still as far as I can see now it's some old
bug.

--
Paul

Bogdan Glinskiy

unread,
Mar 5, 2015, 11:59:08 AM3/5/15
to zer...@googlegroups.com
Sorry for such a late answer please.

The problem was in my conf file: i had two different services in single 
route.

Thank you very much!


--
Bogdan
Reply all
Reply to author
Forward
0 new messages