SimpleNLG Docker deployment

79 views
Skip to first unread message

Suresh Babu Golla

unread,
Oct 12, 2020, 7:08:20 AM10/12/20
to simplenlg
Hi Saad Mahamood,

I am impressed about simpleNLG service.  

I am trying to dockerize the simpleNLG service and host in one of our central server of my organisation so that my team can use it.

The docker image is working fine in my local system, but when I deploy it in the server, we are not able to hit the service. it is throwing connection lost issue.

FYI, we are using ant to build and run the service.

Please let me know if any changes are required from config files.

Thanks & Regards
Suresh  

Saad Mahamood

unread,
Oct 12, 2020, 7:32:42 AM10/12/20
to simp...@googlegroups.com, Suresh Babu Golla
Hi Suresh,

Just to clarify. Are you trying to use the SimpleServer to take in an XML realisation request with SimpleNLG? If so, could the issue be a port configuration issue on the remote side? The default socket port is 5007, which may not available on a cloud deployment. A different port number can be used by passing as an argument to the main method of the SimpleServer class. 


Saad.
 

--
You received this message because you are subscribed to the Google Groups "simplenlg" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simplenlg+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/simplenlg/454167b7-81a0-4ccb-a08f-3bf2b2c42c6en%40googlegroups.com.

Suresh Babu Golla

unread,
Oct 12, 2020, 10:29:16 AM10/12/20
to simplenlg
Hi Saad,

Saad: Are you trying to use the SimpleServer to take in an XML realisation request with SimpleNLG?
Yes

I changed default socket port to 8585. still it is not working.

Thanks & Regards
Suresh

Saad Mahamood

unread,
Oct 12, 2020, 10:44:58 AM10/12/20
to simp...@googlegroups.com
Hi Suresh,

I don’t have a solution to hand unfortunately. Can I take a look at your DockerFile? Also where are you deploying the container to? AWS? GCP? Or is it a local network server?

Saad Mahamood.

Saad Mahamood

unread,
Oct 12, 2020, 10:45:50 AM10/12/20
to simp...@googlegroups.com

Also can you give me the exact error message when trying to make you connection.

Saad.

Suresh Babu Golla

unread,
Oct 12, 2020, 11:59:02 AM10/12/20
to simplenlg
Hi Saad,

Please find my docker file content below:
FROM alpine

WORKDIR /nlgservice

RUN apk update && apk add openjdk8 && apk add apache-ant

# copy the content of the local directory to the working directory
COPY / .

# Publish port
EXPOSE 8585

ENTRYPOINT ["ant"]

Please find the error below:
--------------------------------------------------------------------------- TimeoutError Traceback (most recent call last) <ipython-input-9-937552c427e5> in <module> 6 p.predicate = verb 7 p.object = obj ----> 8 print(realise_en.element(p)) <ipython-input-2-1e0229a598cc> in element(self, elt, **kwargs) 16 elt.accept(v) 17 #self.logger.debug('XML for realisation:\n{0}'.format(v.to_xml())) ---> 18 result = self.client.xml_request(v.to_xml()) 19 return result.replace(' ,', ',') <ipython-input-1-52fa072b1d7a> in xml_request(self, data) 120 121 def xml_request(self, data): --> 122 with self.socket as sock: 123 sock.send_string(data) 124 result = sock.recv_string() <ipython-input-1-52fa072b1d7a> in __enter__(self) 101 # allow the use in 'with' statement 102 def __enter__(self): --> 103 self.connect() 104 return self 105 <ipython-input-1-52fa072b1d7a> in connect(self) 39 self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 40 try: ---> 41 self.socket.connect((self.host, self.port)) 42 except OSError as msg: 43 self.socket.close() TimeoutError: [Errno 60] Operation timed out

Please suggest if any changes required in docker file

Thanks & Regards
Suresh

Suresh Babu Golla

unread,
Oct 13, 2020, 3:02:17 AM10/13/20
to simplenlg
Hi Saad,

To add some more context to the above.

When I check the reachability of pod, below error I am getting

E1013 11:57:19.163871 10803 portforward.go:372] error copying from remote stream to local connection: readfrom tcp4 127.0.0.1:8585->127.0.0.1:57895: write tcp4 127.0.0.1:8585->127.0.0.1:57895: write: broken pipe

Thanks
Suresh
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages