synaps not responding to API call

Asked by Henry Wong

Synaps is not responding to my API call.

netstat -a gives me this: tcp 0 0 *:8776 *:* LISTEN

When I make an API call with java:
CWSample() throws IOException {
                cw = new AmazonCloudWatchClient(new PropertiesCredentials(new File(

I am getting a connection timeout.

Is the endpoint correct? is my synaps server.

If I put this ( in a web browser, should I get a response?

Also, in my /var/log/synaps-api.log, I have this line in there:
2014-02-27 16:42:02 INFO synaps.wsgi [-] Started cloudwatch on

Instead of, how can I get it to start on

Question information

English Edit question
Synaps Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
June Yi (gochist) said :

It should respond for your browser request or curl command with the endpoint url,

Can you try curl command at the server that synaps api is running? If its response is like below, it might be blocked by firewall or proxy between the client and server route.

$ curl http://localhost:8776/monitor
<?xml version="1.0"?>
<ErrorResponse xmlns=""><Error><Code>Unauthorized</Code><Message>Access key or signature not provided</Message></Error><RequestId>req-b5635798-3248-4138-8344-ecfa3344313a</RequestId></ErrorResponse>

If there is no problem with network, you need to check log files in both server and client. To enable server log, add a line, "logdir=/var/log/synaps" in your synaps.conf and restart synaps api . Be sure that the directory exists. And to enable client log, see .

Revision history for this message
June Yi (gochist) said :

> Instead of, how can I get it to start on

Add this line to your synaps.conf.


ps. If you have additional question, add comment or open new question, please. If you change question description, it is hard to be notified for me.

Revision history for this message
Henry Wong (henry-wong) said :

I added the line but still am receiving the following error even though I am running on the same machine that synaps is installed on:

root@synaps:/etc/synaps# curl
<?xml version="1.0"?>
<ErrorResponse xmlns=""><Error><Code>Unauthorized</Code><Message>Signature not provided</Message></Error><RequestId>req-e41acb42-da9e-47ab-8317-93f888a1a802</RequestId>

</ErrorResponse>root@synaps:/etc/synaps# curl
<?xml version="1.0"?>
<ErrorResponse xmlns=""><Error><Code>Unauthorized</Code><Message>Signature not provided</Message></Error><RequestId>req-7878d98c-f816-4f0d-8843-08e0f43f96d2</RequestId></ErrorResponse>root@synaps:/etc/synaps#

I do not see any proxy or firewalls.

root@synaps:/var/log/synaps# traceroute
traceroute to (, 30 hops max, 60 byte packets
 1 synaps ( 0.047 ms 0.011 ms 0.009 ms

ps:/etc/synaps# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

netcat -vz 8776
Connection to 8776 port [tcp/*] succeeded!
root@synaps:/var/log/synaps# netcat -vz 8777
Connection to 8777 port [tcp/*] succeeded!
root@synaps:/var/log/synaps# netcat -vz 8778
Connection to 8778 port [tcp/*] succeeded!
root@synaps:/var/log/synaps# netcat -vz 8779
Connection to 8779 port [tcp/*] succeeded!

Revision history for this message
Henry Wong (henry-wong) said :

Also, why is the error message pointing to "", is that an URL that we should be able to access from within our synaps server?

Revision history for this message
June Yi (gochist) said :

1. As I see your curl result, server side looks fine. Because you didn't provide signature parameter. Boto or AWS SDK will do it for you. Can you show me your client side log?

2. That xmlns is just for setting xml namespace. You can just ignore it.

Revision history for this message
Henry Wong (henry-wong) said :

Exception in thread "main" com.amazonaws.AmazonServiceException: Status Code: 400, AWS Service: AmazonCloudWatch, AWS Request ID: req-509bf8f4-cf78-401e-9f0a-d7c4c737ca24, AWS Error Code: Unauthorized, AWS Error Message: Signature not provided
 at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(
 at com.amazonaws.http.AmazonHttpClient.executeHelper(
 at com.amazonaws.http.AmazonHttpClient.execute(
 at synaps.CWSample.examListMetrics(
 at synaps.CWSample.main(

Revision history for this message
June Yi (gochist) said :

Synaps doesn't provide AWS signature v4 but v2. But your SDK is using v4. Please use SDK version under 1.3.12 or SPCS branch of SDK. (see )

Revision history for this message
June Yi (gochist) said :

And just for information, I have plan to support signature v4 in near future.

Can you help with this problem?

Provide an answer of your own, or ask Henry Wong for more information if necessary.

To post a message you must log in.