Skip to main content
Inspiring
June 25, 2019
Question

ORA-01012: Not Logged On Error after CF2018 upgrade

  • June 25, 2019
  • 3 replies
  • 3291 views

After CF2018 Upgrade from CF11, I get an intermittent ORA-01012:Not logged on error. Anyone know what's causing this? Note: The obvious question, am I logged in? Yes, via the Oracle Datasource in CFAdmin.

    This topic has been closed for replies.

    3 replies

    BKBK
    Community Expert
    Community Expert
    February 28, 2021

    @cbeckwith  and @mattInVail 

    You have observed that the issue:

    • seems to affect a specific datasource;
    • occurs only intermittently;
    • is related to connection idle-timeout

     

    That leads me to wonder whether, for that specific db-user/datasource:

    • the Oracle driver is creating many more connections than needed;
    • some of the connections in the connection-pool go stale;
    • once in a while, ColdFusion selects a stale connection from the connection-pool.

     

    If so, then it might help to:

     

    1. restrict the maximum number of connections for the specific datasource to, say, 5; 
    2. reduce the time interval in which connections are checked, from the default 7 minutes to, say, 2 minutes;
    3. do 1. and 2., experimenting with your own choice of values.

     

     

     

    Inspiring
    March 1, 2021

    That is my feeling as well. I tried editing the settings as you described on a test environment, but in the oposite direction. I would realy like to be able to recreate the issue so that I can know that I am fixing it. Even with large intervals and 2 connections, I wasn't able to force any errors. 

     

    While digging through the error logs, I found a lot of java.lang.threadeath errors. I have recently implemented cfthread "terminate" in the code similar to that described here. https://www.bennadel.com/blog/3532-time-boxing-a-cfthread-and-then-terminating-it-if-it-takes-too-long-to-complete-in-coldfusion.htm . I also read about some of the dangers of how terminate is handled, https://stackoverflow.com/questions/57811387/coldfusion-terminate-cfthread-in-separate-req . This all adds up for what would force connections to not close/recycle correctly. I am currently trying to prove this theory. 

    Charlie Arehart
    Community Expert
    Community Expert
    March 11, 2021

    Hey, Matt. Any update on things? Also, are you still thinking the "not logged on" errors are due to "connections not closing/recycling correctly"? And if so, that's interesting to hear that doing cfthread termination as you describe might be an underlying cause. (It would also explain why this is not something that's come up often, at least that I've ever seen.) Would be great to hear if you confirmed things or, better, may have been able to resolve them.

    /Charlie (troubleshooter, carehart. org)
    cbeckwithAuthor
    Inspiring
    June 25, 2019

    Apparently the Secure Profile tightened security too much.  We reinstalled without that option and added our security settings from the cfadmin.  Problem seems to have gone away.

    Charlie Arehart
    Community Expert
    Community Expert
    June 25, 2019

    Hmm. This may not be "good news", but I will share it for others who may come across this problem and solution.

    Were you aware that you didn't need to "reinstall [CF] without that option"? You could have just gone to the CF Admin Security section, chosen "secure profile", and clicked the checkbox to turn it off.

    You mentioned having come from CF11.  Perhaps you hadn't noticed it, but that feature was in 11 as well (added then, because in CF10 instead it WAS indeed only an installation option. You may have been operating under that old presumption.)

    Glad you got things sorted, of course.

    I wonder if it had to do with the limitation of what operations could be done in the datasource (as set in the "advance settings" feature of the CF Admin). If so, then simply editing those settings for the DSN in question may also have been sufficient.

    I add this in case you (or someone there) might want to retry turning on secure profile (for its strong security benefits), to see if a change in the DSN lets it work while all the other sec profile features would benefit you. FWIW, note also that everything in the sec profile is an individual CF Admin setting that can be controlled individually, albeit from a separate admin page for each (which could be improved).

    /Charlie (troubleshooter, carehart. org)
    cbeckwithAuthor
    Inspiring
    June 28, 2019

    This may be an odd recovery action, but to get rid of the ORA-01012 error, we had to make the Oracle idle time setting unlimited, and then we got Open_Cursor limit exceeded.  It was 300, we gradually adjusted it to 5000 so prevent the open cursor limit error.  We were getting cursor counts in the high 3000s.  That seems to be giving us an error-free site.

    Yes, a good follow-on action for us would be to find out what is causing cursors to remain open but for now our goal was to return the site to a usable configuration.

    Charlie Arehart
    Community Expert
    Community Expert
    June 25, 2019

    That's a pretty obscure one (not one I've seen before, and I follow these forums closely) . Since it's so very specific, I'd recommend first we consider if this may be due to an error in UPGRADING cf2018.

    (I know you say you upgraded cf11 to 2018. I don't mean THAT upgrade. As you know--if you did the install--that's not an upgrade itself but a side by side install.)

    Instead I mean any most recent update you may have appled to CF 2018 after it was installed. There's a specific update log to check for errors. I have a blog post with more details here:

    Having problems after applying a CF update? What to check, and how to recover!

    It should take only a minute to check.

    If you confirm that's not the issue, let us know and folks can try to dig still further with you. In that care, do let us know what specific version of oracle and what update of cf that you are on. Also are you using the Adobe oracle driver or one you obtained? If the latter, whose and what version is it?

    /Charlie (troubleshooter, carehart. org)
    Inspiring
    February 25, 2021

    We are having the same issue with intermittent ORA-01012 Not logged on errors. It happens about once a day and then keeps happening until we reset the connection, usually by just saving the datasource page in CFadmin. I wanted to post because in our case, we moved from Oracle 12.1 to Oracle 12.2. The CF side stayed the same. We are on CF2018 2018,0,10,320417 using JDK 11.0.9. We also tried JDK 12.0.4. It seems specific to the connection or session as we have 2 other applications hitting the same database and they don't see any issues when it is happening. I am still working on reproducing it somewhere other than prod. We do not see any cursor limits being hit, and any attempts to lower the cursor limits in test environments leads to the expected ORA-1000 maximum cursor limit error, not ORA-01012. I'll post back when I get to the bottom of it. 

    Charlie Arehart
    Community Expert
    Community Expert
    February 26, 2021
    /Charlie (troubleshooter, carehart. org)