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

Snipe-IT 5.0 Beta 3 LDAP Server greyed out #8424

Closed
2 tasks done
Joly0 opened this issue Sep 10, 2020 · 21 comments
Closed
2 tasks done

Snipe-IT 5.0 Beta 3 LDAP Server greyed out #8424

Joly0 opened this issue Sep 10, 2020 · 21 comments
Assignees

Comments

@Joly0
Copy link
Contributor

Joly0 commented Sep 10, 2020

Please confirm you have done the following before posting your bug report:

Describe the bug
The LDAP Server field is greyed out in settings .

If i look into the settings table the correct ip for my ldap server is there, but if i do a ldap-sync it gives me this error

[2020-09-10 08:56:38] develop.ERROR: ErrorException: ldap_search(): Search: Operations error in C:\inetpub\wwwroot\snipe-it\vendor\adldap2\adldap2\src\Connections\Ldap.php:286#36 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle() #37 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\CheckForTwoFactor.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #38 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckForTwoFactor->handle() #39 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\CheckLocale.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #40 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckLocale->handle() #41 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php(76): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #42 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle() #43 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #44 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle() #45 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php(66): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #46 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Cookie\Middleware\EncryptCookies->handle() #47 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #48 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(683): Illuminate\Pipeline\Pipeline->then() #49 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(658): Illuminate\Routing\Router->runRouteWithinStack() #50 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(624): Illuminate\Routing\Router->runRoute() #51 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(613): Illuminate\Routing\Router->dispatchToRoute() #52 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(170): Illuminate\Routing\Router->dispatch() #53 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(130): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}() #54 C:\inetpub\wwwroot\snipe-it\vendor\barryvdh\laravel-debugbar\src\Middleware\InjectDebugbar.php(65): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #55 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle() #56 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\SecurityHeaders.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #57 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\SecurityHeaders->handle() #58 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #59 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() #60 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\CheckForDebug.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #61 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckForDebug->handle() #62 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\CheckForSetup.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #63 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckForSetup->handle() #64 C:\inetpub\wwwroot\snipe-it\vendor\fideloper\proxy\src\TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #65 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Fideloper\Proxy\TrustProxies->handle() #66 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #67 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\View\Middleware\ShareErrorsFromSession->handle() #68 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(56): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #69 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Session\Middleware\StartSession->handle() #70 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #71 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle() #72 C:\inetpub\wwwroot\snipe-it\vendor\barryvdh\laravel-cors\src\HandlePreflight.php(29): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #73 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Barryvdh\Cors\HandlePreflight->handle() #74 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #75 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(145): Illuminate\Pipeline\Pipeline->then() #76 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() #77 C:\inetpub\wwwroot\snipe-it\public\index.php(58): Illuminate\Foundation\Http\Kernel->handle() #78 {main}

To Reproduce
Steps to reproduce the behavior:
Updated from 4.9.4 to 5 in a test environment. Had problems with ad_domain_append instantly, dont know why. Added it manually to the database.
Tried to do a ldap-sync, didnt work. checked if my settings are wrong -> ldap server field is greyed out

Expected behavior
ldap server field should be editible and ldap-sync should work

Screenshots
{6CD20E62-4FFC-4F6C-99EC-531B91F8C945} png

Server (please complete the following information):

  • Snipe-IT Version v5 beta 3
  • OS: [e.g. Ubuntu, CentOS] Windows Server
  • Web Server: [e.g. Apache, IIS] IIS
  • PHP Version 7.4.1

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows 10
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22] 85

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Error Messages

  • WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error
  • If a stacktrace is provided in the error, include that too.
  • Any errors that appear in your browser's error console.
  • Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo.
  • Include any additional information you can find in storage/logs and your webserver's logs.

Additional context

  • Is this a fresh install or an upgrade? upgrade
  • What OS and web server you're running Snipe-IT on
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) upgrade.php
  • Include what you've done so far in the installation, and if you got any error messages along the way.
  • Indicate whether or not you've manually edited any data directly in the database. yes, added ad_domain_append

Add any other context about the problem here.

Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.

@Joly0
Copy link
Contributor Author

Joly0 commented Sep 17, 2020

@snipe Btw, this does happen aswell, if i dont manually edit the database. Reverted back with a backup to 4.9.4, checked if the database was in its previous working state without the manual edits, which it was. Then i updated to 5 again, after the fix with ad_domain_append, which seemed to work, but ldap-sync still not working, cant enter my ldap server ip.

@uberbrady uberbrady self-assigned this Sep 17, 2020
@uberbrady
Copy link
Collaborator

It looks to me like we are dynamically disabling the ldap_server property when the AD checkbox is toggled, and I don't think that that behavior is correct.

Can you confirm for me, @Joly0 , that you have the This is an Active Directory server checkbox checked?

I'm going to keep digging in to the JS on that settings page.

@Joly0
Copy link
Contributor Author

Joly0 commented Sep 18, 2020

Yes, the mentioned Checkbox is indeed checked.

@Joly0
Copy link
Contributor Author

Joly0 commented Sep 18, 2020

Alright, just tested the new Fix and it seems to be working again. Althogh i still have problems, getting it to work. I use the exact same settings as in my prod server, but it keeps telling me Error getting users from LDAP directory, error: ldap_search(): Search: Operations error

@Joly0
Copy link
Contributor Author

Joly0 commented Sep 18, 2020

[2020-09-18 08:22:48] develop.ERROR: ErrorException: file_put_contents(C:\inetpub\wwwroot\snipe-it\bootstrap\cache/config.php): failed to open stream: Permission denied in C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php:133 Stack trace: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() #1 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php(133): file_put_contents() #2 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Console\ConfigCacheCommand.php(63): Illuminate\Filesystem\Filesystem->put() #3 [internal function]: Illuminate\Foundation\Console\ConfigCacheCommand->handle() #4 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(32): call_user_func_array() #5 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Container\Util.php(36): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #6 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(90): Illuminate\Container\Util::unwrapIfClosure() #7 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(34): Illuminate\Container\BoundMethod::callBoundMethod() #8 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Container\Container.php(590): Illuminate\Container\BoundMethod::call() #9 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Console\Command.php(134): Illuminate\Container\Container->call() #10 C:\inetpub\wwwroot\snipe-it\vendor\symfony\console\Command\Command.php(255): Illuminate\Console\Command->execute() #11 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Console\Command.php(121): Symfony\Component\Console\Command\Command->run() #12 C:\inetpub\wwwroot\snipe-it\vendor\symfony\console\Application.php(1001): Illuminate\Console\Command->run() #13 C:\inetpub\wwwroot\snipe-it\vendor\symfony\console\Application.php(271): Symfony\Component\Console\Application->doRunCommand() #14 C:\inetpub\wwwroot\snipe-it\vendor\symfony\console\Application.php(147): Symfony\Component\Console\Application->doRun() #15 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Console\Application.php(93): Symfony\Component\Console\Application->run() #16 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(131): Illuminate\Console\Application->run() #17 C:\inetpub\wwwroot\snipe-it\artisan(35): Illuminate\Foundation\Console\Kernel->handle() #18 {main} [2020-09-18 08:22:48] develop.ERROR: file_put_contents(C:\inetpub\wwwroot\snipe-it\bootstrap\cache/config.php): failed to open stream: Permission denied {"exception":"[object] (ErrorException(code: 0): file_put_contents(C:\\inetpub\\wwwroot\\snipe-it\\bootstrap\\cache/config.php): failed to open stream: Permission denied at C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Filesystem\\Filesystem.php:133) [stacktrace] #0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError() #1 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Filesystem\\Filesystem.php(133): file_put_contents() #2 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\ConfigCacheCommand.php(63): Illuminate\\Filesystem\\Filesystem->put() #3 [internal function]: Illuminate\\Foundation\\Console\\ConfigCacheCommand->handle() #4 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(32): call_user_func_array() #5 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php(36): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}() #6 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(90): Illuminate\\Container\\Util::unwrapIfClosure() #7 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(34): Illuminate\\Container\\BoundMethod::callBoundMethod() #8 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(590): Illuminate\\Container\\BoundMethod::call() #9 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php(134): Illuminate\\Container\\Container->call() #10 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\symfony\\console\\Command\\Command.php(255): Illuminate\\Console\\Command->execute() #11 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php(121): Symfony\\Component\\Console\\Command\\Command->run() #12 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\symfony\\console\\Application.php(1001): Illuminate\\Console\\Command->run() #13 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\symfony\\console\\Application.php(271): Symfony\\Component\\Console\\Application->doRunCommand() #14 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\symfony\\console\\Application.php(147): Symfony\\Component\\Console\\Application->doRun() #15 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php(93): Symfony\\Component\\Console\\Application->run() #16 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php(131): Illuminate\\Console\\Application->run() #17 C:\\inetpub\\wwwroot\\snipe-it\\artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle() #18 {main} "} [2020-09-18 08:22:49] develop.ERROR: ErrorException: file_put_contents(C:\inetpub\wwwroot\snipe-it\bootstrap\cache/routes.php): failed to open stream: Permission denied in C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php:133 Stack trace: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() #1 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php(133): file_put_contents() #2 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Console\RouteCacheCommand.php(66): Illuminate\Filesystem\Filesystem->put() #3 [internal function]: Illuminate\Foundation\Console\RouteCacheCommand->handle() #4 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(32): call_user_func_array() #5 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Container\Util.php(36): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #6 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(90): Illuminate\Container\Util::unwrapIfClosure() #7 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(34): Illuminate\Container\BoundMethod::callBoundMethod() #8 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Container\Container.php(590): Illuminate\Container\BoundMethod::call() #9 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Console\Command.php(134): Illuminate\Container\Container->call() #10 C:\inetpub\wwwroot\snipe-it\vendor\symfony\console\Command\Command.php(255): Illuminate\Console\Command->execute() #11 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Console\Command.php(121): Symfony\Component\Console\Command\Command->run() #12 C:\inetpub\wwwroot\snipe-it\vendor\symfony\console\Application.php(1001): Illuminate\Console\Command->run() #13 C:\inetpub\wwwroot\snipe-it\vendor\symfony\console\Application.php(271): Symfony\Component\Console\Application->doRunCommand() #14 C:\inetpub\wwwroot\snipe-it\vendor\symfony\console\Application.php(147): Symfony\Component\Console\Application->doRun() #15 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Console\Application.php(93): Symfony\Component\Console\Application->run() #16 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(131): Illuminate\Console\Application->run() #17 C:\inetpub\wwwroot\snipe-it\artisan(35): Illuminate\Foundation\Console\Kernel->handle() #18 {main} [2020-09-18 08:22:49] develop.ERROR: file_put_contents(C:\inetpub\wwwroot\snipe-it\bootstrap\cache/routes.php): failed to open stream: Permission denied {"exception":"[object] (ErrorException(code: 0): file_put_contents(C:\\inetpub\\wwwroot\\snipe-it\\bootstrap\\cache/routes.php): failed to open stream: Permission denied at C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Filesystem\\Filesystem.php:133) [stacktrace] #0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError() #1 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Filesystem\\Filesystem.php(133): file_put_contents() #2 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\RouteCacheCommand.php(66): Illuminate\\Filesystem\\Filesystem->put() #3 [internal function]: Illuminate\\Foundation\\Console\\RouteCacheCommand->handle() #4 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(32): call_user_func_array() #5 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php(36): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}() #6 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(90): Illuminate\\Container\\Util::unwrapIfClosure() #7 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php(34): Illuminate\\Container\\BoundMethod::callBoundMethod() #8 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(590): Illuminate\\Container\\BoundMethod::call() #9 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php(134): Illuminate\\Container\\Container->call() #10 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\symfony\\console\\Command\\Command.php(255): Illuminate\\Console\\Command->execute() #11 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php(121): Symfony\\Component\\Console\\Command\\Command->run() #12 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\symfony\\console\\Application.php(1001): Illuminate\\Console\\Command->run() #13 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\symfony\\console\\Application.php(271): Symfony\\Component\\Console\\Application->doRunCommand() #14 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\symfony\\console\\Application.php(147): Symfony\\Component\\Console\\Application->doRun() #15 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Application.php(93): Symfony\\Component\\Console\\Application->run() #16 C:\\inetpub\\wwwroot\\snipe-it\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php(131): Illuminate\\Console\\Application->run() #17 C:\\inetpub\\wwwroot\\snipe-it\\artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle() #18 {main} "}

Thats the part of the laravel.log. It looks like a permission problem, but i already checked that the iis user has all the needed rights there

@Joly0
Copy link
Contributor Author

Joly0 commented Sep 18, 2020

[2020-09-18 08:41:48] develop.ERROR: ErrorException: ldap_search(): Search: Operations error in C:\inetpub\wwwroot\snipe-it\vendor\adldap2\adldap2\src\Connections\Ldap.php:286 Stack trace: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() #1 C:\inetpub\wwwroot\snipe-it\vendor\adldap2\adldap2\src\Connections\Ldap.php(286): ldap_search() #2 C:\inetpub\wwwroot\snipe-it\vendor\adldap2\adldap2\src\Query\Builder.php(474): Adldap\Connections\Ldap->search() #3 C:\inetpub\wwwroot\snipe-it\vendor\adldap2\adldap2\src\Query\Builder.php(497): Adldap\Query\Builder->run() #4 C:\inetpub\wwwroot\snipe-it\vendor\adldap2\adldap2\src\Query\Builder.php(425): Adldap\Query\Builder->runPaginate() #5 C:\inetpub\wwwroot\snipe-it\vendor\adldap2\adldap2\src\Query\Builder.php(433): Adldap\Query\Builder->Adldap\Query\{closure}() #6 C:\inetpub\wwwroot\snipe-it\app\Services\LdapAd.php(452): Adldap\Query\Builder->paginate() #7 C:\inetpub\wwwroot\snipe-it\app\Console\Commands\LdapSync.php(223): App\Services\LdapAd->getLdapUsers() #8 C:\inetpub\wwwroot\snipe-it\app\Console\Commands\LdapSync.php(129): App\Console\Commands\LdapSync->processLdapUsers() #9 [internal function]: App\Console\Commands\LdapSync->handle() #10 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(32): call_user_func_array() #11 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Container\Util.php(36): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #12 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(90): Illuminate\Container\Util::unwrapIfClosure() #13 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(34): Illuminate\Container\BoundMethod::callBoundMethod() #14 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Container\Container.php(590): Illuminate\Container\BoundMethod::call() #15 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Console\Command.php(134): Illuminate\Container\Container->call() #16 C:\inetpub\wwwroot\snipe-it\vendor\symfony\console\Command\Command.php(255): Illuminate\Console\Command->execute() #17 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Console\Command.php(121): Symfony\Component\Console\Command\Command->run() #18 C:\inetpub\wwwroot\snipe-it\vendor\symfony\console\Application.php(1001): Illuminate\Console\Command->run() #19 C:\inetpub\wwwroot\snipe-it\vendor\symfony\console\Application.php(271): Symfony\Component\Console\Application->doRunCommand() #20 C:\inetpub\wwwroot\snipe-it\vendor\symfony\console\Application.php(147): Symfony\Component\Console\Application->doRun() #21 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Console\Application.php(93): Symfony\Component\Console\Application->run() #22 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Console\Application.php(185): Illuminate\Console\Application->run() #23 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(273): Illuminate\Console\Application->call() #24 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php(261): Illuminate\Foundation\Console\Kernel->call() #25 C:\inetpub\wwwroot\snipe-it\app\Http\Controllers\Users\LDAPImportController.php(70): Illuminate\Support\Facades\Facade::__callStatic() #26 [internal function]: App\Http\Controllers\Users\LDAPImportController->store() #27 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Controller.php(54): call_user_func_array() #28 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction() #29 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Route.php(219): Illuminate\Routing\ControllerDispatcher->dispatch() #30 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Route.php(176): Illuminate\Routing\Route->runController() #31 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(681): Illuminate\Routing\Route->run() #32 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(130): Illuminate\Routing\Router->Illuminate\Routing\{closure}() #33 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Auth\Middleware\Authenticate.php(43): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #34 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Auth\Middleware\Authenticate->handle() #35 C:\inetpub\wwwroot\snipe-it\vendor\laravel\passport\src\Http\Middleware\CreateFreshApiToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #36 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle() #37 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\CheckForTwoFactor.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #38 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckForTwoFactor->handle() #39 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\CheckLocale.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #40 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckLocale->handle() #41 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php(76): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #42 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle() #43 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #44 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle() #45 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php(66): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #46 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Cookie\Middleware\EncryptCookies->handle() #47 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #48 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(683): Illuminate\Pipeline\Pipeline->then() #49 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(658): Illuminate\Routing\Router->runRouteWithinStack() #50 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(624): Illuminate\Routing\Router->runRoute() #51 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(613): Illuminate\Routing\Router->dispatchToRoute() #52 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(170): Illuminate\Routing\Router->dispatch() #53 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(130): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}() #54 C:\inetpub\wwwroot\snipe-it\vendor\barryvdh\laravel-debugbar\src\Middleware\InjectDebugbar.php(65): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #55 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle() #56 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\SecurityHeaders.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #57 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\SecurityHeaders->handle() #58 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #59 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() #60 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\CheckForDebug.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #61 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckForDebug->handle() #62 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\CheckForSetup.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #63 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckForSetup->handle() #64 C:\inetpub\wwwroot\snipe-it\vendor\fideloper\proxy\src\TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #65 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Fideloper\Proxy\TrustProxies->handle() #66 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #67 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\View\Middleware\ShareErrorsFromSession->handle() #68 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(56): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #69 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Session\Middleware\StartSession->handle() #70 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #71 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle() #72 C:\inetpub\wwwroot\snipe-it\vendor\barryvdh\laravel-cors\src\HandlePreflight.php(29): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #73 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Barryvdh\Cors\HandlePreflight->handle() #74 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #75 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(145): Illuminate\Pipeline\Pipeline->then() #76 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() #77 C:\inetpub\wwwroot\snipe-it\public\index.php(58): Illuminate\Foundation\Http\Kernel->handle() #78 {main}

@uberbrady
Copy link
Collaborator

It does indeed look like a permissions problem, maybe with your configuration cache? You should be able to blow it out using php artisan config:clear (it should work fine without the config cache).

Or alternately you can find the config cache file - probably somewhere like: bootstrap/cache/config.php though I'm seeing some other locations as well - and fix its permissions.

@Joly0
Copy link
Contributor Author

Joly0 commented Sep 22, 2020

Alright, i checked the permissions 3 times, and they were correct. Then i used all of these commands
composer dump-autoload composer clear-compiled php artisan config:clear php artisan view:clear php artisan cache:clear php artisan route:clear

stopped and started the whole thing a few times and somehow now its working, although the second command does not work.

Thank you for the Support

@Joly0
Copy link
Contributor Author

Joly0 commented Sep 22, 2020

Alright, nvm, this is still giving me errors. But its a bit different now. I succesfully synced all my user but i cant login with them, logs arent saying anything. I thought it had maybe something todo with LDAP Password Sync being checked, so i unchecked and tested, and it gave me the error Error getting users from LDAP directory, error: ldap_search(): Search: Operations error again. Tested a bit and figured, that somehow in the process of unchecking the checkbox, snipe forgot the LDAP Bind Password. After i set that again and saved, the test game a positive result. But i still cant login for whatever reason its just telling me Error: The username or password is incorrect. and after a while (i think in this message is a bug aswell) its telling me this Too many failed login attempts. Please try again in :seconds seconds.

@Joly0
Copy link
Contributor Author

Joly0 commented Sep 22, 2020

And it seems like deleted users are not showing up under "Show deleted Users", but if i purge, they are shown as deleted

@Joly0
Copy link
Contributor Author

Joly0 commented Sep 25, 2020

@uberbrady Is this problem looked at?

@snipe
Copy link
Owner

snipe commented Sep 25, 2020

@Joly0 Please upgrade to the latest RC

@Joly0
Copy link
Contributor Author

Joly0 commented Sep 25, 2020

Still telling me, i cant login, although the ldap sync did work

@Joly0
Copy link
Contributor Author

Joly0 commented Sep 25, 2020

btw @snipe this is a new problem, not directly connected to the problem in my first post here. The upgrade to the latest rc indeed fixed the first problem, but the second is still there

@Joly0
Copy link
Contributor Author

Joly0 commented Sep 30, 2020

@snipe did something change in v5 to the logic of the ldap/ad settings? The same settings i currently have in my test v5 environment, which does sync, but noone can login (wrong username or password), do work in the latest v4 version on both my prod and the dev server, when i downgrade.

My settings are:

Ldap integration: ldap enabled checked
ldap passwort sync: yes checked
active directory: this is an active directory server checked
active directoy domain: xxxx.xxx
Append domain name: append domain name to username field checked
LDAP Server: ldap server ip
Use TLS: This should be checked only if you are running STARTTLS on your LDAP server. not checked
LDAP SSL certificate validation: Allow invalid SSL Certificate not checked
LDAP Bind Username: xxxxx
LDAP Bind Password: xxxxx
Base Bind DN: dc=xxxxx, dc=xxx
LDAP Filter: &(sAMAccountType=805306368)(Initials=*)
Username Field: samaccountname
Last Name: sn
LDAP First Name: givenname
LDAP Authentication query: sAMAccountName=
LDAP Version: 3
LDAP Active Flag: active
LDAP Employee Number: initials
LDAP Email: mail

@Joly0
Copy link
Contributor Author

Joly0 commented Oct 5, 2020

Reverted back to 4.9.5, checked settings, sync worked and users were able to login. Updated again to v5 latest beta, same settings, sync works, users cant login.

@drhirn
Copy link

drhirn commented Oct 9, 2020

Same here using

  • v5.0.0-beta-6-GM
  • RedHat 7
  • Apache/2.4.6
  • Active Directory LDAP

Upgraded from 4.9.5 where everything was working fine.

Found out, I had to enter the LDAP Bind Password after every change to the LDAP settings again.

  1. enter password -> save -> "Test LDAP Synchronisation" -> everything's ok
  2. save again -> "Test LDAP Synchronisation" -> not working anymore

User can't login, no matter what I do.

@uberbrady
Copy link
Collaborator

@Joly0 have you tried our latest 'golden master' release? That definitely has some AD fixes in it, and we have some reports that it did fix things for some users.

@drhirn That password re-entry thing is definitely a bug - I'll check that out. And I'll make sure I can at least log in to my own Snipe-IT instance via AD.

@Joly0
Copy link
Contributor Author

Joly0 commented Oct 9, 2020

@uberbrady Sry to say, but this is still an issue. I wrote another issue report, 2 days ago, there is some additional info regarding the gm.

@Joly0
Copy link
Contributor Author

Joly0 commented Oct 9, 2020

#8500

@uberbrady
Copy link
Collaborator

@drhirn password issue being tracked under: #8507

@Joly0 Joly0 closed this as completed Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants