Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It's difficult to troubleshoot connection issues #922

Open
vojtech9 opened this issue Dec 10, 2024 · 4 comments
Open

It's difficult to troubleshoot connection issues #922

vojtech9 opened this issue Dec 10, 2024 · 4 comments

Comments

@vojtech9
Copy link

Description

Hello,

I am trying to fuzz our API with RESTler, this is my settings file:


{
  "per_resource_settings": {},
  "max_combinations": 20,
  "authentication": {
    "token": {
      "location": "/.restler/token.txt",
      "token_refresh_interval": 300
    }
  },
  "Host": "apigateway.test.tenant1.vodeno.online",
  "Basepath": “/name-of-our-api”
}

I am running the restler test like this (in a Docker container):
/RESTler/restler/Restler test --grammar_file /Compile/grammar.py --dictionary_file /Compile/dict.json --settings /.restler/settings.json
The output is:


Using python: 'python3' (Python 3.12.7)
Request coverage (successful / total): 0 / 35
Attempted requests: 0 / 35
No bugs were found.
See 'coverage_failures_to_investigate.txt' to investigate API coverage.
Task Test succeeded.


I see this in the /Test/RestlerResults/experiment*/logs/network.testing.*1.txt file:

2024-12-09 12:47:03.691: Failed to receive response. Success: False, status: Creating, Response: Exception Creating Socket: [Errno -2] Name does not resolve

When I screw up the settings file (replace “Host” with “Howrongst” for example), the result is exactly the same.

I did find logs that show what is inside the HTTP requests that RESTler creates in the /Test directory, however, I cannot find any logs with information on what happens when the settings and token files are loaded or what URL these requests are sent to. I can access our API from the container with wget so I need to find out what RESTler does differently.

Also in the “getting started” documentation file there is a diagram that tells me to refer to Troubleshooting.md in my situation, but the file does not exist.

Could you please add more documentation and logging, or at least point me in the right direction?

Thanks in advance.

@ZhongdaSun
Copy link

would you help to double check your restler_user_settings.json? in this file, it includes "disable_logging". you should set it as true.

@marina-p
Copy link
Contributor

Hello @vojtech9,

Currently, the best way to troubleshoot this is to debug the function set_up_connection in messaging.py. If RESTler does not properly handle the hostname, it may work to instead use the target_ip and target_port in the engine settings json.

Thanks,

Marina

@vojtech9
Copy link
Author

vojtech9 commented Dec 11, 2024

Thank you. It was not loading the "Host" and "Basepath" settings, they should be in lowercase. I was able to proceed.

@vojtech9
Copy link
Author

vojtech9 commented Dec 11, 2024

I think that when RESTler is loading the settings and token files, it should print a helpful error message when it encounters something invalid in those files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants