Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219 #35930

Closed
6 of 9 tasks
cmflouis opened this issue Dec 31, 2022 · 16 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 25-feedback bug

Comments

@cmflouis
Copy link

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

Hello,
First thing first. Happy holiday.
Just a small drop to let you know that I receive this error in my logs.
session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219
This is happenning every minute or so.
It seems related to 2 apps installed on my server : Snappymail and Password. Why those, because when they are active at the same time that's create this log flood. When only one is active at a time this is not happening.

Steps to reproduce

  1. Install almalinux 8.7
  2. Install mariadb 10.6.11
  3. Install php 8.1.13
  4. Install nextcloud 25.0.2.3
  5. Install and enable snappymail 2.24.4
  6. Install and enable password 2022.12.21
  7. Check the logs for the errors.

Expected behavior

No logs flooding with this error.

Installation method

Community Manual installation with Archive

Operating system

RHEL/CentOS

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.cmftech.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "25.0.2.3",
        "overwrite.cli.url": "https:\/\/cloud.cmftech.com",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\Redis",
        "default_phone_region": "CA",
        "maintenance": false,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 2,
        "updater.release.channel": "stable"
    }
}

List of activated Apps

Enabled:
  - activity: 2.17.0
  - bruteforcesettings: 2.5.0
  - calendar: 4.2.0
  - cloud_federation_api: 1.8.0
  - comments: 1.15.0
  - contacts: 5.0.2
  - contactsinteraction: 1.6.0
  - dav: 1.24.0
  - federatedfilesharing: 1.15.0
  - federation: 1.15.0
  - files: 1.20.1
  - files_pdfviewer: 2.6.0
  - files_rightclick: 1.4.0
  - files_sharing: 1.17.0
  - files_trashbin: 1.15.0
  - files_versions: 1.18.0
  - firstrunwizard: 2.14.0
  - logreader: 2.10.0
  - lookup_server_connector: 1.13.0
  - nextcloud_announcements: 1.14.0
  - notifications: 2.13.1
  - oauth2: 1.13.0
  - password_policy: 1.15.0
  - passwords: 2022.12.21
  - photos: 2.0.1
  - privacy: 1.9.0
  - provisioning_api: 1.15.0
  - related_resources: 1.0.3
  - serverinfo: 1.15.0
  - settings: 1.7.0
  - sharebymail: 1.15.0
  - snappymail: 2.24.4
  - systemtags: 1.15.0
  - tasks: 0.14.5
  - text: 3.6.0
  - theming: 2.0.1
  - twofactor_backupcodes: 1.14.0
  - updatenotification: 1.15.0
  - viewer: 1.9.0
  - workflowengine: 2.7.0
Disabled:
  - admin_audit
  - circles: 25.0.0
  - dashboard: 7.3.0
  - encryption
  - files_external
  - recommendations: 1.2.0
  - support: 1.6.0
  - survey_client: 1.11.0
  - suspicious_login
  - twofactor_totp
  - user_ldap
  - user_status: 1.3.1
  - weather_status: 1.3.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"Y7B0fAyTEQS54GAHcX8WgQAAARU","level":3,"time":"2022-12-31T17:42:23+00:00","remoteAddr":"","user":"louis","app":"PHP","method":"GET","url":"/index.php/apps/passwords/api/1.0/session/keepalive","message":"session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Official Passwords Client for Firefox on Win","version":"25.0.2.3","data":{"app":"PHP"}}
{"reqId":"Y7B0gwyTEQS54GAHcX8WiQAAARg","level":3,"time":"2022-12-31T17:42:28+00:00","remoteAddr":"","user":"louis","app":"PHP","method":"POST","url":"/index.php/apps/passwords/api/1.0/session/open","message":"session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0","version":"25.0.2.3","data":{"app":"PHP"}}
{"reqId":"Y7B0hAyTEQS54GAHcX8WiwAAAQM","level":3,"time":"2022-12-31T17:42:28+00:00","remoteAddr":"","user":"louis","app":"PHP","method":"POST","url":"/index.php/apps/passwords/api/1.0/tag/find","message":"session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0","version":"25.0.2.3","data":{"app":"PHP"}}
{"reqId":"Y7B0hI40saDvJDw3Of3yGgAAAFA","level":3,"time":"2022-12-31T17:42:28+00:00","remoteAddr":"","user":"louis","app":"PHP","method":"POST","url":"/index.php/apps/passwords/api/1.0/folder/find","message":"session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0","version":"25.0.2.3","data":{"app":"PHP"}}
{"reqId":"Y7B0hAyTEQS54GAHcX8WjAAAAQY","level":3,"time":"2022-12-31T17:42:28+00:00","remoteAddr":"","user":"louis","app":"PHP","method":"POST","url":"/index.php/apps/passwords/api/1.0/settings/get","message":"session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0","version":"25.0.2.3","data":{"app":"PHP"}}
{"reqId":"Y7B0hAyTEQS54GAHcX8WigAAAQU","level":3,"time":"2022-12-31T17:42:29+00:00","remoteAddr":"","user":"louis","app":"PHP","method":"POST","url":"/index.php/apps/passwords/api/1.0/password/find","message":"session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0","version":"25.0.2.3","data":{"app":"PHP"}}
{"reqId":"Y7B0twyTEQS54GAHcX8WsQAAARI","level":3,"time":"2022-12-31T17:43:20+00:00","remoteAddr":"","user":"louis","app":"PHP","method":"GET","url":"/index.php/apps/passwords/api/1.0/session/keepalive","message":"session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Official Passwords Client for Firefox on Win","version":"25.0.2.3","data":{"app":"PHP"}}
{"reqId":"Y7B08gyTEQS54GAHcX8WwwAAAQM","level":3,"time":"2022-12-31T17:44:19+00:00","remoteAddr":"","user":"louis","app":"PHP","method":"GET","url":"/index.php/apps/passwords/api/1.0/session/keepalive","message":"session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Official Passwords Client for Firefox on Win","version":"25.0.2.3","data":{"app":"PHP"}}
{"reqId":"Y7B1LQyTEQS54GAHcX8WzQAAARg","level":3,"time":"2022-12-31T17:45:18+00:00","remoteAddr":"","user":"louis","app":"PHP","method":"GET","url":"/index.php/apps/passwords/api/1.0/session/keepalive","message":"session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Official Passwords Client for Firefox on Win","version":"25.0.2.3","data":{"app":"PHP"}}
{"reqId":"Y7B1aAyTEQS54GAHcX8W2wAAAQ0","level":3,"time":"2022-12-31T17:46:17+00:00","remoteAddr":"","user":"louis","app":"PHP","method":"GET","url":"/index.php/apps/passwords/api/1.0/session/keepalive","message":"session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Official Passwords Client for Firefox on Win","version":"25.0.2.3","data":{"app":"PHP"}}
{"reqId":"Y7B1owyTEQS54GAHcX8W4wAAARM","level":3,"time":"2022-12-31T17:47:16+00:00","remoteAddr":"","user":"louis","app":"PHP","method":"GET","url":"/index.php/apps/passwords/api/1.0/session/keepalive","message":"session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Official Passwords Client for Firefox on Win","version":"25.0.2.3","data":{"app":"PHP"}}
{"reqId":"Y7B13gyTEQS54GAHcX8W-AAAARM","level":3,"time":"2022-12-31T17:48:15+00:00","remoteAddr":"","user":"louis","app":"PHP","method":"GET","url":"/index.php/apps/passwords/api/1.0/session/keepalive","message":"session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Official Passwords Client for Firefox on Win","version":"25.0.2.3","data":{"app":"PHP"}}
{"reqId":"Y7B2GQyTEQS54GAHcX8XBwAAARQ","level":3,"time":"2022-12-31T17:49:14+00:00","remoteAddr":"","user":"louis","app":"PHP","method":"GET","url":"/index.php/apps/passwords/api/1.0/session/keepalive","message":"session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Official Passwords Client for Firefox on Win","version":"25.0.2.3","data":{"app":"PHP"}}
{"reqId":"Y7B2VAyTEQS54GAHcX8XFwAAAQA","level":3,"time":"2022-12-31T17:50:13+00:00","remoteAddr":"","user":"louis","app":"PHP","method":"GET","url":"/index.php/apps/passwords/api/1.0/session/keepalive","message":"session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Official Passwords Client for Firefox on Win","version":"25.0.2.3","data":{"app":"PHP"}}
{"reqId":"Y7B2hgyTEQS54GAHcX8XHgAAAQU","level":3,"time":"2022-12-31T17:51:02+00:00","remoteAddr":"","user":"louis","app":"PHP","method":"POST","url":"/index.php/apps/passwords/api/1.0/settings/get","message":"session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Official Passwords Client for Firefox on Win","version":"25.0.2.3","data":{"app":"PHP"}}
{"reqId":"Y7B2hwyTEQS54GAHcX8XIQAAAQs","level":3,"time":"2022-12-31T17:51:03+00:00","remoteAddr":"","user":"louis","app":"PHP","method":"POST","url":"/index.php/apps/passwords/api/1.0/settings/get","message":"session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Official Passwords Client for Firefox on Win","version":"25.0.2.3","data":{"app":"PHP"}}
{"reqId":"Y7B2igyTEQS54GAHcX8XIwAAAQk","level":3,"time":"2022-12-31T17:51:06+00:00","remoteAddr":"","user":"louis","app":"PHP","method":"POST","url":"/index.php/apps/passwords/api/1.0/settings/get","message":"session_start(): Ignoring session_start() because a session is already active at /var/www/html/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Official Passwords Client for Firefox on Win","version":"25.0.2.3","data":{"app":"PHP"}}

Additional info

No response

@cmflouis cmflouis added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Dec 31, 2022
@stoamandl
Copy link

Hello and happy new year.
I have the same logs every minute.
It looks like it's coming from the browser app. This also explains the minute interval.
When I turn off my PC with the Chrome extension, no new entries appear. When I turn it on, they are there again. See screenshot.
image
@cmflouis do you have the same behavior?
I am note shure, but looks like the problem is the nc-passwords app or the browser addon.

@daffydock
Copy link

daffydock commented Jan 6, 2023

I am getting almost the same error, except that it is with the Notes app.

"user":"XXXXYYYYZZZZ","app":"PHP","method":"GET","url":"/index.php/apps/notes/api/v1/notes?pruneBefore=0","message":"session_start(): Ignoring session_start() because a session is already active at /home/AAAAA/BBB.CCCCCC.com/lib/private/Session/Internal.php#219","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.23.1","version":"25.0.2.3","data":{"app":"PHP"},"id":"sklajdflaku930jf4-Random-letters-and-numbers209840"}

And;

GET /index.php/apps/notes/api/v1/notes?pruneBefore=0

@EdRoxter
Copy link

Same here with the Passwords extension for Chrome on Nextcloud 25.0.2 (probably has been like that for quite a while, but only noticed it today since everything runs smoothly - not a blocking error/warning at all):

{"reqId":"xxxxxx","level":3,"time":"2023-01-13T20:19:55+00:00","remoteAddr":"xxxxxxxxxxxx","user":"xxxxxx","app":"PHP","method":"POST","url":"/index.php/apps/passwords/api/1.0/password/list","message":"session_start(): Ignoring session_start() because a session is already active at /home/tubemail/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36","version":"25.0.2.3","data":{"app":"PHP"},"id":"xxxxxxxx"}

@merzak274j
Copy link

merzak274j commented Mar 8, 2023

Same here with the Passwords extension for Chrome on Nextcloud 25.0.2 (probably has been like that for quite a while, but only noticed it today since everything runs smoothly - not a blocking error/warning at all):

{"reqId":"xxxxxx","level":3,"time":"2023-01-13T20:19:55+00:00","remoteAddr":"xxxxxxxxxxxx","user":"xxxxxx","app":"PHP","method":"POST","url":"/index.php/apps/passwords/api/1.0/password/list","message":"session_start(): Ignoring session_start() because a session is already active at /home/tubemail/nextcloud/lib/private/Session/Internal.php#219","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36","version":"25.0.2.3","data":{"app":"PHP"},"id":"xxxxxxxx"}

I have the same message, except with Firefox.

I am able to supress the message by following the instructions in this link https://help.nextcloud.com/t/a-session-had-already-been-started/81037/11

However, I have to do this every time the server is upgraded.

Second, I noticed that there are only errors in my log with relation to me (the administrator). Other users that are also using the passwords extension and there is no data in the logs.

This issue has been present for at least a year on my end.

@ManySolutions
Copy link

errors in my log with relation to me (the administrator). Other users that are also using the passwords extension and there is no data in the logs.
That link is not working.

Passwords and snappymail combo doing this for me.

@merzak274j
Copy link

errors in my log with relation to me (the administrator). Other users that are also using the passwords extension and there is no data in the logs.
That link is not working.

Passwords and snappymail combo doing this for me.

Very interesting. I too had snappymail and after uninstalling it the messages stopped.

I have corrected the link. which explains how to modify a file called Internal.php that will stop the error message.

@cmflouis
Copy link
Author

Hello everyone,
Sorry for the delay to respond. Thanks for your input and to correct the link.
I also observed that when only one of the two apps is active the message does not appear.
My concern is exactly that. I use on a daily basis both of these application.
I will give a try to the solution in the link but I think I already tried that and it did not work. I will try it again and I think I will also try it on NC26 that is due to be release before the end of this month.
Have a good day.

@cmflouis
Copy link
Author

With the link above I was has to workaround the error message. For this reason I close that case.

@iGadget
Copy link

iGadget commented Apr 4, 2023

I'm running into this as well, indeed having both Passwords (+ FF webextension) and Snappymail installed as an admin. @cmflouis I just don't understand why you marked this report as 'Closed' since IMHO this is a genuine bug which should be fixed upstream, not worked around by re-applying the change to Internal.php manually after each server update.
Would you mind re-opening it and perhaps adding the 'fixed' Internal.php as a proposed patch?

@trendzetter
Copy link
Contributor

With the link above I was has to workaround the error message. For this reason I close that case.

@szaimen can you reopen this issue? It has a workaround but no mention of bugfix

@TraceyC77
Copy link

I'm seeing the same message repeated very frequently in my server logs related to the notes app (featured).

[PHP] Error: session_start(): Ignoring session_start() because a session is already active at /var/www/tlcnet.info/public_html/nextcloud/lib/private/Session/Internal.php#219

GET /index.php/apps/notes/api/v1/notes?pruneBefore=1683851115
from 2603:300c:1402:8600:d57d:1590:bbde:a7f5 at 2023-05-12T00:40:37+00:00

There had been an issue filed on the Notes issue tracker, which the devs closed, saying the cause is with PHP 8, it affects all apps, and there isn't anything they can do about it.
nextcloud/notes#802

@trendzetter
Copy link
Contributor

still happening with 26.0.2

@cmflouis
Copy link
Author

Hello everyone,
From my part it seems that this error has been repair in Nextcloud 27. I update to 27.0.1 and 27.0.2 and this error still does not appear. Very happy that Nextcloud 27 resolve this problem natively. It is up to you if you want to close this ticket.
Have a good day.

@trendzetter
Copy link
Contributor

@cmflouis thank you for reporting this. i'll check with some of my deployments and try to confirm your findings!

@daffydock
Copy link

Just to check in, after 27, the '.../Session/Internal.php#219' error, is no more. I would back up the notion the error has been fixed on Nextcloud's end. It might still pop up, but before, it was spamming my logs and I have yet to see it. So I definitely take that as a great sign.

@kesselb kesselb closed this as completed Aug 16, 2023
@kesselb
Copy link
Contributor

kesselb commented Aug 16, 2023

Thanks for reporting back 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 25-feedback bug
Projects
None yet
Development

No branches or pull requests