How do I Update Fi Star Health Questionnaire with New/Updated Questions? - fiware

I am trying to update the Fi-Star Health Questionnaire and am getting into some issue which I am not sure how to solve, tried already many different things.
Basically, everything looks very clear and straight forward, I updated the schema file we are using: dataLoadQuestionnaire_QSE_beta.csv in the HQSE_curl_tester directory
and then tried to run the load command (see below):
~/HQ/HQSE_code/HQSE_curl_Tester$ sudo curl -X POST -H "Content-Type :
multipart/form-data" --form stream="#dataLoadQuestionnaire_QSE_beta.csv"
127.0.0.1:8080/questionnaire.mng.rest/rest/ktek/questionnaire/load -v
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> POST /questionnaire.mng.rest/rest/ktek/questionnaire/load HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 127.0.0.1:8080
> Accept: */*
> Content-Type : multipart/form-data
> Content-Length: 20910
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=------------------------
b73558337a
324ed0
>
< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
* Server Apache-Coyote/1.1 is not blacklisted
< Server: Apache-Coyote/1.1
< Date: Mon, 29 Feb 2016 08:17:57 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
<
* Connection #0 to host 127.0.0.1 left intact
{"Boolean":false}
I tried with using http 1.0, and tried to send different headers, but i seem to continue to get this connection to host left intact and boolean false, and so my live questionnaire doesn't get updated.
Need help with this.
Anyone knows how to work with Fi-Star Health Questionnaire SE and can help?

This feature is not supported.
Changing a live (active) questionnaire is not supported.
You have to create a new questionnaire.

Related

Postfix EHLO Banner

I have a peculiar problem with Postfix 3.1.0:
When a connecting client issues EHLO, the server responds with a line that contains its internal hostname, instead of the expected value of the smtpd_banner parameter.
telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 mxdomain.com ESMTP
EHLO a.aa
250-localhost.name.internal
250-PIPELINING
250-SIZE 41943040
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250 8BITMIME
In the above example
the mxdomain.com ESMTP has been configured using smtpd_banner = mxdomain.com ESMTP in main.cf.
The localhost.name.internal text, I would like to have to be the same mxdomain.com text. The current value comes from $myhostname
How do I make the second banner contain mxdomain.com, or can it be removed somehow?
How do I make the second banner contain mxdomain.com, or can it be removed somehow?
Don't set smtpd_banner, set myhostname instead e.g.:
myhostnasme = mx.domain.com

Can't receive email with msmtp using google account

I'm experiencing issue with msmtp on my backup server (OpenSUSE 12.2). I'm trying to send email everytime some of my backups fail. For this reason I would like to use msmtp. I have everything setted up. However, even though I see sent items in my "Sent" AND "Inbox" folder in Gmail, I never received single email on my desired Email account. Could anyone help me please? Scripts follow bellow. Please see that recipient is my gmail acc in log even though in text.txt is different.
.msmtprc
account default
host smtp.gmail.com
port 587
protocol smtp
from myemail#gmail.com
tls on
tls_starttls on
#tls_trust_file /etc/ssl/certs/ca-certificates.crt
tls_certcheck off
tls_nocertcheck
auth on
user myemail#gmail.com
password Mypassword
logfile ~/.msmtp
.msmtp
Feb 25 09:44:28 host=smtp.gmail.com tls=on auth=on user=myemail#gmail.com
from=myemail#gmail.com recipients=myemail#gmail.com mailsize=130 smtpstatus=250
smtpmsg='250 2.0.0 OK 1393317868 g1sm73904348eet.6 - gsmtp' exitcode=EX_OK
text.txt
From: Daily backups <myemail#gmail.com>
To: Recipient's Name <hisemail#domain.com>
Subject: Backup report
Sample text
Command for send email
$ cat text.txt | msmtp -a default myemail#gmail.com
Big thank to all of those who will try to help me.
David
This works for me....
account default
host smtp.gmail.com
port 587
logfile /tmp/msmtp.log
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth login
user myemail#gmail.com
password MyPassWord1
from First LastName
account account2
And then from raspberry Pi command line
echo -e "Subject: Test Mail\r\n\r\nThis is a test mail" |msmtp --debug --from=default -t destinationaddress#gmail.com

create user/group not working using curl

I am working on using box apis to create enterprise user and group. I am unable to create the user/group through curl or through java code as the request results in Forbidden error (403). Please note that the auth token has been created using enterprise admin credentials which could create the user/group in Box admin console.
Following is the curl command and its response :-
curl --insecure https://api.box.com/2.0/groups -H "Authorization: Bearer AUTH-TOKEN" -H "Content-type: application/json" -d "{"\"name"\": "\"family"\"}" -X POST -v
RESPONSE :-
> POST /2.0/groups HTTP/1.1
> User-Agent: curl/7.27.0
> Host: api.box.com
> Accept: */*
> Authorization: Bearer <AUTH-TOKEN>
> Content-Length: 18
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 18 out of 18 bytes
< HTTP/1.1 403 Forbidden
< S erver: nginx
< Date: Fri, 13 Dec 2013 13:04:52 GMT
< Content-Length: 0
< Connection: keep-alive
< WWW-Authenticate: Bearer realm="Service", error="insufficient_scope", error_description="**The request requires higher privileges than provided by the access token."**
Thanks,
Alevi
To call APIs that manage users you have to meet several permissions requirements.
1) The app you build has to have "Manage an Enterprise" scope (Set this up in your application management console in the "OAuth2 parameters"
2) The user logging into your app has to have co-admin permissions
3) The co-admin has to specifically be allowed to "manage users"
Unless you meet all those criteria, you won't be able to call the API to add a user.
If you do, it should be a simple POST to ./users with a json payload with the user object. See http://developers.box.com/docs/#users-create-an-enterprise-user for an example CURL call
I think you may just have the wrong slash.
Try this:
curl https://api.box.com/2.0/groups -H "Authorization: Bearer ACCESS_TOKEN" -d "{\"name\”: \“my group\”}" -X POST

Mysql-client cannot connect new ip

Mysql client is behaving strangely on one of my servers.
I have my mysql server (ip 10.0.0.190, used to be 172.16.0.190).
I have another server from which I try to connect, which I will refer to as collab.
Bind address is set to 0.0.0.0 server-side, as well as the Grant options for collab.
When I try to connect through mysql-client, here is what I do :
> mysql -u user -p -h mysql.domain
This doesn't work, and after 30s I get this error message :
ERROR 2003 (HY000): Can't connect to MySQL server on 'mysql.domain' (110)
Now the weird thing is that if I do :
> mysql -u user -p -h 10.0.0.190
Everything works correctly. At first, I thought it was a DNS issue, so I tried ping, dig which all answered properly. ie, from client :
> ping mysql.domain
64 bytes from mysql.domain (10.0.0.190): icmp_req=1 ttl=64 time=0.999 ms
So I launched tcpdump on both the server and the client. On the server I get nothing.
On the client :
> tcpdump port 3306
[ ... ]
11:11:41.139499 IP client.domain.49186 > 172.16.0.190.mysql
[ ... ]
As I said, 172.16.0.190 used to be the client's IP before I switched my network. I understand this is where the error comes from, but I can't figure out how to solve it.
Obviously the error comes from the collab but I can't figure out where does it comes from. I've tried to grep '172.16.0' in my /etc on collab in case I had forgotten anything, but nothing came back.
Moreover, when I try to connect from another server using the FQDM, it works.
Anyone has an idea ?
Thanks,
Cheers
H
this may be a DNS cache issue. Try flushing your cache. If you are on windows/osx, look at this: http://docs.cpanel.net/twiki/bin/view/AllDocumentation/ClearingBrowserCache
I'm not sure what has to be done on Linux.
(Flush on CLIENT side, by the way).

Getting content from PHP: Trouble with POST and query

Apologies for my longest question on SO ever. I'm trying to interface with a php frontend for a mysql database in ROOT (a CERN framework in C++ for high energy physics analysis). To start off with, I tried to get this php interface to play nice with wget and curl first because I'm more familiar with them. The following command works:
wget --post-data "hostname=localhost:3306&un=joeuser&pw=psswd&myquery=show_spazio_databases;" http://some.host.edu/log/log_query_matlab.php
The results are:
database1
database2
That's good. If I leave out the --post-data then I get the result:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'admin'#'localhost' (using password: NO) in /log/log_query_matlab.php on line 6
i'm dead! Access denied for user 'admin'#'localhost' (using password: NO)
Warning: mysql_query() [function.mysql-query]: Access denied for user 'admin'#'localhost' (using password: NO) in /log/log_query_matlab.php on line 29
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /log/log_query_matlab.php on line 29
I have access to the php script (read only), but the error itself isn't too important. What matters it that using ROOT, I use a function called as socket.SendRaw(message, message.Length()) (socket is a TSocket) and this gives me the same "error" as wget without the post data switch if my "message" is
"POST http://some.host.edu/log/log_query_matlab.php?hostname=localhost:3306&un=joeuser&pw=psswd&myquery=show_spazio_databases"
This may be in vain, but does someone knows a way I should format the "message" that includes something that is equivalent to the --post-data switch. Or, is there a standard way to format POST requests in a single line (I've seen multi-line stuff. Is that right?) Sorry I'm clueless!
PS. The mysql query is show databases but the space has been replaced with _spazio_, Italian for space. The author of the db and php interface requires it (and various replacements for symbols), but has anyone seen this before? Trying to troubleshoot that was terrible!
The correct "one liner" (had to be multiline) was:
POST http://some.host.edu/log/log_query_matlab.php HTTP/1.1
Host: some.host.edu
Content-Type: application/x-www-form-urlencoded
Content-Length: 73
hostname=localhost:3306&un=joeuser&pw=psswd&myquery=show databases
The end of each line has \r\n. The gap after content-length has two sets of those.