I get a quite strange error message after executing Install-SecurityDaemon.
I deployed the IoT Edge module image to Azure Registry using Visual Studio Code. Then, I try to execute the IoT Edge solution in the simulator. Everything is ok.
I executed Install-SecurityDaemon. Everything went ok. But when I exec "iotedge list" command, I saw that only two main modules arrived but there is no module developed by me
PS C:\WINDOWS\system32> iotedge list
NAME STATUS DESCRIPTION CONFIG
edgeHub failed Failed (137) an hour ago mcr.microsoft.com/azureiotedge-hub:1.0
edgeAgent running Up 1 second mcr.microsoft.com/azureiotedge-agent:1.0
I'd seen the log and found only one error message:
11.11.2018 22:52:37 warn: edgelet_docker::runtime -- Attempt to pull image failed.
11.11.2018 22:52:42 info: edgelet_core::watchdog -- Checking edge runtime status
11.11.2018 22:52:42 info: edgelet_core::watchdog -- Edge runtime is running.
11.11.2018 22:52:43 warn: edgelet_docker::runtime -- Attempt to pull image failed.
11.11.2018 22:52:43 info: edgelet_http::logging -- [mgmt] - - - [2018-11-11 19:52:43.487711600 UTC] "POST /modules?api-version=2018-06-28 HTTP/1.1" 500 Internal Server Error 141 "-" "-" pid(any)
11.11.2018 22:52:43 warn: edgelet_utils::logging -- Get https://warlibregistry.azurecr.io/v2/iot-edge-engine-simulator/manifests/0.0.1-amd64: unauthorized: authentication required
11.11.2018 22:52:55 info: edgelet_http::logging -- [mgmt] - - - [2018-11-11 19:52:55.502141500 UTC] "POST /modules?api-version=2018-06-28 HTTP/1.1" 500 Internal Server Error 141 "-" "-" pid(any)
11.11.2018 22:52:55 warn: edgelet_utils::logging -- Get https://warlibregistry.azurecr.io/v2/iot-edge-engine-simulator/manifests/0.0.1-amd64: unauthorized: authentication required
Then I execute "docker login" command to be sure, that docker properly authorized in Azure registry. Everything was ok. Then, I reinstall SecurityDaemon. I got the same error.
Executing command
PS C:\WINDOWS\system32> docker pull warlibregistry.azurecr.io/iot-edge-engine-simulator:0.0.1-amd64
0.0.1-amd64: Pulling from iot-edge-engine-simulator
Digest: sha256:4ba6ae6442ca974b2c52459b85c0861e9664f26990c6e87f20829954f4d67d09
Status: Image is up to date for warlibregistry.azurecr.io/iot-edge-engine-simulator:0.0.1-amd64
return no errors. But if try to get manifest https://warlibregistry.azurecr.io/v2/iot-edge-engine-simulator/manifests/0.0.1-amd64 I really got the JSON with the error "unauthorized: authentication required".
In the Azure Portal after adding my module engineSimulator I saw another one iot_edge_engine_simulator with type "Module identity" which is not created by me. When I installed e.g. Microsoft module termoSensor - there is no such additional module.
So, I'm stuck, I don't know why the error occurs and what to do further.
Thank you for a help!
I found the mistake. When I set the module I missed filling "Container Registry Settings". In the case of using your own container registry (not Microsoft), you MUST fill authorization parameters.
In my case:
NAME: WarlibRegistry
ADDRESS: warlibregistry.azurecr.io
USERNAME & PASSWORD from the "Access keys" section of your container registry.
I'm having trouble deciphering this error message that I'm getting when hitting a simple endpoint created with Cowboy. I created a simple app with cowboy (https://github.com/overture8/cow_app) then started the app using rebar3 shell (not sure if this is correct?). Anyway, I'm getting this error when hitting the endpoint:
Error in process <0.232.0> with exit value:
{[{reason,undef},
{mfa,{hello_handler,init,3}},
{stacktrace,
[{hello_handler,init,
[{tcp,http},
{http_req,#Port<0.7138>,ranch_tcp,keepalive,<0.232.0>,<<"GET">>,
'HTTP/1.1',
{{127,0,0,1},49651},
<<"127.0.0.1">>,undefined,8010,<<"/">>,undefined,<<>>,
undefined,[],
[{<<"host">>,<<"127.0.0.1:8010">>},
{<<"connection">>,<<"keep-alive">>},
{<<"cache-control">>,<<"max-age=0">>},
{<<"upgrade-insecure-requests">>,<<"1">>},
{<<"user-agent">>,
<<"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36">>},
{<<"accept">>,
<<"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8">>},
{<<"dnt">>,<<"1">>},
{<<"accept-encoding">>,<<"gzip, deflate, sdch">>},
{<<"accept-language">>,
<<"en-GB,en;q=0.8,en-US;q=0.6,fr;q=0.4">>}],
[{<<"connection">>,[<<"keep-alive">>]}],
undefined,[],waiting,<<>>,undefined,false,waiting,[],<<>>,
undefined},
[]],
[]},
.
.
.
Maybe I'm just doing something completely wrong - this is my first experience with using Erlang.
Any help would be greatly appreciated.
Your rebar.lock is out of sync with rebar.config and is pointing to version 1.0.1 of cowboy which requires init/3 to be exported, not init/2, which is what the error ... {reason,undef}, {mfa,{hello_handler,init,3}}, ... means.
To fix, run rebar3 upgrade cowboy and then run rebar3 shell. After I run that, the application works fine for me:
$ curl -i http://localhost:8010/
HTTP/1.1 200 OK
server: Cowboy
date: Wed, 07 Sep 2016 09:57:22 GMT
content-length: 13
content-type: text/plain
Hello Erlang!
Successfully installed influxdb on windows and everything is working as expected locally. But having trouble posting data from outside using http api.
I am able to connect to admin panel locally through
http://localhost:8083/
I am using below command for posting data from a remote server:
curl -i -XPOST 'http://172.29.6.195:8086/write?db=telegraf' --data-binary 'test_load,host=njxap1dbadm01 value=13.64'
I am getting below success message:
HTTP/1.1 204 No Content
Request-Id: d3b58c0c-f620-11e5-80a1-000000000000
X-Influxdb-Version: unknown
Date: Wed, 30 Mar 2016 02:40:55 GMT
log on server side:
[http] 2016/03/29 22:40:55 172.29.18.10 - - [29/Mar/2016:22:40:55
-0400] POST /write?db=telegraf HTTP/1.1 204 0 - curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC
zlib/1.2.3 libidn/1.18 libssh2/1.4.2
d3b58c0c-f620-11e5-80a1-000000000000 0
Even though I got the sucess message on client side some how the data is not getting saved on the database.
I checked for the data from admin panel and returning no data.Checked with curl get also no results.
I have retention policy of 1day for my database.
Please help me resolve with the issue of why the data is not getting saved to database.
I'm trying to reproduce this, but I'm not able to with the latest version on InfluxDB.
~$ curl -i -XPOST 'http://localhost:8086/write?db=telegraf' --data-binary 'test_load,host=njxap1dbadm01 value=13.64'
HTTP/1.1 204 No Content
Request-Id: 38fcfb17-fac3-11e5-8004-000000000000
X-Influxdb-Version: unknown
Date: Tue, 05 Apr 2016 00:13:28 GMT
Logs:
[http] 2016/04/04 17:13:28 ::1 - - [04/Apr/2016:17:13:28 -0700] POST /write?db=telegraf HTTP/1.1 204 0 - curl/7.43.0 38fcfb17-fac3-11e5-8004-000000000000 3.776752ms
Querying:
> use telegraf
Using database telegraf
> show series
key
test_load,host=njxap1dbadm01
> select * from test_load
name: test_load
---------------
time host value
1459815208633910164 njxap1dbadm01 13.64
Do you know what version of InfluxDB you are using?
On a fresh install of neo4j-community-2.2.4 I get the message "Invalid username or password." when submitting the login form at localhost:7474/browser with the default username neo4j and password neo4j.
I did enable org.neo4j.server.webserver.address=0.0.0.0 and dbms.security.auth_enabled=true with a server stop and start and a browser shift-reload.
I then changed the property org.neo4j.server.webserver.address=127.0.0.1 to match my /etc/hosts and tried on 127.0.0.1:7474/browser but got the same message.
Here is the browser console output:
Remote Address:127.0.0.1:7474
Request URL:http://localhost:7474/db/data/
Request Method:GET
Status Code:401 Unauthorized
Request Headersview source
Accept:application/json, text/plain, */*
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8,fr;q=0.6,ru;q=0.4,es;q=0.2,sv;q=0.2,nb;q=0.2,et;q=0.2
Authorization:Basic bmVvNGo6bmVvNGo=
Cache-Control:no-cache
Connection:keep-alive
Cookie:languageCodeAdmin=en; PHPSESSID=vcbvfkvj3shajhlh5u2pue9i70; admin_template_phone_client=0; admin_template_touch_client=0; admin_template_model=1
Host:localhost:7474
If-Modified-Since:Wed, 11 Dec 2013 08:00:00 GMT
Pragma:no-cache
Referer:http://localhost:7474/browser/
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.120 Chrome/37.0.2062.120 Safari/537.36
X-stream:true
Response Headersview source
Content-Length:135
Content-Type:application/json; charset=UTF-8
Date:Sat, 19 Sep 2015 09:14:03 GMT
Server:Jetty(9.2.4.v20141103)
WWW-Authenticate:None
{
"errors" : [ {
"message" : "Invalid username or password.",
"code" : "Neo.ClientError.Security.AuthorizationFailed"
} ]
}
So I then tried to change the default password.
To do that, I first disabled the authentication with a dbms.security.auth_enabled=false and a server stop and start.
And I then tried the following curl request:
curl -H "Accept:application/json; charset=UTF-8" -H "Content-Type: application/json" "http://localhost:7474/user/neo4j/password" -X POST -d "{ \"password\" : \"neo4j\" }" -i
But it gives me the response:
HTTP/1.1 404 Not Found
Date: Sat, 19 Sep 2015 09:25:38 GMT
Access-Control-Allow-Origin: *
Content-Length: 0
Server: Jetty(9.2.4.v20141103)
Since you get an authentication error on your browser request which uses the default credentials neo4j:neo4j your database has already a different password configured. To reset it to default, stop neo4j, delete data/dbms/auth and start it again. Now you can use the default pw.
In my case Neo4J windows services was not installed just followed below steps
neo4j.bat install-service
neo4j.bat status
neo4j.bat start
it worked, cheers
I've got an embedded experience gadget configured for the IBM Connections activity stream. It seems that the OAuth dance never succeeds, only returning me to the beginning of the OAuth dance (prompt for authorisation).
I see errors like this:
[2/25/14 7:17:45:197 EST] 000000c2 BasicOAuth2Me 3 JSONException parsing response
org.apache.commons.json.JSONException: Error occurred during input read.
Caused by: java.io.IOException: Unexpected character '<' on line 1, column 1
at org.apache.commons.json.internal.Tokenizer.next(Tokenizer.java:185)
at org.apache.commons.json.internal.Parser.parse(Parser.java:114)
at org.apache.commons.json.internal.Parser.parse(Parser.java:85)
at org.apache.commons.json.JSONObject.<init>(JSONObject.java:128)
at org.json.JSONObject.<init>(JSONObject.java:41)
...which may suggest that XML is returned from something instead of JSON.
I'm also seeing POST /connections/opensocial/gadgets/makeRequest HTTP/1.1
returning:
HTTP/1.1 200 OK
Date: Tue, 25 Feb 2014 12:54:12 GMT
Server: IBM_HTTP_Server
X-Powered-By: Servlet/3.0
X-LConn-Auth: true
X-UA-Compatible: IE=EmulateIE7
Cache-Control: no-cache
Expires: Tue, 25 Feb 2014 12:54:12 GMT
Pragma: no-cache
Content-Disposition: attachment;filename=p.txt
Content-Length: 1029
Content-Type: application/json;charset=UTF-8
Content-Language: en-US
throw 1; < 'invalid javascript' > {"http://appfusions.demos.ibm.com:2990/jira/rest/api/2/issue/DEMO-12/transitions?expand=transitions.fields":{"rc":200,"body":"","oauthApprovalUrl":"http://appfusions.demos.ibm.com:2990/jira/plugins/servlet/af/oauth/authorize?client_id=8821f0cfd9264c4ed08b00861016886c&realGadgetUri=http%3A%2F%2Fappfusions.demos.ibm.com%3A2990%2Fjira%2Frest%2Fgadgets%2F1.0%2Fg%2Fcom.appfusions.jira.connections.jira-immersive-for-connections%3Aconnections-gadgets%2Fgadgets%2Fjira-ee.xml&redirect_uri=https%3A%2F%2Fconnectionsww.demos.ibm.com%2Fconnections%2Fopensocial%2Fgadgets%2Foauth2callback&response_type=code&state=WIn_8DLhmOeRc8aIYomi0j2XGIAAd7Ke3j2E4y9SbXpD6aZcmU_sKbJpOh4CEuJKr1NLEEsm8xAB-gzYz9laubsztcW-I-YC8gfq67kGbW2wxYhFh6PCaqEZgAhzD7sfRGsj_bBLykeVpSCRZCI7h8pbO9UbtiBfKDKUDwyqm2t35GWi0DV3KcWZlnKso97-z8Xlzj5AysY5ifWux0nJwHCLJ70Fq4wV738SQ5ZDExqSQkaiGY-w7NlJRHRCVP0wJzIEWP2fsSkNMbN8ui4ULLD1kR0w4T_VlBYS1QXbjvXJ6XUwEc7xhusC2ixvDzhBjjLOmbrwqOdMQnFRrxilX--Q9mI","DataHash":"qgeopmcf02p09qc016cepu22fo"}}
Here's a full trace.log -- I'm currently logging to trace with these packages:
*=info:
com.ibm.social.pim.resource.*=all:
com.ibm.lconn.homepage.services.widget.*=all:
com.ibm.lconn.news.*=all:
com.ibm.lconn.events.*=all:
com.ibm.lotus.search.engine.*=all:
com.ibm.lotus.search.index.*=all:
com.ibm.lconn.mailin.*=all:
com.ibm.lotus.connections.core.notify.*=all:
com.ibm.lconn.scheduler.*=all:
org.apache.shindig.*=all
I'd love to know a good way of debugging that JSONException as well as more into on the makeRequest POST.
Any clues on how to debug further are greatly appreciated.
Update
I've updated the trace.log after Paul's logging suggestion and I'm now seeing exceptions while storing OAuth information:
[2/27/14 7:16:17:062 EST] 0000014e RetryConnecti 3 Exception caught during attempt
org.springframework.dao.DataIntegrityViolationException: SqlMapClient operation; SQL [];
--- The error occurred in resources/news/oauth/OAuth2TokenSQL.xml.
--- The error occurred while applying a parameter map.
--- Check the insert-OAUTH2_TOKEN-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.ibm.db2.jcc.am.SqlIntegrityConstraintViolationException: Assignment of a NULL value to a NOT NULL column "TBSPACEID=5, TABLEID=14, COLNO=4" is not allowed.. SQLCODE=-407, SQLSTATE=23502, DRIVER=4.13.80; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in resources/news/oauth/OAuth2TokenSQL.xml.
--- The error occurred while applying a parameter map.
--- Check the insert-OAUTH2_TOKEN-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: com.ibm.db2.jcc.am.SqlIntegrityConstraintViolationException: Assignment of a NULL value to a NOT NULL column "TBSPACEID=5, TABLEID=14, COLNO=4" is not allowed.. SQLCODE=-407, SQLSTATE=23502, DRIVER=4.13.80
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:228)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:212)
at org.springframework.orm.ibatis.SqlMapClientTemplate.insert(SqlMapClientTemplate.java:397)
at com.ibm.lconn.news.data.dao.impl.ibatis.CrudDao.insert(CrudDao.java:394)
at com.ibm.lconn.news.data.dao.impl.ibatis.oauth.OAuth2TokenDao.insert(OAuth2TokenDao.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
The OAuth provider appears to be supplying OAuth tokens correctly from what I can see -- also in trace.log
I've installed tcpflow on the IBM Connections machine. Tracking the server side OAuth flow on the IBM Connections machine using...
root$ tcpflow -p -c -i eth0 port 2990 | grep -oE '(GET|POST|HEAD) .* HTTP/1.[01]|Host: .*' > cnx-outgoing-2990.log
I've found a 404 error on the OAuth provider when IBM Connections POSTs to the access_token URL -- will concentrate on that :)