This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Example DSS Debug Server & Client not connecting

I've been going through examples on how to use the DSS debugger.  In the example with the DSS Test Server and the Client, the client will not connect to the local DSS server.  The only changes I've made to the example files are the directory/file locations.

test_server.js

TestServer.js

perl_client.pl

The test server is running, however when I run the perl script for the client, I get the following error:

Remote server at port 4444 on http://127.0.0.1/ seems to be down(or not started)

Any ideas on resolving the issue?

 

Thanks

Stephen

  • Hello Stephan,

    Can I see the console output of both the sever and client scripts?

    Thanks

    ki

  • SERVER OUTPUT:
    Server startup...
    Opening Code Composer Studio Workbench. Please wait.....
      Server started.
      Configuration Set.
    Warning: Nashorn engine is planned to be removed from a future JDK release
    Warning: Nashorn engine is planned to be removed from a future JDK release
    Warning: Nashorn engine is planned to be removed from a future JDK release
    Warning: Nashorn engine is planned to be removed from a future JDK release
    Warning: Nashorn engine is planned to be removed from a future JDK release
    
    Warning: Nashorn engine is planned to be removed from a future JDK release
    com.ti.rov: baseDir = C:/ti/ccs1210/ccs/eclipse/plugins/com.ti.rov_1.0.0.202108240702/webcontents/, url = file:/C:/ti/ccs1210/ccs/eclipse/plugins/com.ti.rov_1.0.0.202108240702/webcontents/
    com.ti.rov: globalRoots = []
    Warning: Nashorn engine is planned to be removed from a future JDK release
    
    CCS HTTP adapter started! [ccs.port:62042] - Open 'http://localhost:62042/ide' in web browser to see listing of available APIs...
    
      Session Opened.
      Connected to Session.
      Program Loaded.
      Base Port.
      Socket Created.
      Thread Created.
      End of Test Server Function.
    ************ Prior to Run ************
    TestServer is ready.
    
    
    PERL CLIENT SCRIPT OUTPUT:
    Connecting to port [4444] at [http://127.0.0.1/]
    Remote server at port 4444 on http://127.0.0.1/ seems to be down(or not started)
    
    
    -------------------------------------------------------------------------------------------------
    
    
    SERVER OUTPUT WHEN SENDING RPC VIA PYTHON:
    >>>>> Accepted connection :[Socket[addr=/127.0.0.1,port=62224,localport=4444]]
    COMMAND: POST / HTTP/1.1
    RESPONSE: {"status":"FAIL","message":"failed while parsing JSON command: undefined"}
    COMMAND: Host: 127.0.0.1:4444
    RESPONSE: {"status":"FAIL","message":"failed while parsing JSON command: undefined"}
    COMMAND: User-Agent: python-requests/2.28.1
    RESPONSE: {"status":"FAIL","message":"failed while parsing JSON command: undefined"}
    COMMAND: Accept-Encoding: gzip, deflate, br
    RESPONSE: {"status":"FAIL","message":"failed while parsing JSON command: undefined"}
    COMMAND: Accept: */*
    RESPONSE: {"status":"FAIL","message":"failed while parsing JSON command: undefined"}
    COMMAND: Connection: keep-alive
    RESPONSE: {"status":"FAIL","message":"failed while parsing JSON command: undefined"}
    COMMAND: Content-Length: 19
    RESPONSE: {"status":"FAIL","message":"failed while parsing JSON command: undefined"}
    COMMAND: Content-Type: application/json
    RESPONSE: {"status":"FAIL","message":"failed while parsing JSON command: undefined"}
    COMMAND:
    RESPONSE: {"status":"FAIL","message":"failed while parsing JSON command: undefined"}
    TestServer is stopped.
    
    PYTHON CLIENT OUTPUT:
    Traceback (most recent call last):
      File "C:\ProgramData\miniconda3\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen      
        httplib_response = self._make_request(
      File "C:\ProgramData\miniconda3\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
        six.raise_from(e, None)
      File "<string>", line 3, in raise_from
      File "C:\ProgramData\miniconda3\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
        httplib_response = conn.getresponse()
      File "C:\ProgramData\miniconda3\lib\http\client.py", line 1374, in getresponse
        response.begin()
      File "C:\ProgramData\miniconda3\lib\http\client.py", line 318, in begin
        version, status, reason = self._read_status()
      File "C:\ProgramData\miniconda3\lib\http\client.py", line 300, in _read_status
        raise BadStatusLine(line)
    http.client.BadStatusLine: {"status":"FAIL","message":"failed while parsing JSON command: undefined"}
    
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:\ProgramData\miniconda3\lib\site-packages\requests\adapters.py", line 489, in send
        resp = conn.urlopen(
      File "C:\ProgramData\miniconda3\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
        retries = retries.increment(
      File "C:\ProgramData\miniconda3\lib\site-packages\urllib3\util\retry.py", line 550, in increment
        raise six.reraise(type(error), error, _stacktrace)
      File "C:\ProgramData\miniconda3\lib\site-packages\urllib3\packages\six.py", line 769, in reraise
        raise value.with_traceback(tb)
      File "C:\ProgramData\miniconda3\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
        httplib_response = self._make_request(
      File "C:\ProgramData\miniconda3\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
        six.raise_from(e, None)
      File "<string>", line 3, in raise_from
      File "C:\ProgramData\miniconda3\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
        httplib_response = conn.getresponse()
      File "C:\ProgramData\miniconda3\lib\http\client.py", line 1374, in getresponse
        response.begin()
      File "C:\ProgramData\miniconda3\lib\http\client.py", line 318, in begin
        version, status, reason = self._read_status()
      File "C:\ProgramData\miniconda3\lib\http\client.py", line 300, in _read_status
        raise BadStatusLine(line)
    urllib3.exceptions.ProtocolError: ('Connection aborted.', BadStatusLine('{"status":"FAIL","message":"failed while parsing JSON command: undefined"}\r\n'))
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "c:\Users\by51849\workspace_v12\Control_ACIM_F28335_v1\clientTest.py", line 49, in <module>
        main()
      File "c:\Users\by51849\workspace_v12\Control_ACIM_F28335_v1\clientTest.py", line 25, in main
        response = requests.post(url, json=payload).json()
      File "C:\ProgramData\miniconda3\lib\site-packages\requests\api.py", line 115, in post
        return request("post", url, data=data, json=json, **kwargs)
      File "C:\ProgramData\miniconda3\lib\site-packages\requests\api.py", line 59, in request
        return session.request(method=method, url=url, **kwargs)
      File "C:\ProgramData\miniconda3\lib\site-packages\requests\sessions.py", line 587, in request
        resp = self.send(prep, **send_kwargs)
      File "C:\ProgramData\miniconda3\lib\site-packages\requests\sessions.py", line 701, in send
        r = adapter.send(request, **kwargs)
      File "C:\ProgramData\miniconda3\lib\site-packages\requests\adapters.py", line 547, in send
        raise ConnectionError(err, request=request)
    requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine('{"status":"FAIL","message":"failed while parsing JSON command: undefined"}\r\n'))
    (base) 
  • There are some additional messages in there that I was not expecting. Including references to python. 

    What command are you using to run the scripts?

    You mentioned that you are using the examples unmodified with the exception of the location of the scripts?

    Thanks

    ki

  • Sorry for the confusion, I should have worded my initial entry better.  I have tried the unmodified scripts as mentioned (only the file paths are modified to match our installation).  I also tried sending json-rpc commands to the server using python.  I'm familar with Python, but have never used Perl, which is why I attempted this.

  •   I have tried the unmodified scripts as mentioned (only the file paths are modified to match our installation)

    Does the unmodified environment all work (using perl) but the issue is when using a custom python client script?

    Note that we are looking to create a python client example. When this is ready, I'll let you know.

    Thanks

    ki

  • The unmodified perl client script does not work.

    PERL CLIENT SCRIPT OUTPUT: Connecting to port [4444] at [http://127.0.0.1/] Remote server at port 4444 on http://127.0.0.1/ seems to be down(or not started)

  • Ok, thanks. It looks like an issue with running the server side javascript (test_server.js). Can you provide how this script is being called (the exact command on the command line)? Are you executing it via the dss.bat file?

  • I have the perl script working.  Typing in 127.0.0.1 instead of local host resolved the issue

  • Great! Is your custom python client also working?

  • Sort of.  We're just calling perl scripts from python at this point.  It's sufficient for what we are trying to accomplish at the moment.