What is causing CouchDB changes_reader_died - erlang
I'm trying to configure a filtered replication bidirectionnal between two databases. Each database has a document into the _replicator database that set the replication towards the database. Each database have the same _design document with the filter and they got the same filter parameters.
Although I have been looking over the web, I didn't find the cause of my problem. I hope you guys can help me.
Log output :
[Fri, 26 Aug 2016 19:36:31 GMT] [error] [<0.22247.80>] ** Generic server <0.22247.80> terminating
** Last message in was {'EXIT',<0.22219.80>,changes_reader_died}
** When Server state == {state,<0.22219.80>,<0.22249.80>,20,
{httpdb,
"REPLACEDFORSECURITYREASONS",
nil,
[{"Accept","application/json"},
{"User-Agent","CouchDB/1.6.1"}],
30000,
[{socket_options,
[{keepalive,true},{nodelay,false}]}],
10,250,<0.22065.80>,20},
{httpdb,
"http:REPLACEDFORSECURITYREASONS",
nil,
[{"Accept","application/json"},
{"User-Agent","CouchDB/1.6.1"}],
30000,
[{socket_options,
[{keepalive,true},{nodelay,false}]}],
10,250,<0.22223.80>,20},
[],nil,nil,nil,
{rep_stats,0,0,0,0,0},
nil,nil,
{batch,[],0}}
** Reason for termination ==
** changes_reader_died
[Fri, 26 Aug 2016 19:36:31 GMT] [error] [<0.22243.80>] {error_report,<0.34.0>,
{<0.22243.80>,crash_report,
[[{initial_call,
{couch_replicator_worker,init,['Argument__1']}},
{pid,<0.22243.80>},
{registered_name,[]},
{error_info,
{exit,changes_reader_died,
[{gen_server,terminate,6,
[{file,"gen_server.erl"},{line,744}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,239}]}]}},
{ancestors,
[<0.22219.80>,couch_replicator_job_sup,
couch_primary_services,couch_server_sup,
<0.35.0>]},
{messages,[]},
{links,[<0.22244.80>]},
{dictionary,
[{last_stats_report,{1472,240191,741233}}]},
{trap_exit,true},
{status,running},
{heap_size,233},
{stack_size,27},
{reductions,158}],
[{neighbour,
[{pid,<0.22244.80>},
{registered_name,[]},
{initial_call,{erlang,apply,2}},
{current_function,
{couch_replicator_worker,queue_fetch_loop,5}},
{ancestors,[]},
{messages,[]},
{links,[<0.22243.80>]},
{dictionary,[]},
{trap_exit,false},
{status,waiting},
{heap_size,610},
{stack_size,10},
{reductions,4}]}]]}}
[Fri, 26 Aug 2016 19:36:31 GMT] [error] [<0.22247.80>] {error_report,<0.34.0>,
{<0.22247.80>,crash_report,
[[{initial_call,
{couch_replicator_worker,init,['Argument__1']}},
{pid,<0.22247.80>},
{registered_name,[]},
{error_info,
{exit,changes_reader_died,
[{gen_server,terminate,6,
[{file,"gen_server.erl"},{line,744}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,239}]}]}},
{ancestors,
[<0.22219.80>,couch_replicator_job_sup,
couch_primary_services,couch_server_sup,
<0.35.0>]},
{messages,[]},
{links,[<0.22249.80>]},
{dictionary,
[{last_stats_report,{1472,240191,741235}}]},
{trap_exit,true},
{status,running},
{heap_size,233},
{stack_size,27},
{reductions,162}],
[{neighbour,
[{pid,<0.22249.80>},
{registered_name,[]},
{initial_call,{erlang,apply,2}},
{current_function,
{couch_replicator_worker,queue_fetch_loop,5}},
{ancestors,[]},
{messages,[]},
{links,[<0.22247.80>]},
{dictionary,[]},
{trap_exit,false},
{status,waiting},
{heap_size,610},
{stack_size,10},
{reductions,4}]}]]}}
Best regards.
While doing a deep analyze of the log, I found that there was a timeout error before the changes_read_died.
The error was pretty explicit :
Fri, 26 Aug 2016 20:01:06 GMT] [info] [<0.2238.0>] Replication `"c48f6c26aa44689de43ee5ffaa18c7ad+continuous"` is using:
4 worker processes
a worker batch size of 500
20 HTTP connections
a connection timeout of 30000 milliseconds
10 retries per request
socket options are: [{keepalive,true},{nodelay,false}]
[Fri, 26 Aug 2016 20:01:06 GMT] [info] [<0.2204.0>] XXX.XXX.X.XX- - GET /akpaper/_changes?filter=global%2FbySite&IDSITE=MILLS2&feed=continuous&style=all_docs&since=0&heartbeat=10000 200
[Fri, 26 Aug 2016 20:01:06 GMT] [error] [<0.2204.0>] OS Process Error <0.204.0> :: {<<"compilation_error">>,
<<"Expression does not eval to a function. (ffunction(doc, req) { return doc._deleted || doc.IDSITE == req.query.IDSITE;})">>}
[Fri, 26 Aug 2016 20:01:06 GMT] [info] [<0.2204.0>] XXX.XXX.X.XX - - GET /akpaper/_changes?filter=global%2FbySite&IDSITE=MILLS2&feed=continuous&style=all_docs&since=0&heartbeat=10000 500
[Fri, 26 Aug 2016 20:01:06 GMT] [error] [<0.2204.0>] httpd 500 error response:
{"error":"compilation_error","reason":"Expression does not eval to a function. (ffunction(doc, req) { return doc._deleted || doc.IDSITE == req.query.IDSITE;})"}
All I did to correct the problem was just to correct my filter function wich could not be eval.
for me, the "changes" parser was failing, hence the message: changes_reader_dies
Looking at the replication doc, it seems that it setting the Content-Type to JSON and somehow failing to parse changes. Removing that line fixed it for me:
Bad:
{
"_id": "repl/...",
"_rev": "8-76d8a4dd87f5911b5dccb2527b2304",
"source": {
"url": "
"headers": {
"Authorization": "Basic FaBNwB...",
"Content-Type": "application/json"
}
"target": ...
...
}
Good:
{
"_id": "repl/...",
"_rev": "8-76d8a4dd87f5911b5dccb2527b2304",
"source": {
"url": "
"headers": {
"Authorization": "Basic FaBNwB..."
}
"target": ...
...
}
Related
Caused by: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Connection closed before acknowledgement sent
When trying to connect an agent node (Rhel) using the "java -jar agent.jar -jnlpUrl", the connection is not successful. Getting the error "Protocol JNLP4-connect encountered an unexpected exception" The error stack is below: Jul 05, 2022 12:26:55 AM hudson.remoting.jnlp.Main$CuiListener status INFO: Locating server among [http://app.test.sl.com:8080/] Jul 05, 2022 12:26:55 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping] Jul 05, 2022 12:26:55 AM hudson.remoting.jnlp.Main$CuiListener status INFO: Agent discovery successful Agent address: app.test.sl.com Agent port: 50000 Identity: c8:4d:*:*:*:*:*:*:*:*:*:*:*:*:*:* Jul 05, 2022 12:26:55 AM hudson.remoting.jnlp.Main$CuiListener status INFO: Handshaking Jul 05, 2022 12:26:55 AM hudson.remoting.jnlp.Main$CuiListener status INFO: Connecting to app.test.sl.com:50000 Jul 05, 2022 12:26:55 AM hudson.remoting.jnlp.Main$CuiListener status INFO: Trying protocol: JNLP4-connect Jul 05, 2022 12:26:55 AM org.jenkinsci.remoting.protocol.impl.BIONetworkLayer$Reader run INFO: Waiting for ProtocolStack to start. Jul 05, 2022 12:26:55 AM hudson.remoting.jnlp.Main$CuiListener status INFO: Protocol JNLP4-connect encountered an unexpected exception java.util.concurrent.ExecutionException: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Connection closed before acknowledgement sent at org.jenkinsci.remoting.util.SettableFuture.get(SettableFuture.java:223) at hudson.remoting.Engine.innerRun(Engine.java:799) at hudson.remoting.Engine.run(Engine.java:544) Caused by: org.jenkinsci.remoting.protocol.impl.ConnectionRefusalException: Connection closed before acknowledgement sent at org.jenkinsci.remoting.protocol.impl.AckFilterLayer.onRecvClosed(AckFilterLayer.java:280) at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:825) at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:155) at org.jenkinsci.remoting.protocol.impl.BIONetworkLayer.access$1500(BIONetworkLayer.java:51) at org.jenkinsci.remoting.protocol.impl.BIONetworkLayer$Reader.run(BIONetworkLayer.java:257) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:126) at hudson.remoting.Engine$1$$Lambda$9/0000000048003ED0.run(Unknown Source) at java.lang.Thread.run(Thread.java:820) Jul 05, 2022 12:26:55 AM hudson.remoting.jnlp.Main$CuiListener status INFO: reconnect rejected, sleeping 10s: java.lang.Exception: The server rejected the connection: None of the protocols were accepted at hudson.remoting.Engine.onConnectionRejected(Engine.java:878) at hudson.remoting.Engine.innerRun(Engine.java:825) at hudson.remoting.Engine.run(Engine.java:544) Jenkins Logs javax.net.ssl.SSLHandshakeException: Client requested protocol TLSv1 is not enabled or supported in server context
Unable to print UDF logs in Aerospike
I am not able to print log in UDF(in Lua) of aerospike. Logging configuration in conf file of aerospike is: logging { console { context any info } file /var/log/aerospike/aerospike.log { context any info } file /var/log/aerospike/lua.log { context any critical context aggr debug context udf debug context query debug } } Source code for logging- function filter(topRec) debug("Hello") info("Hello") end
I changed my aerospike.conf to your logging stanza, then registered your module and ran it from AQL. $ tail -7 /var/log/aerospike/lua.log Jan 31 2018 17:41:57 GMT: DEBUG (udf): (udf_record.c:73) [ENTER] Opening record key:<Digest>:0x6902655800a8e0b15d7837a293ed11f6d7bb4e8a Jan 31 2018 17:41:57 GMT: DEBUG (udf): (/opt/aerospike/usr/udf/lua/test.lua:43) Hello Jan 31 2018 17:41:57 GMT: INFO (udf): (/opt/aerospike/usr/udf/lua/test.lua:44) Hello Jan 31 2018 17:41:57 GMT: DEBUG (udf): (udf_record.c:246) [ENTER] Closing record key:<Digest>:0x6902655800a8e0b15d7837a293ed11f6d7bb4e8a Jan 31 2018 17:41:57 GMT: DEBUG (udf): (udf_record.c:374) [ENTER] NumUpdates(0) Jan 31 2018 17:41:57 GMT: DEBUG (udf): (udf_record.c:246) [ENTER] Closing record key:<Digest>:0x6902655800a8e0b15d7837a293ed11f6d7bb4e8a Jan 31 2018 17:41:57 GMT: DEBUG (udf): (udf_record.c:374) [ENTER] NumUpdates(0) Which version are you using? Did you check the file permissions for those log files - can your server write to them?
Tomcat Context stopped Grails GGTS Cloudfoundry plugin
I'm using the cloud foundry plugin. I have set my credentials in Config.groovy. Can you tell me more about the errors I get? Application Deployed URL: 'sqr-gb-ks.cloudfoundry.com' > Would you like to create and bind a mysql service?[y,n] > Invalid input. Must be one of [y,n] y Service 'mysql-8a02c10' provisioned. > Would you like to create and bind a postgresql service?[y,n] > Invalid input. Must be one of [y,n] y Service 'postgresql-d6ab9c9' provisioned. | Creating application sqr-gb-ks at sqr-gb-ks.cloudfoundry.com with 1024MB and services [mysql-8a02c10, postgresql-d6ab9c9]: OK | Uploading Application: | Checking for available resources: OK | Processing resources: OK | Packing application: OK | Uploading (50K): OK | Trying to start Application: 'sqr-gb-ks'..... | Error ERROR - Application 'sqr-gb-ks' failed to start, logs information below. ==== logs/stderr.log ==== Oct 22, 2012 4:57:47 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-25918 Oct 22, 2012 4:57:47 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 403 ms Oct 22, 2012 4:57:47 PM org.apache.catalina.realm.JAASRealm setContainer INFO: Set JAAS app name Catalina Oct 22, 2012 4:57:47 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Oct 22, 2012 4:57:47 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.35 Oct 22, 2012 4:57:47 PM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory ROOT Oct 22, 2012 4:58:10 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Oct 22, 2012 4:58:10 PM org.apache.catalina.core.StandardContext start SEVERE: Context [] startup failed due to previous errors Oct 22, 2012 4:58:10 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Oct 22, 2012 4:58:10 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [] appears to have started a thread named [net.sf.ehcache.CacheManager#403525a2] but has failed to stop it. This is very likely to create a memory leak. ==== logs/stdout.log ==== [ Envjs/1.6 (Rhino; U; Linux amd64 2.6.38-15-virtual; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ] [ Envjs/1.6 (Rhino; U; Linux amd64 2.6.38-15-virtual; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ] [ Envjs/1.6 (Rhino; U; Linux amd64 2.6.38-15-virtual; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ] [ Envjs/1.6 (Rhino; U; Linux amd64 2.6.38-15-virtual; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ] Stopping Tomcat because the context stopped.
If it's a Grails app you should use the http://grails.org/plugin/cloud-foundry plugin instead of STS since it has an awareness of the Spring beans for JDBC, MongoDB, Redis, etc. and will reconfigure them automatically for you on deployment. See the docs here: http://grails-plugins.github.com/grails-cloud-foundry/docs/manual/index.html Also - do you really want both a MySQL and a PostgreSQL database? You should probably pick one :) You can see the actual problem by looking at stacktrace.log and the "localhost" log in the tomcat/logs directory on the server - that's where the real stacktrace and error messages will be, not in the stdout that you see when deploying.
Thanks to my friend bertrand from odelia technologies, I succeeded in pushing my app to the cloud.I turned off one of the plugins I added and ran the command : grails cf-bind-service mysql-f1..(I had not done it!) Then I had to modify my DataSource.groovy; production { dataSource { dialect= org.hibernate.dialect.MySQLInnoDBDialect driverClassName = "com.mysql.jdbc.Driver" dbCreate = "update" username = "n/a" password = "n/a" url = "n/a" } }
What does Diagnostic-Code: SMTP; 573 mean?
I am using sendmail to send mail from my Rails application. But, there seems to be a error happening while sending mails to a specific user domain. The error from /var/mail/*** is as follows: Date: Tue, 11 Oct 2011 16:33:46 GMT From: Mail Delivery Subsystem <MAILER-DAEMON#*****> Message-Id: <201110111633.p9BGXkpR010310#******> To: <****#*****> MIME-Version: 1.0 Content-Type: multipart/report; report-type=delivery-status; boundary="p9BGXkpR010310.1318350826/******" Subject: Returned mail: see transcript for details Auto-Submitted: auto-generated (failure) This is a MIME-encapsulated message --p9BGXkpR010310.1318350826/******* The original message was received at Tue, 11 Oct 2011 16:33:42 GMT from localhost [127.0.0.1] ----- The following addresses had permanent fatal errors ----- <****#{domain}.com> (reason: 573 ********#****** failed to route the address) <*****#{domain}.com> (reason: 573 *******#****** failed to route the address) <*****#{domain}.com> (reason: 573 *******#******* failed to route the address) ----- Transcript of session follows ----- ... while talking to *********.com.1.0001.arsmtp.com.: >>> MAIL From:<*******#*******> SIZE=1273 <<< 573 ********#********* failed to route the address 554 5.0.0 Service unavailable --p9BGXkpR010310.1318350826/******* Content-Type: message/delivery-status Reporting-MTA: dns; StreetSense Received-From-MTA: DNS; localhost Arrival-Date: Tue, 11 Oct 2011 16:33:42 GMT Final-Recipient: RFC822; ****#*******.com Action: failed Status: 5.0.0 Diagnostic-Code: SMTP; 573 *******#******* failed to route the address Last-Attempt-Date: Tue, 11 Oct 2011 16:33:46 GMT Final-Recipient: RFC822; *******#********.com Action: failed Status: 5.0.0 Diagnostic-Code: SMTP; 573 *******#******** failed to route the address Last-Attempt-Date: Tue, 11 Oct 2011 16:33:46 GMT Final-Recipient: RFC822; ******#*********.com Action: failed Status: 5.0.0 Diagnostic-Code: SMTP; 573 *****#******** failed to route the address Last-Attempt-Date: Tue, 11 Oct 2011 16:33:46 GMT The bounced back emails are all from the same domain, and mails are being successfully sent to other domains. When I looked for SMTP 573 diagnostic codes, I got this "573 Internal server error, IP address related.". But I dont know what it means. Can anyone help me? Update From #guenter's answer, I got these commands and I run it and got the following outputs: # dig streetsense.com MX ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>> xxxxx.com MX ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61139 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 4, ADDITIONAL: 4 ;; QUESTION SECTION: ;xxxxx.com. IN MX ;; ANSWER SECTION: xxxxx.com. 3600 IN MX 10 xxxxx.com.1.0001.arsmtp.com. xxxxxx.com. 3600 IN MX 20 xxxxx.com.2.0001.arsmtp.com. ;; AUTHORITY SECTION: xxxxx.com. 155394 IN NS ns04.ntiva.net. xxxxx.com. 155394 IN NS ns01.ntiva.net. xxxxx.com. 155394 IN NS ns02.ntiva.net. xxxxx.com. 155394 IN NS ns03.ntiva.net. ;; ADDITIONAL SECTION: ns01.ntiva.net. 147 IN A xxx.xx.xx.xxx ns02.ntiva.net. 147 IN A xxx.xx.xx.xxx ns03.ntiva.net. 147 IN A xxx.xx.xx.xxx ns04.ntiva.net. 147 IN A xxx.xx.xx.xxx ;; Query time: 45 msec ;; SERVER: xxx.xxx.x.x#xx(xxx.xxx.x.x) ;; WHEN: Tue Oct 11 18:08:23 2011 ;; MSG SIZE rcvd: 262 ping also seem to be working: # ping xxxxxxx.com PING xxxxxxxx.com (xxx.xx.xx.xx) xx(xx) bytes of data. 64 bytes from linux06.ntiva.com (xxx.xx.xx.xx): icmp_seq=1 ttl=53 time=29.0 ms 64 bytes from linux06.ntiva.com (xxx.xx.xx.xx): icmp_seq=2 ttl=53 time=27.4 ms 64 bytes from linux06.ntiva.com (xxx.xx.xx.xx): icmp_seq=3 ttl=53 time=27.4 ms 64 bytes from linux06.ntiva.com (xxx.xx.xx.xx): icmp_seq=4 ttl=53 time=27.4 ms Edit also my hostname of my server seems to be same as the domain name causing issue # hostname xxxxxxx This is same as the domain xxxxxxx.com. Can this cause the issue?
failed to route the address is the key here. Seems that your sendmail doesn't know how to route that address. You need some mail-debugging here. First step could be to check the DNS for MX-records for this domain - dig example.com MX. If there is no MX record, that is the problem. If there are MX record(s), you might try to ping that hosts.
Rails errors causing Apache / Passanger internal server errors
Ok I thought I was close to getting passenger and Apache working. I notice that some gem files were not installed after navigating to the url to see if my rails app was working. Passanger error page let me know what gems were missing so I got them installed. Now going to the URL I get a 500 Apache internal error page with no helpful info so I checked out the log file on the server and here is what I see. Rails Error: Unable to access log file. Please ensure that /home/mydirectory/dev/vb/log/production.log exists and is chmod 0666. $ Rack: /home/mydirectory/dev/vb: symbol lookup error: /usr/local/rvm/gems/ruby-1.9.2-p0#prodset/gems/sqlite3-ruby-1.2.4/lib/sqlite$ [Tue Dec 07 20:12:17 2010] [error] [client 64.58.208.22] Premature end of script headers: [ pid=20653 thr=140618873321280 file=ext/apache2/Hooks.cpp:816 time=2010-12-07 20:12:17.617 ]: The backend application (proce$ Rack: /home/mydirectory/dev/vb: symbol lookup error: /usr/local/rvm/gems/ruby-1.9.2-p0#prodset/gems/sqlite3-ruby-1.2.4/lib/sqlite$ [Tue Dec 07 20:12:43 2010] [error] [client 64.58.208.22] Premature end of script headers: Rack: /home/mydirectory/dev/vb: symbol lookup error: /usr/local/rvm/gems/ruby-1.9.2-p0#prodset/gems/sqlite3-ruby-1.2.4/lib/sqlite$ [Tue Dec 07 20:13:25 2010] [error] [client 64.58.208.22] Premature end of script headers: [ pid=21932 thr=140618873321280 file=ext/apache2/Hooks.cpp:816 time=2010-12-07 20:13:25.168 ]: The backend application (proce$ Rack: /home/mydirectory/dev/vb: symbol lookup error: /usr/local/rvm/gems/ruby-1.9.2-p0#prodset/gems/sqlite3-ruby-1.2.4/lib/sqlite$ [Tue Dec 07 20:13:31 2010] [error] [client 64.58.208.22] Premature end of script headers: [ pid=20623 thr=140618873321280 file=ext/apache2/Hooks.cpp:816 time=2010-12-07 20:13:31.266 ]: The backend application (proce$ Rails Error: Unable to access log file. Please ensure that /home/mydirectory/dev/vb/log/production.log exists and is chmod 0666. $ Rack: /home/mydirectory/dev/vb: symbol lookup error: /usr/local/rvm/gems/ruby-1.9.2-p0#prodset/gems/sqlite3-ruby-1.2.4/lib/sqlite$ [Tue Dec 07 20:24:56 2010] [error] [client 64.58.208.22] Premature end of script headers: [ pid=20622 thr=140618873321280 file=ext/apache2/Hooks.cpp:816 time=2010-12-07 20:24:56.442 ]: The backend application (proce$ Rack: /home/mydirectory/dev/vb: symbol lookup error: /usr/local/rvm/gems/ruby-1.9.2-p0#prodset/gems/sqlite3-ruby-1.2.4/lib/sqlite$ anyone have any suggestions on what I should look at next. I have tried running bundler and also using rvm to install sqlite3 and I still have the same issue. thanks again for any help
Did you checked the suggestion on the first line of the error log? Rails Error: Unable to access log file. Please ensure that /home/mydirectory/dev/vb/log/production.log exists and is chmod 0666.