x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Online Beacons Connection Refused Issue

Hey all, I am using Party beacons and I am having a little issue with them. So I spawn a OnlineBeaconHost and a PartyBeaconHost that is initialized with the OnlineBeaconHost on the server.

     AOnlineBeaconHost* host = GetWorld()->SpawnActor<AOnlineBeaconHost>(AOnlineBeaconHost::StaticClass(), params);
 
     // actually start the party
     host->InitHost();
 
     // spawn the beacon actor
     AHarvestPartyBeaconHost* beaconHostObject = GetWorld()->SpawnActor<AHarvestPartyBeaconHost>(AHarvestPartyBeaconHost::StaticClass(), params);
     
     beaconHostObject->InitHostBeacon(10, 4, 100, "Vocm Party");
     host->RegisterHost(beaconHostObject);

Here is how I try to connect the client beacon to the beaconhost via an invite from the listen server player:

     // Get the OnlineSubsystem we want to work with
     IOnlineSubsystem* OnlineSub = IOnlineSubsystem::Get();
 
     IOnlineIdentityPtr identity = nullptr;
 
     TSharedPtr<const FUniqueNetId> userID = nullptr;
 
     if (OnlineSub)
     {
         identity = OnlineSub->GetIdentityInterface();
     }
 
     if (identity.IsValid())
     {
         userID = identity->GetUniquePlayerId(0);
 
         APartyBeaconClient* client = GetWorld()->SpawnActor<APartyBeaconClient>(APartyBeaconClient::StaticClass());
 
         if (client)
         {
             TArray<FPlayerReservation> reservations;
             
             FPlayerReservation reservation;
             {
                 reservation.UniqueId = userID;
             }
 
             reservations.Add(reservation);
 
             FString ConnectInfo;
             IOnlineSessionPtr SessionInt = OnlineSub->GetSessionInterface();
             if (SessionInt.IsValid())
             {
                 if (SessionInt->GetResolvedConnectString(Session, BeaconPort, ConnectInfo))
                 {
                     FString SessionId = Session.Session.SessionInfo->GetSessionId().ToString();
                 }
             }
             client->RequestReservation(Session, userID, reservations);
         }
     }

When I try to connect to the beaconhost from the client, the server will get these messages in the logs:

 [2017.09.30-01.59.27:336][732]LogOnline: Verbose: STEAM: Client connection request Id: <hidden connecting steam name> [0x<hidden ID>]
 [2017.09.30-01.59.27:336][732]LogOnline: Verbose: STEAM: FOnlineAsyncEventSteamConnectionRequest RemoteId: <hidden connecting steam name> [0x<hidden ID>]
 [2017.09.30-01.59.27:786][759]LogNet: NotifyAcceptingConnection: Server OnlineBeaconHost_0 refused
 [2017.09.30-01.59.27:931][768]LogNet: NotifyAcceptingConnection: Server OnlineBeaconHost_0 refused
 [2017.09.30-01.59.28:948][831]LogNet: NotifyAcceptingConnection: Server OnlineBeaconHost_0 refused
 [2017.09.30-01.59.29:917][892]LogOnline: Verbose: STEAM: Dumping Steam P2P socket details:
 [2017.09.30-01.59.29:917][892]LogOnline: Verbose: STEAM: - Id:  <hidden connecting steam name>  [0x<hidden ID>], IdleTime: 0.969
 [2017.09.30-01.59.29:917][892]LogOnline: Verbose: STEAM: - Detailed P2P session info:
 [2017.09.30-01.59.29:917][892]LogOnline: Verbose: STEAM: -- IPAddress: <hidden IP>:49698
 [2017.09.30-01.59.29:917][892]LogOnline: Verbose: STEAM: -- ConnectionActive: 1, Connecting: 0, SessionError: 0, UsingRelay: 0
 [2017.09.30-01.59.29:917][892]LogOnline: Verbose: STEAM: -- QueuedBytes: 0, QueuedPackets: 0
 [2017.09.30-01.59.29:964][894]LogNet: NotifyAcceptingConnection: Server OnlineBeaconHost_0 refused
 [2017.09.30-01.59.30:980][957]LogNet: NotifyAcceptingConnection: Server OnlineBeaconHost_0 refused
 [2017.09.30-01.59.31:996][ 20]LogNet: NotifyAcceptingConnection: Server OnlineBeaconHost_0 refused

After these show up for about a minute (after i overrode the timeout delay of the beacons), it will time out the client and drop the connection, this is what the logs look like server side:

 [2017.09.30-01.59.47:931][  8]LogOnline: Verbose: STEAM: Dumping Steam P2P socket details:
 [2017.09.30-01.59.47:931][  8]LogOnline: Verbose: STEAM: - Id: <hidden steam name> [0x<hidden ID>], IdleTime: 0.828
 [2017.09.30-01.59.47:931][  8]LogOnline: Verbose: STEAM: - Detailed P2P session info:
 [2017.09.30-01.59.47:931][  8]LogOnline: Verbose: STEAM: -- IPAddress: <hidden ip>:49698
 [2017.09.30-01.59.47:931][  8]LogOnline: Verbose: STEAM: -- ConnectionActive: 1, Connecting: 0, SessionError: 0, UsingRelay: 0
 [2017.09.30-01.59.47:931][  8]LogOnline: Verbose: STEAM: -- QueuedBytes: 0, QueuedPackets: 0

Does anyone know why it says connection refused for a beacon connection?

Thanks!

Product Version: UE 4.17
Tags:
more ▼

asked Sep 30 '17 at 02:24 AM in C++ Programming

avatar image

CyberblastSoft
238 8 12 73

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Online beacons are disabled by default. You can see this in the constructor in OnlineBeacon.cpp.

Within your BeaconHost class set 'BeaconState = EBeaconState::AllowRequests;' after finishing setup. Or : Call 'PauseBeaconRequests(false)' on the OnlineBeacon after creation.

more ▼

answered Nov 27 '17 at 04:43 PM

avatar image

ambientenergy
11 1 2 5

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question