Download | Wiki

Two Instances overwriting eachother


#1

Hello fellow Feeders,

i have a very curious problem.

I am running two instances of PT and PT feeder on my Linux-VPS.
One instance is on Binance Account A for BTC , the Second is on Binance Account B for ETH.
I have all setup and running via PM2 processmanager

Sporadically ftfeeder writes a new config to either PT instance A or PT instance B AND the other one as well resulting in the unlikely effect that my BTC Bot gets a ETH config or vice versa .

when i look on the webinterface of Instance A and Instance B i have the same config written.

I have reset every API Key and did a complete reset of the licensing of PT and PTFeeder. nothing changed.

how is this possible?
i have configured port 8081 for PT BTC and Port 8082 for PT ETH.
I thought that PTFeeder since v1.5 writes directly to the web api.

“pm2 list” looks like
┌───────────────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────┬────────────┬─────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │
├───────────────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────┼────────────┼─────────┼──────────┤
│ BTC-PTFeeder │ 1 │ fork │ 13069 │ online │ 1 │ 6h │ 0% │ 250.9 MB │ zapedge │ disabled │
│ BTC-ProfitTrailer │ 0 │ fork │ 13094 │ online │ 3 │ 6h │ 0% │ 739.9 MB │ zapedge │ disabled │
│ BTC-PtTracker │ 2 │ fork │ 13080 │ online │ 1 │ 6h │ 0% │ 83.0 MB │ zapedge │ disabled │
│ ETH-PTFeeder │ 4 │ fork │ 25250 │ online │ 3 │ 10m │ 0% │ 325.7 MB │ zapedge │ disabled │
│ ETH-ProfitTrailer │ 3 │ fork │ 13120 │ online │ 3 │ 6h │ 99% │ 730.1 MB │ zapedge │ disabled │
│ ETH-PtTracker │ 5 │ fork │ 13130 │ online │ 1 │ 6h │ 99% │ 90.2 MB │ zapedge │ disabled │

“top” is like

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13094 zapedge 20 0 3076492 757624 16924 S 26.2 18.7 71:16.02 java
13120 zapedge 20 0 3075028 747556 16972 S 7.3 18.5 81:32.89 java
13069 zapedge 20 0 11.553g 340780 70904 S 4.7 8.4 20:18.94 dotnet
25250 zapedge 20 0 11.438g 337368 69880 S 1.7 8.3 0:32.97 dotnet

where you can see both dotnet processes running

“netstat -ant”

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:5001 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5002 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8081 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8082 0.0.0.0:* LISTEN

all ports correctly mapped and listening

Instance1 hostsettings.json
{
“Host”: {
“ProfitTrailerFolder1”: “/opt/BTC-ProfitTrailer”, // add your in one or more PT folders below, where ths appl$
“ProfitTrailerApiEndPoint1”: “ht**://vps.***.de:8081”, // this is where the api is to be found from PT $
“HostName”: “BTC Fibunacci Feeder”, // the name that is used on telegram messages and the name of the config $
“LicenseKey”: “”, // License key for PT Feeder
“CalculateTrailingValues”: “true”, // whether PT Feeder should calculate the trading values for you
“TelegramBotId”: “***”, // telegram bot id
“TelegramChatId”: “***”, // telegram chat id,
“DiscordBotToken”: “”, // discord bot token
“DiscordChatName”: “”, // discord channel name,
“TestMode”: “false” // whether watchmode should be enabled or not. This sets PAIR_trading_enabled as false.
},

“Serilog”: {
“MinimumLevel”: “Information” // Can be Information or Debug depending how much logging you want
}
}

Instance2 hostsettings.json
{
“Host”: {
“ProfitTrailerFolder1”: “/opt/ETH-ProfitTrailer”, // add your in one or more PT folders below, where ths appl$
“ProfitTrailerApiEndPoint1”: “ht**://vps.*.de:8082", // this is where the api is to be found from PT $
“ServerUrls”: "ht
://localhost:5002”,
“HostName”: “ETH Fibunacci Feeder”, // the name that is used on telegram messages and the name of the con$
“LicenseKey”: “***”, // License key for PT Feeder
“CalculateTrailingValues”: “true”, // whether PT Feeder should calculate the trading values for you
“TelegramBotId”: “***”, // telegram bot id
“TelegramChatId”: “***”, // telegram chat id,
“DiscordBotToken”: “”, // discord bot token
“DiscordChatName”: “”, // discord channel name,
“TestMode”: “false” // whether watchmode should be enabled or not. This sets PAIR_trading_enabled as false.
},

“Serilog”: {
“MinimumLevel”: “Information” // Can be Information or Debug depending how much logging you want
}
}

right now it works, but sporadically this effect occurs.
I restart via cronjob every 6 hours. This seems to help a bit, but the effect is very odd. (i have deactivated this at the moment for debugging reasons)

Is it a bug or a feature? :wink:
right now it works because i finally found the time to post it here.
i will post evidence screenshots when it occurs again.

anyway help is appreciated
thanks for this awesome product.


#2

urls are crippled because new users are not allowed to post more than two links


#3

Hey,

I remember this a long time ago and I assumed this was fixed. It’s something in the PT config server.

Can you set this property to true and see if it happens again? https://wiki.profittrailer.com/doku.php?id=application.properties#serverdisable_online_config

Thanks,


#4

This happens for me too quite often.


#5

It happened to me, because I used the same name for the configuration on both bots (default). I had to put them into offline config mode, delete both history files (not the right name), restart the bots, and give them each unique configuration names (eth bot, BTC bot, usdt bot). The bots never did it again.


#6

thanks for your advise.
i have done the following now. In config A i use

ProfitTrailerFolder1”: “/opt/BTC-ProfitTrailer”, // add your in one or more PT folders below, where ths appl$
“ProfitTrailerApiEndPoint1”: “ht**://vps.***.de:8081”, // this is where the api is to be found from PT $

in config B

ProfitTrailerFolder2”: “/opt/ETH-ProfitTrailer”, // add your in one or more PT folders below, where ths appl$
“ProfitTrailerApiEndPoint2”: “ht**://vps.***.de:8082”, // this is where the api is to be found from PT $

now it seems to work.