MCOErrorAuthentication performing background fetch - mailcore2

I'm fetching messages on background from IMAP server using performFetchWithCompletionHandler.
The first thing I do on method implementation is check for network reachability, discarding operation if its no available.
Then I start refresh process executing fetchMessagesOperationWithFolder on a IMAP session.
As result of this operation I usually receive no error, but sometimes I receive an MCOErrorParse (Unable to parse response from server), MCOErrorConnection (A stable connection to the server could not be established) or MCOErrorAuthentication (Unable to authenticate with the current session's credentials).
Can all this errors be produced due to connection failure?
I want to handle the MCOErrorAuthentication to notify user on the credentials error, but in this scenario the credentials are ok, so when I perform any operation when on foreground again with network reachability it will succeed.
Should I do an extra network connection check before proceed on those errors? Should I create a new IMAP session on every operation?
Thanks!
Edit
I'm adding ConnectionLog, it take me long to reproduce the error. Its very clear why I receive a MCOErrorAuthentation: I'm not loading password well.
2014-12-18 21:00:41.212 * OK Gimap ready for requests from 85.58.177.133 et58mb78762219web
2014-12-18 21:00:41.222 1 CAPABILITY
2014-12-18 21:00:41.302 * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 XYZZY SASL-IR AUTH=XOAUTH AUTH=XOAUTH2 AUTH=PLAIN AUTH=PLAIN-CLIENTTOKEN
1 OK Thats all she wrote! et58mb78762219web
2014-12-18 21:00:41.304 2 LOGIN “polferresamon#gmail.com" ""
2014-12-18 21:00:41.378 2 NO Empty username or password. et58mb78762219web
2014-12-18 21:00:41.380 Error fetching messages: Unable to authenticate with the current session's credentials.
So, to really solve MCOErrorAuthentication I have to check IMAP session init, and the process where I'm loading email and password when returning from background.
I guess parse and connection errors are due to connection issues.
Thanks for your help.

Related

Exception found trying to logout from ftp in Mule 4

I am getting Exception found trying to log out from FTP warning while deleting file FTP operation. After the Reconnection strategy, It is working fine. But I have to handle this exception as it is lower down performance.
Expiration Policy with MAX Idle Time set to 2 min and auto-closes the FTP connection, thus avoiding the logout error.

SiebelDataBean - Logon Request XXX on connection XXXXXXX was abandoned

We are using SiebelDataBean to connect to Siebel EAIObjMgrAPI component using below process provided.
https://docs.oracle.com/cd/E14004_01/books/OIRef/Customizing_Siebel_Object_Interfaces12.html
The application works fine for a while and then start throwing below error, kindly let me know if anyone else has encountered this issue.
[CMGR WARNING] Received notification: The task 257950792 has either been shutdown or timed-out connection:f600448
Logon Request 106 on connection 2100445 was abandoned after 30001 ms because it timed out.(SBL-JCA-00317)
Check the SISNAPI idle timeout setting on the EAI component parameters. If there is no activity for that much seconds, the system logs out the session to preserve memory.

ldap_error 81, Server connection lost

I have deployed OpenDJ application on one of the instances and written a java based application as well to access user details from OpenDJ using unbound LDAP SDK. All the things are up and running and working as well.
The issue occurs when the concurrent request for search user hit the OpenDJ and I get the exception as:
Error while checking the user abdulwaheed in LDAP: Error code 81,
message LDAPSearchException(resultCode=81 (server down), numEntries=0,
numReferences=0, errorMessage='The connection to server
rfhat-iam-opendj.net:1389 was closed while waiting for a response to
search request SearchRequest(baseDN='uid=abdulwaheed
,ou=people,dc=domain,dc=com', scope=BASE, deref=NEVER, sizeLimit=1,
timeLimit=0, filter='(objectClass=*)', attrs={}).')
Previously, I thought the issue can be with my java application which is not able to handle multiple concurrent requests and not able to get any free connection but after looking into error code, the error is coming from OpenDj (LDAP_ERROR 81).
I looked into the OpenDJ connection as well and seems like all the config are set to its default value (unlimited).
So, I am not sure what can be the issue and where I can look into it further?

Tracker GV500 - Device management

I currently registered my Quecklink GV500 to cumulocity and I'm able to receive some events and measurements.
But when I try to send command to my Quecklink GV500 registered in Cumulocity but I always hava a FAILED response. For example, I tried to send this command (which is fully supported by the GV500) from SHELL tab: AT+GTTMA=gv500,+,1,0,0,,,,,,FFFF$
And as result I got:
Failure reason: Command currently not supported
I also tried to get the agent logs by using "Log file request" in the "Log" tab of my Device and as result I got:
Failure reason: Cannot build command. Search parameters only allow the
following characters [a-zA-Z0-9_]
Is it normal?
When I look the general information in "Info" tab I have:
Send connection: online
Push connection: inactive
Is it normal that Push connection is marked as inactive?
The tracker-agent in it current state does not use a push connection for receiving operations but does a polling of the operations. Therefore the push connection is always shown as inactive.
If you receive "Failure reason: Command currently not supported" it is an error from the agent not the device. The agent seems not to support shell operations for Queclink.
As for the error on the log file request it seems that there was an unsupported character in the search parameter. Maybe you can share what you entered for the parameters in the UI
Thanks for your answer. For the log file request I let blank value in the search input field. If I try to enter "gl200", I get the following error: Command currently not supported.
So to resume can you confirm that Quecklink devices can't be managed from Cumulocity for the moment? It's supported for which device?

Rails3: ECONNREFUSED Error in Mailer

I have a controller in a Rails 3 app that, after creating a new object of type WorkRequest, sends an e-mail to the requester. Works for all of my users except one. When she tries it I get the following in the server log.
Started POST "/work_requests" for 172.16.42.150 at Mon Aug 08 14:42:53 -0400 2011
Processing by WorkRequestsController#create as HTML
Parameters: {"commit"=>" Save ", "authenticity_token"=>"GhhZ6S0mBaju2zs5Fc7M+u5SoLCke5CRSdVCvLzMK1Q=", "utf8"=>"✓", "work_request"=>{"work_due_date"=>"2011-12-01", "person_id"=>"525", "status"=>"Pending", "last_request_date"=>"", "requester_id"=>"5", "pier_module_id"=>"223"}}
Rendered person_mailer/work_request_init_email.html.erb (2.4ms)
Rendered person_mailer/work_request_init_email.text.erb (1.8ms)
Sent mail to hkitzmiller#acponline.org (409ms)
Completed in 548ms
Errno::ECONNREFUSED (Connection refused - connect(2)):
app/controllers/work_requests_controller.rb:57:in `create'
app/controllers/work_requests_controller.rb:54:in `create'
It appears to have sent the e-mail (she's left for the day so I can't ask if she received it) but the line it's failing on in the controller the line that invokes the mailer, so I'm not sure.
PersonMailer.work_request_init_email(#work_request).deliver
Can't seem to find any solid info on what ECONNREFUSED means. Is the mail server refusing the connect (in which case why does it appear the mail was sent?) or is the web server refusing to connect after the mail is sent.
What might cause either server to refuse a connection with this particular user?
Any help would be much appreciated. All the other users of the app seem to be working fine.
This generally is an error caused by a failed connection to the SMTP server. I'd say double check your settings in your environment files (production.rb most likely) and double check the email address. You might also check to see if there's a limit set by the SMTP server.