Accesstoken is missing or invalid

Infos:

  • Used Zammad version: 3.6.x
  • Used Zammad installation source: source
  • Operating system: Ubuntu 20.04
  • Browser + version:

Expected behavior:

  • access Zammad dashboard

Actual behavior:

  • {“code”:401,“status”:“failed”,“message”:“Accesstoken is missing or invalid!”} in web browser

Steps to reproduce the behavior:

  • I admit, I’m still in the learning stages with my Ubuntu server. I’ve had Zammad operating properly for months. Last night, Installed Socioboard which uses Laravel app key (php artisan key:generate). I performed apt-get update and apt-get upgrade and now I’m waking up to an error when trying to access zammad:

    {"code":401,"status":"failed","message":"Accesstoken is missing or invalid!"}

Zammad is still functioning and issuing support tickets, and running systemctl status zammad shows that it’s active and running.
I checked the status of Elasticsearch and saw that it was dead. The error log in /var/log/elasticsearch/ said:

[2021-02-03T15:13:35,647][INFO ][o.e.n.Node               ] [zammad] version[7.10.2], pid[295977], build[default/deb/747e1cc71def077253878a59143c1f785afa92b9/2021-01-13T00:42:12.435326Z], OS[Linux/5.4>
        [2021-02-03T15:13:35,659][INFO ][o.e.n.Node               ] [zammad] JVM home [/usr/share/elasticsearch/jdk], using bundled JDK [true]
        [2021-02-03T15:13:35,659][INFO ][o.e.n.Node               ] [zammad] JVM arguments [-Xshare:auto, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss>
        [2021-02-03T15:13:39,494][ERROR][o.e.b.Bootstrap          ] [zammad] Exception
        java.lang.IllegalArgumentException: Plugin [ingest-attachment] was built for Elasticsearch version 7.10.1 but version 7.10.2 is running
                at org.elasticsearch.plugins.PluginsService.verifyCompatibility(PluginsService.java:352) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:622) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:479) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:168) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.node.Node.<init>(Node.java:346) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.node.Node.<init>(Node.java:289) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) [elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) [elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) [elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) [elasticsearch-cli-7.10.2.jar:7.10.2]
                at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-7.10.2.jar:7.10.2]
                at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) [elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-7.10.2.jar:7.10.2]
        [2021-02-03T15:13:39,497][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [zammad] uncaught exception in thread [main]
        org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: Plugin [ingest-attachment] was built for Elasticsearch version 7.10.1 but version 7.10.2 is running
                at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:174) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) ~[elasticsearch-cli-7.10.2.jar:7.10.2]
                at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-7.10.2.jar:7.10.2]
                at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-7.10.2.jar:7.10.2]
        Caused by: java.lang.IllegalArgumentException: Plugin [ingest-attachment] was built for Elasticsearch version 7.10.1 but version 7.10.2 is running
                at org.elasticsearch.plugins.PluginsService.verifyCompatibility(PluginsService.java:352) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:622) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:479) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:168) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.node.Node.<init>(Node.java:346) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.node.Node.<init>(Node.java:289) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:227) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:227) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) ~[elasticsearch-7.10.2.jar:7.10.2]
                at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) ~[elasticsearch-7.10.2.jar:7.10.2]
                ... 6 more`

I uninstalled and reinstalled the ingest-attachment plugin and Elasticsearch now starts. 
At this point my Elasticsearch log looks like this:

   ` [2021-02-03T17:19:28,672][INFO ][o.e.n.Node               ] [zammad] version[7.10.2], pid[42539], build[default/deb/747e1cc71def077253878a59143c1f785afa92b9/2021-01-13T00:42:12.435326Z], OS[Linux/5.4.0-65-generic/amd64], JVM[AdoptOp>
[2021-02-03T17:19:28,673][INFO ][o.e.n.Node               ] [zammad] JVM home [/usr/share/elasticsearch/jdk], using bundled JDK [true]
[2021-02-03T17:19:28,673][INFO ][o.e.n.Node               ] [zammad] JVM arguments [-Xshare:auto, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -D>
[2021-02-03T17:19:29,988][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [aggs-matrix-stats]
[2021-02-03T17:19:29,988][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [analysis-common]
[2021-02-03T17:19:29,988][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [constant-keyword]
[2021-02-03T17:19:29,988][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [flattened]
[2021-02-03T17:19:29,988][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [frozen-indices]
[2021-02-03T17:19:29,989][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [ingest-common]
[2021-02-03T17:19:29,989][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [ingest-geoip]
[2021-02-03T17:19:29,989][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [ingest-user-agent]
[2021-02-03T17:19:29,989][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [kibana]
[2021-02-03T17:19:29,989][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [lang-expression]
[2021-02-03T17:19:29,989][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [lang-mustache]
[2021-02-03T17:19:29,989][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [lang-painless]
[2021-02-03T17:19:29,989][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [mapper-extras]
[2021-02-03T17:19:29,989][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [mapper-version]
[2021-02-03T17:19:29,989][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [parent-join]
[2021-02-03T17:19:29,990][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [percolator]
[2021-02-03T17:19:29,990][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [rank-eval]
[2021-02-03T17:19:29,990][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [reindex]
[2021-02-03T17:19:29,990][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [repositories-metering-api]
[2021-02-03T17:19:29,990][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [repository-url]
[2021-02-03T17:19:29,990][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [search-business-rules]
[2021-02-03T17:19:29,990][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [searchable-snapshots]
[2021-02-03T17:19:29,990][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [spatial]
[2021-02-03T17:19:29,990][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [systemd]
[2021-02-03T17:19:29,990][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [transform]
[2021-02-03T17:19:29,991][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [transport-netty4]
[2021-02-03T17:19:29,991][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [unsigned-long]
[2021-02-03T17:19:29,991][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [vectors]
[2021-02-03T17:19:29,991][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [wildcard]
[2021-02-03T17:19:29,991][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-analytics]
[2021-02-03T17:19:29,991][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-async]
[2021-02-03T17:19:29,991][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-async-search]
[2021-02-03T17:19:29,991][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-autoscaling]
[2021-02-03T17:19:29,991][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-ccr]
[2021-02-03T17:19:29,991][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-core]
[2021-02-03T17:19:29,991][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-data-streams]
[2021-02-03T17:19:29,992][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-deprecation]
[2021-02-03T17:19:29,992][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-enrich]
[2021-02-03T17:19:29,992][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-eql]
[2021-02-03T17:19:29,992][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-graph]
[2021-02-03T17:19:29,992][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-identity-provider]
[2021-02-03T17:19:29,992][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-ilm]
[2021-02-03T17:19:29,992][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-logstash]
[2021-02-03T17:19:29,992][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-ml]
[2021-02-03T17:19:29,992][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-monitoring]
[2021-02-03T17:19:29,993][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-ql]
[2021-02-03T17:19:29,993][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-rollup]
[2021-02-03T17:19:29,993][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-security]
[2021-02-03T17:19:29,993][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-sql]
[2021-02-03T17:19:29,993][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-stack]
[2021-02-03T17:19:29,993][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-voting-only-node]
[2021-02-03T17:19:29,993][INFO ][o.e.p.PluginsService     ] [zammad] loaded module [x-pack-watcher]
[2021-02-03T17:19:29,993][INFO ][o.e.p.PluginsService     ] [zammad] loaded plugin [ingest-attachment]
[2021-02-03T17:19:30,014][INFO ][o.e.e.NodeEnvironment    ] [zammad] using [1] data paths, mounts [[/ (/dev/sde2)]], net usable_space [842.1gb], net total_space [915.3gb], types [ext4]
[2021-02-03T17:19:30,015][INFO ][o.e.e.NodeEnvironment    ] [zammad] heap size [1gb], compressed ordinary object pointers [true]
[2021-02-03T17:19:30,065][INFO ][o.e.n.Node               ] [zammad] node name [zammad], node ID [lPuXVqD0RS6Urr3GgZS8NQ], cluster name [elasticsearch], roles [transform, master, remote_cluster_client, data, ml, data_content, da>
[2021-02-03T17:19:32,064][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [zammad] [controller/42773] [Main.cc@114] controller (64 bit): Version 7.10.2 (Build 40a3af639d4698) Copyright (c) 2021 Elasticsearch BV
[2021-02-03T17:19:32,442][INFO ][o.e.x.s.a.s.FileRolesStore] [zammad] parsed [0] roles from file [/etc/elasticsearch/roles.yml]
[2021-02-03T17:19:32,955][INFO ][o.e.t.NettyAllocator     ] [zammad] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=256kb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabl>
[2021-02-03T17:19:32,993][INFO ][o.e.d.DiscoveryModule    ] [zammad] using discovery type [zen] and seed hosts providers [settings]
[2021-02-03T17:19:33,242][WARN ][o.e.g.DanglingIndicesState] [zammad] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually
[2021-02-03T17:19:33,461][INFO ][o.e.n.Node               ] [zammad] initialized
[2021-02-03T17:19:33,461][INFO ][o.e.n.Node               ] [zammad] starting ...
[2021-02-03T17:19:33,519][INFO ][o.e.t.TransportService   ] [zammad] publish_address {localhost/127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}
[2021-02-03T17:19:33,965][WARN ][o.e.b.BootstrapChecks    ] [zammad] the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] mu>
[2021-02-03T17:19:33,965][INFO ][o.e.c.c.Coordinator      ] [zammad] cluster UUID [_aATlBTETC2AdvjfG7HnLw]
[2021-02-03T17:19:33,971][INFO ][o.e.c.c.ClusterBootstrapService] [zammad] no discovery configuration found, will perform best-effort cluster bootstrapping after [3s] unless existing master is discovered
[2021-02-03T17:19:34,181][INFO ][o.e.c.s.MasterService    ] [zammad] elected-as-master ([1] nodes joined)[{zammad}{lPuXVqD0RS6Urr3GgZS8NQ}{y-UUh_GYQrCcxXr3so5efQ}{localhost}{127.0.0.1:9300}{cdhilmrstw}{ml.machine_memory=33529470>
[2021-02-03T17:19:34,391][INFO ][o.e.c.s.ClusterApplierService] [zammad] master node changed {previous [], current [{zammad}{lPuXVqD0RS6Urr3GgZS8NQ}{y-UUh_GYQrCcxXr3so5efQ}{localhost}{127.0.0.1:9300}{cdhilmrstw}{ml.machine_memor>
[2021-02-03T17:19:34,405][INFO ][o.e.h.AbstractHttpServerTransport] [zammad] publish_address {localhost/127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}
[2021-02-03T17:19:34,406][INFO ][o.e.n.Node               ] [zammad] started
[2021-02-03T17:19:34,608][INFO ][o.e.l.LicenseService     ] [zammad] license [551a9049-de39-4e6e-b7bd-594245308b49] mode [basic] - valid
[2021-02-03T17:19:34,609][INFO ][o.e.x.s.s.SecurityStatusChangeListener] [zammad] Active license is now [BASIC]; Security is disabled
[2021-02-03T17:19:34,611][INFO ][o.e.g.GatewayService     ] [zammad] recovered [9] indices into cluster_state
[2021-02-03T17:19:40,402][INFO ][o.e.c.r.a.AllocationService] [zammad] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[zammad_production_user][0]]]).

I’m not really sure what to do. Any help is appreciated

Seems like you’ve updated Elasticsearch without Zammad.
If you do, you’ll need to manually reinstall the ingest-mapper plugin.
Usually: /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment ( Set up Elasticsearch — Zammad System Documentation documentation ).

If you update Zammad, our scripts usually™ handle this for you.
However, you’ll have to check the console outputs to be extra sure.

Does not belong to the Elasticsearch error you were talking further below this error message.
Sorry, but where exactly does it appear.

Anything within your production.log? (/var/log/zammad/)

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.