Quantcast
Viewing all 6328 articles
Browse latest View live

Trouble during instalation, failed to ping DB

@pruiz wrote:

Hello, I’m having some trouble setting up a Mattermost server and I hope someone may be able to lend me a hand with it.

I get stuck in the part where i have to test the server to make sure everything works.

I get the error message -->"Failed to ping DB retrying in 10 seconds err=time: invalid duration
I have uploaded the rest of the logs here–> https://pastebin.com/3JZyVkaH

I’m following the documentation referring to a ubuntu 16.04 installation here --> https:/./docs.mattermost.com/install/install-ubuntu-1604.html and to be more specific I fail at the 8 step of the Mattermost server installation when I input the command --> sudo -u mattermost ./bin/mattermost

I have seen that some people have similiar problems and they are generally due to a bad configuration of the config file in --> /opt/mattermost/config/config.json

This is the configuration that I have right now:
“DataSource”:“mattermostuser:new_password_here@tcp(127.0.0.1:3306)/mattermost?charset=utf8mb4,utf8\u0026readTimeout=30s\u0026writeTimeout=$”,

I have tried switching the 127.0.0.1 for “localhost” and for the ip of the computer (172.16.199.55). The password is “new_password_here”

You can find the full file here -->https://pastebin.com/Huv6QiCT

I have also tried following the instructions and changing to mariadb as shown in this post here --> https:/./websiteforstudents.com/install-mattermost-server-version-on-ubuntu-16-04-17-10-18-04/ and making the changes to follow the instructions in both mariadb and mysql, getting the same error message every time.

Right now the server has been installed on an ubuntu 18.04 desktop (I don’t know if the fact that it’s installed on a desktop may be the root of the problem) but I’ve ran into the same problem installing it on an ubuntu 16.04

I have checked and the firewall is disabled.

Versions:
OS: Ubuntu 18.04 desktop
Mysql: Ver 14.14 Distrib 5.7.22, for Linux (x86_64) using EditLine wrapper
Mattermost: mattermost 5.1.0

Anyone has any suggestions?

Pd: sorry about the links, but new users are only allowed to use 2 hyperlinks on each post at most so i’m forced to break the links to the web pages.

Edit: I have tried installing it in an ubuntu server 18.04 and I get the same error message that I did in the beginning

Posts: 2

Participants: 2

Read full topic


MM Server: Personal Access Tokens invalid or expired until restart

@smstromb wrote:

I’m hosting MM server 5.0.0 within a docker container on AWS. Our users all have personal access tokens used to integrate with a 3rd party application that we also host. We use these personal access tokens to make basic api requests (v4) on their behalf without requiring them to continuously re-login to both our application and the MM server.

A few days ago we started noticing that the personal access tokens started to return HTTP 401 unauthorized errors. An example:

Request URL: https://ourMMserver.com/api/v4/users/me
Request Method: GET
Authorization: BEARER examplePersonalAccessToken

Response Code: 401 
Response: {"id":"api.context.session_expired.app_error","message":"Invalid or expired session, please login again.","detailed_error":"token=examplePersonalAccessToken","request_id":"ytqe96wj53ys8r9unpyrr8mftc","status_code":401}

Server Log: {"level":"info","ts":1532541581.5667882,"caller":"mux/mux.go:162","msg":"Invalid session","error":"GetSession: Invalid session token=examplePersonalAccessToken, err=<no value>, "}

The personal access token will continue to return 401 errors until the MM server is restarted at which time the token immediately begins to work as expected again. It only effects a subset of personal access tokens at any given time and each time the subset is different.

Posts: 3

Participants: 3

Read full topic

Redirect loop or SSL error

@Babbles wrote:

If I enter all the URL address (http://mysite.com:8065) of my Mattermost site directly, I can use Mattermost normally. I want to make HTTPS connection but I can not use it.

First of all, I ignored Mattermost and confirmed the HTTPS connection at index.html on the site. Neither problem.
http://mysite.com/index.html -> OK
https://mysite.com/index.html -> OK
*Of course, redirect from http to https is also OK.

Next using Mattermost. Direct input URL.
https://mysite.com:8065

Firefox:

An error occurred while connecting to mysite.com:8065. SSL received a record that exceeded the maximum permissible length. error code: SSL_ERROR_RX_RECORD_TOO_LONG

Because we could not verify the authenticity of the received data, we could not display this page.
Please contact the website administrator for this issue.

Chrome:

ERR_SSL_PROTOCOL_ERROR

Next I set proxy_pass at the location of nginx.

location {
...
   proxy_pass http://localhost:8065;
}

In this case, it falls into a (redirect) loop.

location {
...
   proxy_pass https://localhost:8065;
}

In this case, the above SSL error.

I run ‘sudo -u mattermost /opt/mattermost/bin/mattermost’ and it seems that no errors are displayed even if I look at the situation.

my config.json:

“ServiceSettings”: {
“SiteURL”: “http://mysite:com”,
“WebsocketURL”: “”,
“LicenseFileLocation”: “”,
“ListenAddress”: “:8065”,
“ConnectionSecurity”: “”,
“TLSCertFile”: “”,
“TLSKeyFile”: “”,
“UseLetsEncrypt”: false,
“LetsEncryptCertificateCacheFile”: “./config/letsencrypt.cache”,
“Forward80To443”: false,
“ReadTimeout”: 300,
“WriteTimeout”: 300,
“MaximumLoginAttempts”: 10,
“GoroutineHealthThreshold”: -1,
“GoogleDeveloperKey”: “”,
“EnableOAuthServiceProvider”: false,
“EnableIncomingWebhooks”: true,
“EnableOutgoingWebhooks”: true,
“EnableCommands”: true,
“EnableOnlyAdminIntegrations”: true,
“EnablePostUsernameOverride”: false,
“EnablePostIconOverride”: false,
“EnableLinkPreviews”: false,
“EnableTesting”: false,
“EnableDeveloper”: false,
“EnableSecurityFixAlert”: true,
“EnableInsecureOutgoingConnections”: false,
“AllowedUntrustedInternalConnections”: “”,
“EnableMultifactorAuthentication”: false,
“EnforceMultifactorAuthentication”: false,
“EnableUserAccessTokens”: false,
“AllowCorsFrom”: “”,
“AllowCookiesForSubdomains”: false,
“SessionLengthWebInDays”: 30,
“SessionLengthMobileInDays”: 30,
“SessionLengthSSOInDays”: 30,
“SessionCacheInMinutes”: 10,
“SessionIdleTimeoutInMinutes”: 0,
“WebsocketSecurePort”: 443,
“WebsocketPort”: 80,
“WebserverMode”: “gzip”,
“EnableCustomEmoji”: false,
“EnableEmojiPicker”: true,
“EnableGifPicker”: false,
“GfycatApiKey”: “2_KtH_W5”,
“GfycatApiSecret”: “3wLVZPiswc3DnaiaFoLkDvB4X0IV6CpMkj4tf2inJRsBY6-FnkT08zGmppWFgeof”,
“RestrictCustomEmojiCreation”: “all”,
“RestrictPostDelete”: “all”,
“AllowEditPost”: “always”,
“PostEditTimeLimit”: -1,
“TimeBetweenUserTypingUpdatesMilliseconds”: 5000,
“EnablePostSearch”: true,
“EnableUserTypingMessages”: true,
“EnableChannelViewedMessages”: true,
“EnableUserStatuses”: true,
“ExperimentalEnableAuthenticationTransfer”: true,
“ClusterLogTimeoutMilliseconds”: 2000,
“CloseUnusedDirectMessages”: false,
“EnablePreviewFeatures”: true,
“EnableTutorial”: true,
“ExperimentalEnableDefaultChannelLeaveJoinMessages”: true,
“ExperimentalGroupUnreadChannels”: “disabled”,
“ImageProxyType”: “”,
“ImageProxyURL”: “”,
“ImageProxyOptions”: “”,
“EnableAPITeamDeletion”: false,
“ExperimentalEnableHardenedMode”: false,
“ExperimentalLimitClientConfig”: false,
“EnableEmailInvitations”: true }

I want to connect HTTPS by direct input at least. Please tell me how to make HTTPS connection with Mattermost.

Please help.


Mattermost: 5.1.0 / CentOS 7.5 / Nginx: 1.13.8 / PHP 7.1.20 / MariaDB 10.3.8

Posts: 1

Participants: 1

Read full topic

Whats the best way to log every Mattermost post, so as to create a graph visualization of that data?

@Bortseb wrote:

Hello!

I’m pretty new to Mattermost. My goal is to visualize every post that happens on my Mattermost server (team version) as a graph visualization (Nodes being users, edges being their posts, and the target nodes being channels… channels could also be visualized as the individual users within them)

I am not sure about the best way to go about this. It almost seems like I just want all the data that the Mattermost server will already be storing, just also saved in a graph format (node list + edge list) instead of however its currently saved. (You might be able to tell from my description, I am a novice developer Image may be NSFW.
Clik here to view.
:stuck_out_tongue:
Please be patient)

My primary question is: what is the best way to go about getting this graph-formatted data (literally just need a csv of from-to relationships) Is there an existing means of running the entire server database through some sort of filter occasionally that spits out a CSV? Would that be reasonable? Would it be better to use the API and get every user, then get all their channels, then get all their posts? Is there a way to use webhooks to request that literally every post also get sent through the webhook? What about the new intercept stuff in v5.0? Could I intercept every post? My server already has a lot of activity on it, so I guess I’m seeking advice on two things. 1. Whats the recommended way to convert all of my existing data into the CSV format I described, and then 2. Moving forward, whats the best way to log each new post as it emerges so that it can appended onto the existing log?

Any recommendations or advice are welcom? One further complication is that I would also like to know which users were actually in a channel at the time a post was made… so chronology matters to me too, not just which channel a post was sent to and the latest list of who is in that channel.

Another question for my learning: Are DMs just a special-case of a channel? Will getting a user’s channels also return all of their DMs?

Posts: 4

Participants: 2

Read full topic

Customizing White Mattermost system notification icon

@Isabbagh wrote:

Hi,
Firstable, i would like to thank your help in advance. I have replicated the override icons folder, but I can’t find where I can change the white mattermost system icon used when Mattermost notifies something to users as System.
We are trying to customize an iOS mobile app. We guess that this asset is included as a file icon, but also we have read that could be a svg file hardcoded in the server code. Anyway I really can’t find where to change it, even if it is possible. Can anybody help me with anykind of clue.?

Thanks again in advance,

Regards,

Izzat

Posts: 1

Participants: 1

Read full topic

Private Teams/Groups/Channels

@dmc1961 wrote:

Multiple exclusive ‘teams’ or ‘groups’ or ‘channels’

Been using Mattermost for a while now, mainly for my wife and I on our own CentOS server, so we can private message each other - great mobile app keeps me on-task with the shopping lists Image may be NSFW.
Clik here to view.
:slight_smile:

I have also installed it on a server for a group of colleagues but can’t seem to see if I am on the right/wrong track from the docs so starting this new question - sorry if this is the …th time you have seen this question.

We have about 7-8 team member currently (I added them via command line to the main ‘team’ - not sure if there is actually a GUI instead of command line option - can’t see that anywhere). All good, I live in #!/bin/bash

I now have a need to add a who new team/group/category of members and have them locked into just their own team. I ‘think’ I can restrict each use to not be able to ‘see’ the other teams but without more testing I can’t tell.

It would be great if the existing original team could get to the new ‘private’ team for interaction, but not the other way around.

So can you have autonomous ‘teams’, ‘groups’ or ‘channels’, or should I opt for a different forum software for these other team members? Be wonderful if I could nut this out and stay with my beloved Mattermost.

Sorry if the answer is in plain sight, been reading and reading but the whole team/group/channel banter is leaving me in a muddle.

Thanks all, great product and will keep using it for as long as I live on Linux (so like, forever).

Posts: 1

Participants: 1

Read full topic

Mattermost TLS Setup

@AustinConner wrote:

I have installed mattermost with the one click Docker install from their website and I have access to the web interface from the ip address. I want to replace my IP with a domain name. since mattermost is on port 8065, you have to put 8065 to port 80 or 443. I have on the web GUI that i want my port to be 443 and TSL is ENABLED. According to the documnetaiton on mattermost’s website, theres something else i need to do in the command line. I did: cd /opt/mattermost/bin which returned with a “no such directory” and sudo setcap cap_net_bind_service=+ep ./mattermost Which responded with the same “no such directory” I restarted my server thinking it actually did but… it didn’t work. Any help you guys could give me would be amazing. I don’t know this stuff… Thanks!

Posts: 1

Participants: 1

Read full topic

Running in Docker Swarm

@paulo wrote:

Summary

Can’t get Mattermost to start in Docker Swarm.

Steps to reproduce

I’m trying to test this on a mac. I followed the Official Guide and I can get the Docker Compose file to work, I can access the mattermost and configure everything, but we want to deploy this with docker swarm, but when I try to run the contrib/swarm/docker-stack.yml it fails.

Observed behavior

The mm_app and mm_db both are starting and running correctly from all I can see, the one that isn’t running when I run docker stack ps mm

[emerg] 9#9: host not found in upstream "mm_app" in /etc/nginx/conf.d/mattermost.conf:21
nginx: [emerg] host not found in upstream "mm_app" in /etc/nginx/conf.d/mattermost.conf:21
[error] 10#10: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://10.0.1.3:80/", host: "localhost"
127.0.0.1 - - [29/Jul/2018:18:43:59 +0000] "GET / HTTP/1.1" 502 166 "-" "curl/7.61.0" "-" 

I understand this is a problem in the nginx conf file, but I don’t understand how to fix this, since line 21 is
proxy_pass http://{%APP_HOST%}:{%APP_PORT%};
which I believe is the one in the that is written in docker-stack.yml that is mm_app.

I never used docker swarm before so sorry if this is a stupid mistake.

Posts: 1

Participants: 1

Read full topic


Custom Plugin not found after upload/activation

@karim wrote:

Hi! I uploaded a custom plugin, but while trying to execute it by calling:
http://{MatterMost_URL}/plugins/{Plugin_ID}
i got 404 not found.

Notes:
i am developing my code on windows and deploying on linux server (MatterMost server).
so, i executed these commands before build:
GOOS=linux
GOARCH=amd64

Then build using:
go build -o plugin.exe plugin.go
///////////////////////////////////////////////////////////

plugin.go code:

package main

import (
“net/http”
github.com/mattermost/mattermost-server/plugin
)

type HelloWorldPlugin struct {
plugin.MattermostPlugin
Enabled bool
Secret string
UserName string
}

func (p *HelloWorldPlugin) ServeHTTP(c *plugin.Context, w http.ResponseWriter, r *http.Request) {
if !p.Enabled || p.Secret == “” || p.UserName == “” {
http.Error(w, “This plugin is not configured.”, http.StatusForbidden)
return
}
}

// This example demonstrates a plugin that handles HTTP requests which respond by greeting the
// world.
func main() {
plugin.ClientMain(&HelloWorldPlugin{})
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////

plugin.yaml:

id: com.mattermost.server-hello-world
name: Server “Hello, world!”
server:
executable: ./plugin.exe
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

Posts: 1

Participants: 1

Read full topic

Tutorial Server plugin fails to start. ->"err":"unable to start plugin: com.mattermost.server-hello-world: timed out waiting for plugin"

@haris wrote:

I am following the Hello, World plugin tutorial here: https://developers.mattermost.com/extend/plugins/server/hello-world/.

I have mattermost installed on my local machine by following: https://docs.mattermost.com/install/docker-local-machine.html#macos

Here is my mattermost and db version:

Mattermost Version: 5.1.0
Database Schema Version: 5.1.0
Database: mysql

Here is my docker installation’s OS and arch.

root@4bdee6a90b82:/mm/mattermost/plugins# uname -a
Linux 4bdee6a90b82 4.9.87-linuxkit-aufs #1 SMP Wed Mar 14 15:12:16 UTC 2018 x86_64 GNU/Linux

These are the tutorial steps I followed for building the executable plugin:

➜  my-plugin$ GOOS=linux GOARCH=amd64 go build -o plugin plugin.go
➜  my-plugin$ ls
plugin        plugin.go     plugin.yaml
➜  my-plugin$ file plugin
plugin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, with debug_info, not stripped
➜  my-plugin$ cat plugin.yaml
id: com.mattermost.server-hello-world
name: Server "Hello, world!"
backend:
    executable: plugin

I uploaded the plugin on http://localhost:8065/admin_console/plugins/management.
I clicked Activate, which shows This plugin is starting.
After a while, it shows This plugin failed to start. Check your system logs for errors.
The logs show this:

{"level":"error","ts":1533035791.792267,"caller":"app/plugin.go:158","msg":"Plugin failed to activate","plugin_id":"com.mattermost.server-hello-world","err":"unable to start plugin: com.mattermost.server-hello-world: timed out waiting for plugin"}

How do I debug this?

Some headway that I was able to make:

I downloaded a certain “meme” plugin from https://github.com/mattermost/mattermost-plugin-memes. That works.

So I checked both the plugin executables:

root@4bdee6a90b82:/mm/mattermost/plugins# file memes/plugin.exe
memes/plugin.exe: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, not stripped

root@4bdee6a90b82:/mm/mattermost/plugins# file com.mattermost.server-hello-world/plugin
com.mattermost.server-hello-world/plugin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped

Could this difference be the cause? If yes, what options do I need to pass in order to the same executable as with the meme plugin.exe?

Thanks in advance for your help!

Posts: 5

Participants: 2

Read full topic

Virtual Hackathon!

@comharris wrote:

We’ll be holding a virtual hackathon focused on our new plugin architecture and everyone from the community is invited to participate along with core staff! The event will take place all day Thursday, August 16th (9am-5pm EDT) and Friday, August 17th (9am-5pm EDT), with presentations to follow on Monday, August 20th at 10 AM EDT.

There are 2 objectives of this hackathon:

  1. Build something you want to use on our pre-release community server.
  2. Provide feedback for our new plugin architecture (shipping with version 5.2+).

Participants from the community who submit a contribution will receive a swag bag.

NOTE: Participation in the Monday presentation is NOT mandatory. If you cannot make the Monday meeting, a short recorded video showing off the plugin would be nice, but not necessary.

Questions? Please reply below.

Let us know you’ll be there by RSVP’ing to the Meetup event here. Hope to see you there!

Posts: 1

Participants: 1

Read full topic

How to fix websocket error

@bje wrote:

I did package source code and i set config.json AllowCorsFrom: “*” and execute and i tried to login

and then, login is sucess but, i get some error log for below…

the error is…

{“level”:“error”,“ts”:1533098193.6783123,“caller”:“api4/websocket.go:28”,“msg”:“websocket connect err: websocket: the client is not using the websocket protocol: ‘upgrade’ token not found in ‘Connection’ header”}

{“level”:“error”,“ts:1533098193.678331”,“caller”:“web/context.go:60”,“msg”:“Failed to upgrade websocket connection”,“path”:"/api/v4/websocket",“request_id”:“j4kzz13t3bgntjxoh1tzq3bdea”,“ip_addr”:“40.10.33.40”,“user_id”:“uab87w37winybeshtwyh6n3o3a”,“method”:“GET”,“err_where”:“connect”,“http_code”:500,“err_details”:""}

also, we don’t use Nginx…

if anyone know that solved this errors, let me know how to fix it

Posts: 1

Participants: 1

Read full topic

No push notifications while mobile app is closed but you're logged in to the app

@amy.blais wrote:

Opening a new Issue as FYI for anyone who experiences the following situation with push notifications:

Description:

You have DMs / mentions for which you didn’t receive push notifications. If you are logged in to the app when you open the app next time, you’ll start getting the push notifications.

Explanation:

If you check your sessions from another browser, you’ll probably notice that the session for the mobile app is shown as an “iOS” session instead of an “iOS Native App” session, meaning you wouldn’t get push notifications. Once you re-open the app, you might notice that it switches to an “iOS Native App” session, and you’ll start getting push notifications again. In this case, the mobile app either didn’t register a device ID with the server when you first logged in, or it got erased after that.

Workaround:

Either:

  1. Re-open the app.
  2. Log out of all sessions (Main Menu > Account Settings > Security > View and Logout of Active Sessions) and then log back in to the mobile app.

Posts: 1

Participants: 1

Read full topic

Skype Presence Integration

@Sai_K wrote:

Hi we are trying to integrate the skype presence into the Mattermost. There is a Unified Communications Web API 2.0 available for SFB which can publish the required user presence through API end point. My solution is limited cause I’ve tried updating the user Presence in Status table in the DB but its not reflecting on the UI Because of the Session Cache as we are using the Static Caching! Also we We can’t bulk update the user statuses through API as there is no end point to do so! Is there any better way to overwrite the user presence?

Posts: 2

Participants: 2

Read full topic

Want to use Mattermost via PLESK

@Babbles wrote:

I tried and tried variously and Mattermost is installed and can execute it. I use PLESK to manage servers. This time I ignored PLESK and installed Mattermost, Mattermost worked fine. But I want to go through Plesk as much as possible. Because it is the existence of Let’s Encrypt. Plesk encompasses Let’s Encrypt.


I look at multiple conf files on a server using this Plesk, for example, I listen to 443 ports two or three times. So I think that trying to specify backend with nginx’s proxy_pass will cause a redirect error repeatedly.

PLESK Knowledge Database has the following guide.

location ~ ^/(?!.well-known).*$ {
proxy_pass https://127.0.0.1:8065;
port_in_redirect off;
}
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;

If I set this, it will result in NGINX’s “502 Bad Gateway” error. Even if I see the error log of NGINX. Pointed out that the version(5.1.12) of Passenger is old.

and

[error] 4389#0: *2 SSL_do_handshake() failed (SSL: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol) while SSL handshaking to upstream, client: CLIENT-IP, server: SERVER-DOMAIN, request: “GET / HTTP/2.0”, upstream: “https://SERVER-IP/index.html”, host: “MATTERMOST-URL”

“Proxy_pass https://127.0.0.1:8065;” Just specifying this will stop my site. I can not even see Index.html (ignoring the 8065 port).

This is a unique way to deal with Plesk, but who knows?

NEXT.
I do not install Mattermost in /opt, and installing in the domain may cause Mattermost to work. However, in this case, it is judged as an invalid certificate and it is an error. I thought I could give Mattermost the authority of the certificate by putting Mattermost in the domain, but it seems not to be the case. However with this method 502 Bad Gateway error does not occur. SSL error or invalid error.

I have doubts about config.json. “ConnectionSecurity” “TLSCertFile” “TLSKeyFile” in ServiceSettings section. Let’s Encrypt is enabled on PLESK, so SSL is working. Add Mattermost to it. I do not seem to work unless I type some characters on those items. If I leave “ConnectionSecurity” blank, an error will remain in Mattermost’s log.

{"level":"error","ts":1533229598.2654252,"caller":"jobs/jobs_watcher.go:70","msg":"Error occurred getting all pending statuses: SqlJobStore.GetAllByStatus: We couldn't get the jobs, Status=pending, invalid connection"}
{"level":"info","ts":1533230153.655869,"caller":"runtime/asm_amd64.s:2361","msg":"http: TLS handshake error from CLIENT-IP:20575: EOF","source":"httpserver"}
{"level":"error","ts":1533233769.2149591,"caller":"jobs/jobs_watcher.go:70","msg":"Error occurred getting all pending statuses: SqlJobStore.GetAllByStatus: We couldn't get the jobs, Status=pending, invalid connection"}
{"level":"error","ts":1533243896.2961688,"caller":"jobs/jobs_watcher.go:70","msg":"Error occurred getting all pending statuses: SqlJobStore.GetAllByStatus: We couldn't get the jobs, Status=pending, invalid connection"}
{"level":"error","ts":1533251112.7517698,"caller":"jobs/jobs_watcher.go:70","msg":"Error occurred getting all pending statuses: SqlJobStore.GetAllByStatus: We couldn't get the jobs, Status=pending, invalid connection"}

What I would like to do is to stop the function of activating SSL on Mattermost’s side. Is this possible?

Posts: 1

Participants: 1

Read full topic


Response attachments text do not trigger word notifications

@scottleedavis wrote:

Hello!

I am developing a /remind slash command clone of slack’s same version.

One of the requests is that reminders trigger notification words. (from account settings -> notifications -> words that trigger mentions)

The response attachment in interaction has text that contains these trigger words, but no alert is triggered for the user. Can we have trigger words also trigger from text inside the attachment?

request generated from : https://github.com/scottleedavis/mattermost-remind/issues/98

Posts: 1

Participants: 1

Read full topic

userName from interaction (from interactive button click)

@scottleedavis wrote:

Hello!

i am developing a /remind slash command: https://github.com/scottleedavis/mattermost-remind

One of the requets, is when someone clicks a remind ‘completed’ on a channel reminder, the channel text output is 'Completed by ’

Currently, buttons sending ‘interactions’ to a update url send userId and context as a payload.

User Id is always something like : 789fyrgo33nhtnimy8hdum1maw , where username is like scottd.

In order to accomplish this, I need to maintain a mapping of users that have interacted with the slash command and store their userId. The lookup on myside at the time of response for the interaction and include the username. This could be done with an addtional api call to lookup the user by id but…

It would be much more efficient and less complex if we could include the username in the interaction’s reponse too? or… what is the recommended way to extract username from userid without an addtional api call?

thank you!

Kind Regards,
Scott

Posts: 1

Participants: 1

Read full topic

OCR a pdf document in channel

@Gift_Of_Sight wrote:

Hello:

Task:
When a user uploads a .pdf document to a channel i want to OCR the document and then move the data off Mattermost possibly to a folder on the file system. Has this been accomplished?

Alternately, I’d like to find and monitor a Channel location on the file system. When items are posted to the channel by any user (ie: a pdf document) i’d like to move that item to another location on the file system. In my experiment i noticed the file location changes after ever post.

Is there another known technique to accomplish this task?

Posts: 1

Participants: 1

Read full topic

How to log info to mattermost logfile while developing plugin?

@haris wrote:

What’s the proper way to log info to the mattermost log while developing a plugin? MM version 5.1.

This is my function:

package main

import (
	"fmt"
	"log"
	"net/http"

	"github.com/mattermost/mattermost-server/mlog"
	"github.com/mattermost/mattermost-server/plugin"
	"github.com/mattermost/mattermost-server/plugin/rpcplugin"
)

type Plugin struct {
	api plugin.API
}

func (p *Plugin) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	var path = r.URL.Path
	fmt.Fprintf(w, path)
	mlog.Error("Error")
	mlog.Debug("Debug")
        // log.Fatal("Fatal error")
}

func main() {
	rpcplugin.Main(&Plugin{})
}

If I directly visit http://localhost:8065/plugins/com.mattermost.server-hello-world/ on the browser, then I can see the output from fmt.Fprintf(w, path). However, nothing appears on the browser or the logs for the mlog lines. The log.Fatal crashes the app.

Here are my LogSettings:

"LogSettings": {
        "EnableConsole": true,
        "ConsoleLevel": "DEBUG",
        "ConsoleJson": true,
        "EnableFile": true,
        "FileLevel": "DEBUG",
        "FileJson": true,
        "FileLocation": "",
        "EnableWebhookDebugging": false,
        "EnableDiagnostics": true
    },

My intention of logging is to see how the ServeHTTP function catches the api URLs and hence extend it by doing something like:

switch path {
	case "/api/v4/new-endpoint":
		{
			fmt.Fprintf(w, "Handle new endpoint!")
		}
	default:
		fmt.Fprintf(w, "default")
	}

If there are other proper examples / documentation on how to extend the API, do please point me to them.

Posts: 1

Participants: 1

Read full topic

LDAP sync deactivates user unexpectedly

@gubbins wrote:

Summary

Since upgrading to 5.1.0, a specific user is incorrectly deactivated on every LDAP sync.

Steps to reproduce

Server 5.1.0, E10. Configure AD sync (with the suggested filter to exclude disabled accounts). Sync with AD. Other required conditions unknown

Expected behavior

If the user is not disabled in AD, they should not be deactivated in mattermost

Observed behavior

User is deactivated on every AD sync. Logs show:

2018-08-07T17:29:23.027+1000    info    ldap/ldap_sync_job.go:225    Mattermost user was deactivated by LDAP server    {"workername": "EnterpriseLdapSync", "user_id": "9xuurhe6xb839fyr4ibemhojqo",

They are then re-activated at later random times not aligned with AD sync (perhaps when they attempt to log in?):

2018-08-07T20:31:14.984+1000    info    ldap/ldap.go:234    Mattermost user was updated by AD/LDAP server.    {"user_id": "9xuurhe6xb839fyr4ibemhojqo", 

This cycle keeps repeating.

An observation I suspect is relevant: with debug logs enabled, I saw (anonymised(:

2018-08-07T21:54:14.272+1000    debug    ldap/ldap_sync_job.go:125    Ldap sync foreign user    {"workername": "EnterpriseLdapSync", "ldap_user": {"id":"","delete_at":0,"username":"auser","auth_data":"Auser","auth_service":"ldap","email":"a.user@some.where","email_verified":true,"nickname":"","first_name":"A","last_name":"User","position":"","roles":"","locale":"","timezone":null}}

I note that the auth_data value has a capital initial letter. This is not true for any other user. The AuthData column in the mattermost DB has no initial capital, so they may not match up. Mattermost is configured to use sAMAccountName for the username, login name, and id fields.

Posts: 2

Participants: 2

Read full topic

Viewing all 6328 articles
Browse latest View live