You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
For setting syslog, we have pass directory of string(for ip address) and integer (for port no.). If we try to give both of them (as below), I am getting "Expected a string or unicode object" error.
If we try to set ip address(as string) and port no.(as integer) separately, then we do not see any problem.
rahuls-MacBook-Pro:~ rahulmaheshwari$ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d "{"data": [{"ipaddr":"9.109.116.67", "port": 500}]}" ttps://9.3.164.147/org/openbmc/LogManager/rsyslog/action/Enable
{
"data": {
"description": "Internal Server Error",
"exception": "TypeError('Expected a string or unicode object',)",
"traceback": [
"Traceback (most recent call last):",
" File "/usr/lib/python2.7/site-packages/bottle.py", line 862, in _handle",
" return route.call(*_args)",
" File "/usr/lib/python2.7/site-packages/bottle.py", line 1734, in wrapper",
" rv = callback(_a, **ka)",
" File "/usr/sbin/obmc-rest", line 616, in call",
" return self.callback(_a, *_kw)",
" File "/usr/sbin/obmc-rest", line 707, in wrap",
" resp = {'data': callback(_a, *_kw)}",
" File "/usr/sbin/obmc-rest", line 670, in wrap",
" return callback(_a, *_kw)",
" File "/usr/sbin/obmc-rest", line 695, in wrap",
" return callback(_a, kw)",
" File "/usr/sbin/obmc-rest", line 105, in call",
" return getattr(self, 'do' + request.method.lower())(_kw)",
" File "/usr/sbin/obmc-rest", line 282, in do_post",
" return request.route_data'method'",
" File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 145, in call",
" *_keywords)",
" File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 641, in call_blocking",
" message.append(signature=signature, *args)",
"TypeError: Expected a string or unicode object"
]
},
"message": "500 Internal Server Error",
"status": "error"
}rahuls-MacBook-Pro:~ rahulmaheshwari$ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d "{"data": [{"ipaddr":"9.109.116.67"}]}" https://9.3.164147/org/openbmc/LogManager/rsyslog/action/Enable
{
"data": 0,
"message": "200 OK",
"status": "ok"
}rahuls-MacBook-Pro:~ rahulmaheshwari$ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d "{"data": [{"port": 500}]}" https://9.3.164.147/org/openbc/LogManager/rsyslog/action/Enable
{
"data": 0,
"message": "200 OK",
"status": "ok"
}rahuls-MacBook-Pro:~ rahulmaheshwari$
The text was updated successfully, but these errors were encountered:
For setting syslog, we have pass directory of string(for ip address) and integer (for port no.). If we try to give both of them (as below), I am getting "Expected a string or unicode object" error.
If we try to set ip address(as string) and port no.(as integer) separately, then we do not see any problem.
rahuls-MacBook-Pro:~ rahulmaheshwari$ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d "{"data": [{"ipaddr":"9.109.116.67", "port": 500}]}" ttps://9.3.164.147/org/openbmc/LogManager/rsyslog/action/Enable
{
"data": {
"description": "Internal Server Error",
"exception": "TypeError('Expected a string or unicode object',)",
"traceback": [
"Traceback (most recent call last):",
" File "/usr/lib/python2.7/site-packages/bottle.py", line 862, in _handle",
" return route.call(*_args)",
" File "/usr/lib/python2.7/site-packages/bottle.py", line 1734, in wrapper",
" rv = callback(_a, **ka)",
" File "/usr/sbin/obmc-rest", line 616, in call",
" return self.callback(_a, *_kw)",
" File "/usr/sbin/obmc-rest", line 707, in wrap",
" resp = {'data': callback(_a, *_kw)}",
" File "/usr/sbin/obmc-rest", line 670, in wrap",
" return callback(_a, *_kw)",
" File "/usr/sbin/obmc-rest", line 695, in wrap",
" return callback(_a, kw)",
" File "/usr/sbin/obmc-rest", line 105, in call",
" return getattr(self, 'do' + request.method.lower())(_kw)",
" File "/usr/sbin/obmc-rest", line 282, in do_post",
" return request.route_data'method'",
" File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 145, in call",
" *_keywords)",
" File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 641, in call_blocking",
" message.append(signature=signature, *args)",
"TypeError: Expected a string or unicode object"
]
},
"message": "500 Internal Server Error",
"status": "error"
}rahuls-MacBook-Pro:~ rahulmaheshwari$ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d "{"data": [{"ipaddr":"9.109.116.67"}]}" https://9.3.164147/org/openbmc/LogManager/rsyslog/action/Enable
{
"data": 0,
"message": "200 OK",
"status": "ok"
}rahuls-MacBook-Pro:~ rahulmaheshwari$ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d "{"data": [{"port": 500}]}" https://9.3.164.147/org/openbc/LogManager/rsyslog/action/Enable
{
"data": 0,
"message": "200 OK",
"status": "ok"
}rahuls-MacBook-Pro:~ rahulmaheshwari$
The text was updated successfully, but these errors were encountered: