Error Settings: The request to /api/wazuh-api/checkAPI took too long and was aborted.

828 views
Skip to first unread message

Danielle Johnson

unread,
Dec 20, 2017, 4:02:12 PM12/20/17
to Wazuh mailing list
I receive the error below whenever I save the API credentials:

Settings: The request to /api/wazuh-api/checkAPI took too long and was aborted.

I've restarted the  wazuh-api service.
I've verified that 55000 port is opened on the server.
I'ved ran the commands below:

curl -XDELETE localhost:9200/.kibana
curl -XDELETE localhost:9200/.wazuh
curl -XDELETE localhost:9200/.wazuh-version

I'm unsure what else to check on the server. Has anyone encounter this issue?

Thanks,


Jesús Ángel González

unread,
Dec 20, 2017, 4:16:00 PM12/20/17
to Danielle Johnson, Wazuh mailing list
Hi Danielle this happens whenever a requests take more than exactly 4 seconds. Could you open your internet browser and try to call directly to the API? To do this write the url api IP on the url bar with the api port. If your API is at 10.0.0.2 on port 55000 under http the url should to be http://10.0.0.1:55000/ then press enter and let me know if you see any response. If you have no response doing this means that there is a connection problem, otherwise we need to continue searching other troubles.

Best regards,
Jesús.


--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.
To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/77491971-7e64-44f9-932b-ffd5c8e06839%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--

Jesús Ángel González Novez
Wazuh, Inc.

Danielle Johnson

unread,
Dec 21, 2017, 8:24:49 AM12/21/17
to Wazuh mailing list
If I go to the url, I receive a prompt for my OSSEC API credentials. The credentials I setup, isn't working. Now, the error is no longer appearing for the API configuration in the GUI, but if I click save, nothing happens. It loads for one second, but it's not saving the API configuration. I went to
cd /var/ossec/api/configuration/auth and ran sudo node htpasswd -c user myUserName, I then restarted the wazuh-api, but it's not accepting the credentials.  

On Wednesday, December 20, 2017 at 4:16:00 PM UTC-5, Jesús Ángel González wrote:
Hi Danielle this happens whenever a requests take more than exactly 4 seconds. Could you open your internet browser and try to call directly to the API? To do this write the url api IP on the url bar with the api port. If your API is at 10.0.0.2 on port 55000 under http the url should to be http://10.0.0.1:55000/ then press enter and let me know if you see any response. If you have no response doing this means that there is a connection problem, otherwise we need to continue searching other troubles.

Best regards,
Jesús.


El El mié, 20 dic 2017 a las 22:02, Danielle Johnson <nachay...@gmail.com> escribió:
I receive the error below whenever I save the API credentials:

Settings: The request to /api/wazuh-api/checkAPI took too long and was aborted.

I've restarted the  wazuh-api service.
I've verified that 55000 port is opened on the server.
I'ved ran the commands below:

curl -XDELETE localhost:9200/.kibana
curl -XDELETE localhost:9200/.wazuh
curl -XDELETE localhost:9200/.wazuh-version

I'm unsure what else to check on the server. Has anyone encounter this issue?

Thanks,


--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+unsubscribe@googlegroups.com.

To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.
To view this discussion on the web visit https://groups.google.com/d/msgid/wazuh/77491971-7e64-44f9-932b-ffd5c8e06839%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Danielle Johnson

unread,
Dec 21, 2017, 9:10:30 AM12/21/17
to Wazuh mailing list
Ok. I see that it's  accepting the default password foo and bar when I log into https://ipaddress:55000, but I thought this was changed when I ran htpasswd. Is there another file I need to change?

Danielle Johnson

unread,
Dec 21, 2017, 9:41:20 AM12/21/17
to Wazuh mailing list
Ok. It's working now. Here's what I did to resolve the problem:

I removed wazuh-manager
rebooted the server
I deleted the rpm repo for wazuh at
/etc/yum.repos.d/wazuh.repo
Added the repo again.

cat > /etc/yum.repos.d/wazuh.repo <<\EOF [wazuh_repo] gpgcheck=1 gpgkey=https://packages.wazuh.com/key/GPG-KEY-WAZUH enabled=1 name=Wazuh repository baseurl=https://packages.wazuh.com/3.x/yum/ protect=1 EOF
I ran
yum install wazuh-manager

curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
yum install nodejs - I received an error stating it couldn't locate the nodejs file. I went to https://rpm.nodesource.com/pub_6.x/el/7/x86_64/
I did a wget for the latest nodjs rpm. I installed the rpm
I installed wazuh-api
Verified that the wazuh-api service was running.

I attempted to add the credentials again, but I received the original message timed out.
I then went to /var/ossec/api/configuration/config.js and verified my config.host and https configurations were correct.
I was still receiving the same message.

I cd to /var/ossec/api/configuration/auth

sudo node htpasswd -c user myUserName
setup a password. 
Restarted the wazuh-api service I

I changed the url to http.

It's working now, but I'm unsure what changes fixed my issue, but maybe this might help others.




Jesús Ángel González

unread,
Dec 21, 2017, 9:47:53 AM12/21/17
to Danielle Johnson, Wazuh mailing list
Great Danielle, it was a mistaken with the api credentials or something similar I’m happy that you resolved it, also I was working to show more detailed information when some request goes wrong, thanks for the feedback and let me know if have any more trouble.

Best regards,
Jesús.

--
You received this message because you are subscribed to the Google Groups "Wazuh mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wazuh+un...@googlegroups.com.

To post to this group, send email to wa...@googlegroups.com.
Visit this group at https://groups.google.com/group/wazuh.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages