Before setting up DeepCode Server it is recommended to complete the setup that is specific to your platform. To learn more, go here.


 

Stopping the server

If docker container is attached to your terminal, just do  Ctrl+C. 

For daemonized container, to stop the server, run sudo docker stop deepcode. 

 

Server Logs

The server logs various things during runtime. If you encounter a problem with DeepCode Server you can access all logs via the command docker logs -f --tail=50 CONTAINER_ID where CONTAINER_ID   is the id of the deepcode docker container. You can find the id by running  docker ps. 

 

REST APIs

The REST APIs described in section "REST APIs" are also accessible at the urlHOST_URL For example to log in: 


$ curl -X POST HOST_URL/publicapi/login

 

Troubleshooting

DeepCode Server can not reach code hosting platform

  • Description: DeepCode Server can not reach your code hosting platform.
  • Symptoms: DeepCode Server logs messages like: Error: connect EHOSTUNREACH <ADDRESS_OF_CODE_HOSTING_PLATFORM>. 
  • Resolution: Ensure that your code hosting platform is reachable from within the docker container in which DeepCode Server is running.
  • Hints for debugging:
    • Hostnames defined locally on the host machine (e.g. in /etc/hosts ) are generally not resolvable from inside docker containers.
    • On the machine hosting DeepCode Server, run ping ADDRESS with ADDRESS  being the IP address or hostname of the machine on which your code hosting platform is running. This will reveal whether the given ADDRESS  is reachable from the host machine.
    • Start DeepCode Server. Then, run docker exec -it deepcode bash -c 'ping ADDRESS' with ADDRESS   being the IP address or hostname of the machine on which your code hosting platform is running. This will run ping  from inside your container and will thus reveal whether the given ADDRESS is reachable from within the container. If ping succeeds, DeepCode Server should also be able to reach your code hosting platform.



If you encounter problems at any point during the setup please don't hesitate to ask for help at deepcode@deepcode.ai